Code Monkey home page Code Monkey logo

Comments (5)

siddharthlatest avatar siddharthlatest commented on May 31, 2024

@risonsimon Can you share the "GruntFile.js" generated by yeoman in the directory, i.e. the one this error refers to?

from docbase.

risonsimon avatar risonsimon commented on May 31, 2024

Sure.

module.exports = function(grunt) {
    grunt.initConfig({
        docbase: {
            def: {
                options: {
                    generatePath: "build_html/",
                    generateSearchIndex: true,
                    generateHtml: true,
                    baseUrl: "./",
                    operation: 'parallel',
                    urlToAccess: "http://localhost:9001/",
                    assets: ['./'],
                    checkLoadedSelector: '#navbar-collapse',
                    endDocument: "<script>$(function(){  $('.search-form').searchAppbase('./search-index.json', true); $(document).ready(function(){ setTimeout(function(){ $('#folder-navbar').megaMenu(); },200); }); });</script></html>"
                }
            },
            spa: {
                options: {
                    onlysearchIndex: true,
                    generatePath: "spa/",
                    generateSearchIndex : true,
                    generateHtml : false,
                    baseUrl: "./",
                    operation: 'parallel',
                    urlToAccess: "http://localhost:9001/",
                    assets: ['./'],
                    checkLoadedSelector : '#navbar-collapse'
                }
            }
        },
        connect: {
            server: {
                options: {
                    port: 9001,
                    base: './',
                    protocol: 'http'
                }
            }
        },
        'gh-pages': {
            def: {
                options: {
                    base: 'build_html',
                    user: {
                        name: '',
                        email: ''
                    },
                    repo: 'https://' + new Buffer(process.env.DOCBASE_TOKEN, 'base64').toString() + '@github.com/xxxxxx/xxxxx.git',
                    message: 'publish gh-pages (auto)',
                    silent: false,
                },
                src: ['**']
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-docbase');
    grunt.loadNpmTasks('grunt-gh-pages');

    // Default task.

    var target = grunt.option('target') || 'def';

    grunt.registerTask('default', ['connect', 'docbase:'+target]);
    grunt.registerTask('publish', ['connect', 'docbase:'+target, 'gh-pages']);
    grunt.registerTask('spa', ['connect', 'docbase:spa']);

};

from docbase.

siddharthlatest avatar siddharthlatest commented on May 31, 2024

The Gruntfile looks okay, as you can see the default task is registered -> it runs connect and docbase:def tasks.

Since this is not something I am able to replicate, would you be able to share the original logs when you run the grunt process?

Also a little nitpick, along with npm install in your step 2., there should also be a bower install command. If you haven't run that, I would do that before running the grunt command. (And since you now have all the global npm dependencies, yo docbase should run all of these manual steps for you)

from docbase.

risonsimon avatar risonsimon commented on May 31, 2024

I tried installing again

  1. Ran yo docbase.
    This didn't install npm and bower dependencies.

  2. Ran npm install and bower install.

  3. Ran grunt.

  4. Got the following error.

    Loading "GruntFile.js" tasks...ERROR
    >> TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    Warning: Task "default" not found. Use --force to continue.
    
    Aborted due to warnings.

from docbase.

risonsimon avatar risonsimon commented on May 31, 2024

I managed to make it work.

Had to remove this line.

repo: 'https://' + new Buffer(process.env.DOCBASE_TOKEN, 'base64').toString() + '@github.com/xxxxxx/xxxxx.git'

inside gh-pages task.

I'm using node 6.2.0

from docbase.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.