Git Product home page Git Product logo

generator-backbone's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-backbone's Issues

Compilation broken in subdirectories (coffee, jst, handlebars, ...)

Hi there,

I noticed quite an annoying misconfiguration in Gruntfile.js.

At least in the following tasks:

  • jst
  • handlebars
  • coffee
  • sass (although not fully tested)
  • test (although this one is warned on the file top comments as being for performance reasons)

We are only specifying one level in the files configuration: *.hbs, *.coffee where it should be either **/*.hbs or {,*/}*.hbs (the same goes for the other file types, coffee, etc ...)

I think the current behaviour is quite confusing for new users who will for example put their models in scripts/models/ only to find that they are not compiled. They might as well think that the generator is broken without even trying to find why it is not compiling.

Yeoman/webapp generator has it right, I think backbone generator should follow the same philosophy instead of asking users to dig into the gruntfile to see why their files are not being compiled

Handlebars build template undefined

I'm using the generator with handlebars as template framework.
When i build with grunt and deploy i got the following error:
Uncaught TypeError: Cannot call method 'template' of undefined
Here you can see my GruntFile:

'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
    return connect.static(require('path').resolve(dir));
};

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to match all subfolders:
// 'test/spec/**/*.js'
// templateFramework: 'handlebars'

module.exports = function (grunt) {
    // load all grunt tasks
    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

    // configurable paths
    var yeomanConfig = {
        app: 'app',
        dist: 'dist'
    };

    grunt.initConfig({
        yeoman: yeomanConfig,
        watch: {
            options: {
                nospawn: true,
                livereload: true
            },
            coffeeTest: {
                files: ['test/spec/{,*/}*.coffee'],
                tasks: ['coffee:test']
            },
            compass: {
                files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
                tasks: ['compass']
            },
            livereload: {
                options: {
                    livereload: LIVERELOAD_PORT
                },
                files: [
                    '<%= yeoman.app %>/*.html',
                    '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
                    '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
                    '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}'
                ]
            },
            handlebars: {
                files: [
                    '<%= yeoman.app %>/scripts/templates/*.hbs'
                ],
                tasks: ['handlebars']
            },
        },
        connect: {
            options: {
                port: 9000,
                // change this to '0.0.0.0' to access the server from outside
                hostname: 'localhost'
            },
            livereload: {
                options: {
                    middleware: function (connect) {
                        return [
                            lrSnippet,
                            mountFolder(connect, '.tmp'),
                            mountFolder(connect, yeomanConfig.app)
                        ];
                    }
                }
            },
            test: {
                options: {
                    middleware: function (connect) {
                        return [
                            mountFolder(connect, '.tmp'),
                            mountFolder(connect, 'test'),
                            mountFolder(connect, yeomanConfig.app)
                        ];
                    }
                }
            },
            dist: {
                options: {
                    middleware: function (connect) {
                        return [
                            mountFolder(connect, yeomanConfig.dist)
                        ];
                    }
                }
            }
        },
        open: {
            server: {
                path: 'http://localhost:<%= connect.options.port %>'
            }
        },
        clean: {
            dist: ['.tmp', '<%= yeoman.dist %>/*'],
            server: '.tmp'
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            all: [
                'Gruntfile.js',
                '<%= yeoman.app %>/scripts/{,*/}*.js',
                '!<%= yeoman.app %>/scripts/vendor/*',
                'test/spec/{,*/}*.js'
            ]
        },
        mocha: {
            all: {
                options: {
                    run: true,
                    urls: ['http://localhost:<%= connect.options.port %>/index.html']
                }
            }
        },
        coffee: {
            dist: {
                files: [{
                    // rather than compiling multiple files here you should
                    // require them into your main .coffee file
                    expand: true,
                    cwd: '<%= yeoman.app %>/scripts',
                    src: '{,*/}*.coffee',
                    dest: '.tmp/scripts',
                    ext: '.js'
                }]
            },
            test: {
                files: [{
                    expand: true,
                    cwd: '.tmp/spec',
                    src: '*.coffee',
                    dest: 'test/spec'
                }]
            }
        },
        compass: {
            options: {
                sassDir: '<%= yeoman.app %>/styles',
                cssDir: '.tmp/styles',
                imagesDir: '<%= yeoman.app %>/images',
                javascriptsDir: '<%= yeoman.app %>/scripts',
                fontsDir: '<%= yeoman.app %>/styles/fonts',
                importPath: '<%= yeoman.app %>/bower_components',
                relativeAssets: true
            },
            dist: {},
            server: {
                options: {
                    debugInfo: true
                }
            }
        },
        requirejs: {
            dist: {
                // Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
                options: {
                    // `name` and `out` is set by grunt-usemin
                    baseUrl: '<%= yeoman.app %>/scripts',
                    optimize: 'none',
                    paths: {
                        'templates': '../../.tmp/scripts/templates'
                    },
                    // TODO: Figure out how to make sourcemaps work with grunt-usemin
                    // https://github.com/yeoman/grunt-usemin/issues/30
                    //generateSourceMaps: true,
                    // required to support SourceMaps
                    // http://requirejs.org/docs/errors.html#sourcemapcomments
                    preserveLicenseComments: false,
                    useStrict: true,
                    wrap: true
                    //uglify2: {} // https://github.com/mishoo/UglifyJS2
                }
            }
        },
        useminPrepare: {
            html: '<%= yeoman.app %>/index.html',
            options: {
                dest: '<%= yeoman.dist %>'
            }
        },
        usemin: {
            html: ['<%= yeoman.dist %>/{,*/}*.html'],
            css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
            options: {
                dirs: ['<%= yeoman.dist %>']
            }
        },
        imagemin: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>/images',
                    src: '{,*/}*.{png,jpg,jpeg}',
                    dest: '<%= yeoman.dist %>/images'
                }]
            }
        },
        cssmin: {
            dist: {
                files: {
                    '<%= yeoman.dist %>/styles/main.css': [
                        '.tmp/styles/{,*/}*.css',
                        '<%= yeoman.app %>/styles/{,*/}*.css'
                    ]
                }
            }
        },
        htmlmin: {
            dist: {
                options: {
                    /*removeCommentsFromCDATA: true,
                    // https://github.com/yeoman/grunt-usemin/issues/44
                    //collapseWhitespace: true,
                    collapseBooleanAttributes: true,
                    removeAttributeQuotes: true,
                    removeRedundantAttributes: true,
                    useShortDoctype: true,
                    removeEmptyAttributes: true,
                    removeOptionalTags: true*/
                },
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>',
                    src: '*.html',
                    dest: '<%= yeoman.dist %>'
                }]
            }
        },
        copy: {
            dist: {
                files: [{
                    expand: true,
                    dot: true,
                    cwd: '<%= yeoman.app %>',
                    dest: '<%= yeoman.dist %>',
                    src: [
                        '*.{ico,txt}',
                        '.htaccess',
                        'images/{,*/}*.{webp,gif}'
                    ]
                }]
            }
        },
        bower: {
            all: {
                rjsConfig: '<%= yeoman.app %>/scripts/main.js'
            }
        },
        handlebars: {
            compile: {
                options: {
                    namespace: 'JST',
                    amd: true
                },
                files: {
                    '.tmp/scripts/templates.js': ['<%= yeoman.app %>/scripts/templates/*.hbs']
                }
            }
        },
        rev: {
            dist: {
                files: {
                    src: [
                        '<%= yeoman.dist %>/scripts/{,*/}*.js',
                        '<%= yeoman.dist %>/styles/{,*/}*.css',
                        '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}',
                        '<%= yeoman.dist %>/styles/fonts/*'
                    ]
                }
            }
        }
    });

    grunt.registerTask('createDefaultTemplate', function () {
        grunt.file.write('.tmp/scripts/templates.js', 'this.JST = this.JST || {};');
    });

    grunt.registerTask('server', function (target) {
        if (target === 'dist') {
            return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
        }

        grunt.task.run([
            'clean:server',
            'coffee:dist',
            'createDefaultTemplate',
            'handlebars',
            'compass:server',
            'connect:livereload',
            'open',
            'watch'
        ]);
    });

    grunt.registerTask('test', [
        'clean:server',
        'coffee',
        'createDefaultTemplate',
        'handlebars',
        'compass',
        'connect:test',
        'mocha'
    ]);

    grunt.registerTask('build', [
        'clean:dist',
        'coffee',
        'createDefaultTemplate',
        'handlebars',
        'compass:dist',
        'useminPrepare',
        'requirejs',
        'imagemin',
        'htmlmin',
        'concat',
        'cssmin',
        'uglify',
        'copy',
        'rev',
        'usemin'
    ]);

    grunt.registerTask('default', [
        'jshint',
        'test',
        'build'
    ]);
};

What i'm doing wrong?

Using underscores in filename instead of hypen

How about using underscores (_) in the filenames instead of hypen (-).

Suggestions

  • Insead of application-collection.js can we default the filename to application_collection.js.
  • All files created with the sub generators have file names in lower case even though the user is provided the name in uppercase

I just want to know your thoughts.

Thank You.

Not found in npm install

I cant install with npm install generator-backbone or npm install yeoman-backbone.
Is it not updated for verion 1.0b of yeoman?

"template" property of generated backbone:view has wrong value (slashes are inverted)

"yo backbone:view Todo" creates templates/Todo.ejs, views/Todo-view.js, and adds a new property to this["JST"] in .tmp/scripts/templates.js with the key equal to the path of the template:

    this["JST"]["app/scripts/templates/Todo.ejs"] = function(obj) {...

Todo-view.js contains the property:

    template: JST["app\scripts\templates\Todo.ejs"] 

with inverted slashes, which makes template == undefined

"Cannot find module '../script-base'" error

When running yo with [email protected] installed, the following error is visible:

 Unable to register generator-backbone/collection/index.js (Error: Cannot find module  ../script-base') 
 Unable to register generator-backbone/model/index.js (Error: Cannot find module '../script-base') 
 Unable to register generator-backbone/router/index.js (Error: Cannot find module '../script-base')
 Unable to register generator-backbone/view/index.js (Error: Cannot find module '../script-base')

[email protected] works fine.

npm install -g generator-backbone issue

I can do npm istall -g generator-angular without any problem. The error below comes up when i tried same with generator-backbone

npm http GET https://registry.npmjs.org/generator-backbone
npm http GET https://registry.npmjs.org/generator-backbone
npm http GET https://registry.npmjs.org/generator-backbone
npm ERR! Error: connect ECONNREFUSED
npm ERR! at errnoException (net.js:883:11)
npm ERR! at Object.afterConnect as oncomplete
npm ERR! { [Error: connect ECONNREFUSED]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "d:\Programs\nodejs\node.exe" "d:\Programs\nodejs\node_mo
dules\npm\bin\npm-cli.js" "install" "-g" "generator-backbone"
npm ERR! cwd c:\Users\pelumini\projects
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED

View generator uses backslashes for relative URL on Windows

When running yo backbone:view Test on Windows, I get the following app/scripts/views/Test-view.js:

/*global define*/

define([
    'jquery',
    'underscore',
    'backbone',
    'templates'
], function ($, _, Backbone, JST) {
    'use strict';

    var TestView = Backbone.View.extend({
        template: JST['app\scripts\templates\Test.hbs']
    });

    return TestView;
});

As you can see, it treats the template path (app\scripts\templates\Test.hbs) as a relative file path instead of the relative URL and generates a badly escaped js string.

problem on vendor.js after build

Hi, i have had some probems on my JS after BUILD, i have resolved a few but i have a problem with the vendor libraries (underscore, backbone), this is my html

 <script src="bower_components/underscore/underscore-min.js"></script>
 <script src="bower_components/backbone/backbone-min.js"></script>

i already tried with the non-min version and i have the same problem, this is what i see on the console http://d.pr/7yKN

on dev (app) works perfect, also i'm using strict mode for my own files.
what can i do to fix this? regards

script-base.js doesn't install via npm or yo

Obviously script-base.js exists in the Github repo, but when install via npm or yo, this package doesn't include this file; thus, any of the generator:* commands are rendered useless (errors).

Thoughts?

Tests fails in Node 0.10

I think this was fixed in webapp or angular generator previously, so try to check their commit logs.

grunt-lodashbuilder fail during npm install

Hoping you can assist with this though it appears to be a requirejs issue
asciidisco/grunt-requirejs#36

The following messages output during the npm install part of the generator install.

> [email protected] postinstall C:\Users\lotus\projects\testinggnerator\node_modules\grunt-requirejs\node_modules\grunt-lodashbuilder
> node ./bin/post-install.js

Downloading the Closure Compiler...
There was a problem installing the Closure Compiler.
Try running the command as root, via `sudo`, or manually install by running:

curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/23cf67d0f0b979d97631fc108a2a43bb82225994 | tar xvz -C 'C:\Users\lotus\projects\testinggnerator\node_modules\grunt-requirejs\node_modules\grunt-lodashbuilder\node_modules\lodash\vendor'

Downloading UglifyJS...
There was a problem installing UglifyJS.
Try running the command as root, via `sudo`, or manually install by running:

curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/a934fb18f8fa2768c6a68de44b6e035fe96a268b | tar xvz -C 'C:\Users\lotus\projects\testinggnerator\node_modules\grunt-requirejs\node_modules\grunt-lodashbuilder\node_modules\lodash\vendor'

Extra commas

When a project is first generated there are extra commas in GruntFile.js, and main.js.

Additionally there are extra commas in generated -model.js, -router.js, and -router.js files. (When using "yo backbone:model" for instance).

I'm new to yeoman so I don't know if this is a serious issue or not, because one can use "grunt --force" to build it anyway.

r.js optimization - use of modules []

Hi! I'm relatively new to yeoman as well as grunt so this may be a silly question!

I'm trying to make use of require.js r.js' optimization of files into modules as specified in jburke's example.build.js (https://github.com/jrburke/r.js/blob/master/build/example.build.js). This file is referenced in this generator's Gruntfile (around line 160).

However, when I try to run grunt build having specified multiple modules, it aborts with an error saying that "out" and "dir" cannot be provided at the same time. It looks as if this generator aims to concat all scripts into one file. I believe this is done by grunt's usemin module, correct?

Is it possible to update Gruntfile.js to incorporate multiple js module files instead of concatenating all in one?

Thanks all!

templates.js missing

When creating a new view (when using the Handlebars option) it refers to a templates.js which is not included anywhere.

/*global define*/

define([
    'jquery',
    'underscore',
    'backbone',
    'templates',
], function ($, _, Backbone, JST) {
    'use strict';

    var MainView = Backbone.View.extend({
        template: JST['app/scripts/templates/main.hbs']
    });

    return MainView;
});

Template module not found

when starting grunt server, i get the following error from terminal:


$ grunt server
Loading "Gruntfile.js" tasks...ERROR

Error: Cannot find module 'generator-backbone/app/templates/templates.js'
Warning: Task "server" not found. Use --force to continue.
Aborted due to warnings.


if i comment out the cwd in the defaultTemplate of the copy task in Gruntfile.js, the error is gone, but templates dont compile.

should i be installing something?

combined-scripts.js is empty

.tmp\scripts\combined-script.js is always empty, no errors during build.
i created the backbone app with --coffee

other .js files in .tmp seem alright
dist\scripts\xxx.main.js is also empty

i'm using the latest generator-backbone

Shimming Backbone and Underscore for RequireJS unnecessary?

Hi everyone,

When you scaffold an app with generator-backbone and choose to use RequireJS, the resulting main.js file shims both Backbone and Underscore in require.config.

However, the Bower installs for both of these libraries are the AMD versions, and as far as I can tell, they both are fully AMD compatible out of the box. According to the RequireJS documentation, you should never shim a module that already has a define() call as it can cause trouble.

On my test app, I've commented out the shim declarations and have no trouble with using Backbone or Underscore in my RequireJS-rigged app, so as far as I can tell the shims are unnecessary.

Am I missing something here? Is there a reason that you're shimming Underscore and Backbone that I'm too stupid to be aware of, or should the shim stuff be removed?

Bower install confict after adding sass-bootstrap

sass-bootstrap depends on jquery ~1.8.3 and our app depends on jquery ~1.9.0 which makes conflict while triggering bower install.

bower-conflict

Please help to resolve this issue.
I think the webapp also sufferring from this issue.
Thanks.

compass server no directory app/bower_components

Starting a new project with:
yo backbone Test --test-framework=jasmine --template-framework=handlebars

Running grunt server results in:
Errno::ENOENT on line ["33"] of /Users/XXX/.rvm/gems/ruby-2.0.0-p195/gems/compass-0.12.2/lib/compass/exec/global_options_parser.rb: No such file or directory - /Users/XXX/Documents/backbone-test/app/bower_components

Thank you.

Adding new rules to .jshintrc

How about adding the following rules (contributing.md) to .jshintrc

"quotmark" : "single" // single-quotes
"indent" : 2 // two space indentation
"onevar" : false // multiple var statements

I am not sure how to enforce whitespace around argument in jshint.

Thanks.

Initial Backbone object overwrites Backbone Library

The code in main.js that set ups the initial "Backbone" object overwrites the actual Backbone library, throwing a Uncaught TypeError: Cannot call method 'extend' of undefined as a result. We could either use other name for the initial object or use a better pattern to add up the objects to hold our collections/models/views/routers. So for instance:

window.Backbone = {
  Models: {},
  Collections: {},
  Views: {},
  Routers: {},
  init: function() {
    console.log('Hello from Backbone!');
  }
};

wouldn't break if we use a modular pattern to update the "Backbone" object.

window.Backbone = (function(Backbone, undefined){
    Backbone.Models = {};
    Backbone.Collections = {};
    Backbone.Views = {};
    Backbone.Routers = {};
    Backbone.init = function() {
        console.log('Hello from Backbone!');    
    }
    return Backbone;
})(window.Backbone || {});

'Handlebars' undefined in template section of built main.js

On a fresh install of [email protected] using handlebars, jasmine and requirejs (tried 0.1.6 but yo backbone:model fails -- a separate issue).
Add a single view, wire the view into main.js and run 'grunt build'.
Copy the contents of the dist/ directory into a web server, I get 'Uncaught TypeError: Cannot call method 'template' of undefined'
My Gruntfile (unmodified from a fresh install):

'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
    return connect.static(require('path').resolve(dir));
};

// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to match all subfolders:
// 'test/spec/**/*.js'
// templateFramework: 'handlebars'

module.exports = function (grunt) {
    // load all grunt tasks
    require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

    // configurable paths
    var yeomanConfig = {
        app: 'app',
        dist: 'dist'
    };

    grunt.initConfig({
        yeoman: yeomanConfig,
        watch: {
            options: {
                nospawn: true,
                livereload: true
            },
            coffeeTest: {
                files: ['test/spec/{,*/}*.coffee'],
                tasks: ['coffee:test']
            },
            compass: {
                files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
                tasks: ['compass']
            },
            livereload: {
                options: {
                    livereload: LIVERELOAD_PORT
                },
                files: [
                    '<%= yeoman.app %>/*.html',
                    '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
                    '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
                    '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}'
                ]
            },
            handlebars: {
                files: [
                    '<%= yeoman.app %>/scripts/templates/*.hbs'
                ],
                tasks: ['handlebars']
            }
        },
        connect: {
            options: {
                port: 9000,
                // change this to '0.0.0.0' to access the server from outside
                hostname: 'localhost'
            },
            livereload: {
                options: {
                    middleware: function (connect) {
                        return [
                            lrSnippet,
                            mountFolder(connect, '.tmp'),
                            mountFolder(connect, yeomanConfig.app)
                        ];
                    }
                }
            },
            test: {
                options: {
                    middleware: function (connect) {
                        return [
                            mountFolder(connect, '.tmp'),
                            mountFolder(connect, 'test'),
                            mountFolder(connect, yeomanConfig.app)
                        ];
                    }
                }
            },
            dist: {
                options: {
                    middleware: function (connect) {
                        return [
                            mountFolder(connect, yeomanConfig.dist)
                        ];
                    }
                }
            }
        },
        open: {
            server: {
                path: 'http://localhost:<%= connect.options.port %>'
            }
        },
        clean: {
            dist: ['.tmp', '<%= yeoman.dist %>/*'],
            server: '.tmp'
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            all: [
                'Gruntfile.js',
                '<%= yeoman.app %>/scripts/{,*/}*.js',
                '!<%= yeoman.app %>/scripts/vendor/*',
                'test/spec/{,*/}*.js'
            ]
        },
        jasmine: {
            all: {
                options: {
                    run: true,
                    urls: ['http://localhost:<%= connect.options.port %>/index.html']
                }
            }
        },
        coffee: {
            dist: {
                files: [{
                    // rather than compiling multiple files here you should
                    // require them into your main .coffee file
                    expand: true,
                    cwd: '<%= yeoman.app %>/scripts',
                    src: '{,*/}*.coffee',
                    dest: '.tmp/scripts',
                    ext: '.js'
                }]
            },
            test: {
                files: [{
                    expand: true,
                    cwd: '.tmp/spec',
                    src: '*.coffee',
                    dest: 'test/spec'
                }]
            }
        },
        compass: {
            options: {
                sassDir: '<%= yeoman.app %>/styles',
                cssDir: '.tmp/styles',
                imagesDir: '<%= yeoman.app %>/images',
                javascriptsDir: '<%= yeoman.app %>/scripts',
                fontsDir: '<%= yeoman.app %>/styles/fonts',
                importPath: '<%= yeoman.app %>/bower_components',
                relativeAssets: true
            },
            dist: {},
            server: {
                options: {
                    debugInfo: true
                }
            }
        },
        requirejs: {
            dist: {
                // Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
                options: {
                    // `name` and `out` is set by grunt-usemin
                    baseUrl: '<%= yeoman.app %>/scripts',
                    optimize: 'none',
                    paths: {
                        'templates': '../../.tmp/scripts/templates'
                    },
                    // TODO: Figure out how to make sourcemaps work with grunt-usemin
                    // https://github.com/yeoman/grunt-usemin/issues/30
                    //generateSourceMaps: true,
                    // required to support SourceMaps
                    // http://requirejs.org/docs/errors.html#sourcemapcomments
                    preserveLicenseComments: false,
                    useStrict: true,
                    wrap: true
                    //uglify2: {} // https://github.com/mishoo/UglifyJS2
                }
            }
        },
        useminPrepare: {
            html: '<%= yeoman.app %>/index.html',
            options: {
                dest: '<%= yeoman.dist %>'
            }
        },
        usemin: {
            html: ['<%= yeoman.dist %>/{,*/}*.html'],
            css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
            options: {
                dirs: ['<%= yeoman.dist %>']
            }
        },
        imagemin: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>/images',
                    src: '{,*/}*.{png,jpg,jpeg}',
                    dest: '<%= yeoman.dist %>/images'
                }]
            }
        },
        cssmin: {
            dist: {
                files: {
                    '<%= yeoman.dist %>/styles/main.css': [
                        '.tmp/styles/{,*/}*.css',
                        '<%= yeoman.app %>/styles/{,*/}*.css'
                    ]
                }
            }
        },
        htmlmin: {
            dist: {
                options: {
                    /*removeCommentsFromCDATA: true,
                    // https://github.com/yeoman/grunt-usemin/issues/44
                    //collapseWhitespace: true,
                    collapseBooleanAttributes: true,
                    removeAttributeQuotes: true,
                    removeRedundantAttributes: true,
                    useShortDoctype: true,
                    removeEmptyAttributes: true,
                    removeOptionalTags: true*/
                },
                files: [{
                    expand: true,
                    cwd: '<%= yeoman.app %>',
                    src: '*.html',
                    dest: '<%= yeoman.dist %>'
                }]
            }
        },
        copy: {
            dist: {
                files: [{
                    expand: true,
                    dot: true,
                    cwd: '<%= yeoman.app %>',
                    dest: '<%= yeoman.dist %>',
                    src: [
                        '*.{ico,txt}',
                        '.htaccess',
                        'images/{,*/}*.{webp,gif}'
                    ]
                }]
            }
        },
        bower: {
            all: {
                rjsConfig: '<%= yeoman.app %>/scripts/main.js'
            }
        },
        handlebars: {
            compile: {
                options: {
                    namespace: 'JST',
                    amd: true
                },
                files: {
                    '.tmp/scripts/templates.js': ['<%= yeoman.app %>/scripts/templates/*.hbs']
                }
            }
        },
        rev: {
            dist: {
                files: {
                    src: [
                        '<%= yeoman.dist %>/scripts/{,*/}*.js',
                        '<%= yeoman.dist %>/styles/{,*/}*.css',
                        '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}',
                        '<%= yeoman.dist %>/styles/fonts/*'
                    ]
                }
            }
        }
    });

    grunt.registerTask('createDefaultTemplate', function () {
        grunt.file.write('.tmp/scripts/templates.js', 'this.JST = this.JST || {};');
    });

    grunt.registerTask('server', function (target) {
        if (target === 'dist') {
            return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
        }

        grunt.task.run([
            'clean:server',
            'coffee:dist',
            'createDefaultTemplate',
            'handlebars',
            'compass:server',
            'connect:livereload',
            'open',
            'watch'
        ]);
    });

    grunt.registerTask('test', [
        'clean:server',
        'coffee',
        'createDefaultTemplate',
        'handlebars',
        'compass',
        'connect:test',
        'jasmine'
    ]);

    grunt.registerTask('build', [
        'clean:dist',
        'coffee',
        'createDefaultTemplate',
        'handlebars',
        'compass:dist',
        'useminPrepare',
        'requirejs',
        'imagemin',
        'htmlmin',
        'concat',
        'cssmin',
        'uglify',
        'copy',
        'rev',
        'usemin'
    ]);

    grunt.registerTask('default', [
        'jshint',
        'test',
        'build'
    ]);
};

The generated main file has handlebars inside it; I'm not sure if this is a bug or if I'm doing something wrong, or if it's a problem with grunt-requirejs (version 0.3.5).

use strict

Based on the current documentation (as of 2013-05-19), should the /app/index.js file have the following as the first line?

"use strict";

This may be a non-issue, and I've not delved into the code enough across the generator to know if this is necessary but since it is mentioned in the custom scaffolding...this should be a quick yes/no issue/fix.

:)

Including RequireJS (for AMD support) causes ReferenceError

Using the backbone generator through the following invocation:

yo backbone --test-framework=jasmine --template-framework=handlebars

results in...

Out of the box I include HTML5 Boilerplate, jQuery, Backbone.js and Modernizr.
Would you like to include Twitter Bootstrap for Sass? (Y/n) y
Would you like to include RequireJS (for AMD support)? (Y/n) y
   create .gitignore
   create .gitattributes
   create .bowerrc
   create component.json
   create .jshintrc
   create .editorconfig

undefined:8
 if (includeRequireJS) { ;
     ^
ReferenceError: includeRequireJS is not defined
    at eval (/lodash/template/source[1]:8:6)
    at Generator.underscore [as _engine] (/usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/util/engines.js:33:30)
    at Generator.engine (/usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/actions/actions.js:195:10)
    at Generator.gruntfile (/usr/local/lib/node_modules/generator-backbone/app/index.js:90:37)
    at next (/usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:275:18)
    at /usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:286:7
    at next (/usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/util/conflicter.js:52:14)
    at /usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/util/conflicter.js:61:7
    at EventEmitter.collision (/usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/util/conflicter.js:80:12)
    at next (/usr/local/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/util/conflicter.js:55:16)

Wrong uglify config using coffeescript and handlebars

Hi
I've noticed that there are serious problems with the configuration during the "grunt build" task in coffeescript.

Basically if you create a view+template with this generator, the final compiled file will contain ONLY the template(s), not including any other script

this is reproducible just by doing this:

$ yo backbone --coffee
$ yo backbone:view
$ grunt

then check the main.js file in the dist directory and it will contain ONLY the template :\

uglify seems the reponsable but I'm still figuring out a fix

UPDATE

Success! I figured this out, there are some misconfigurations in the Gruntfile.js
changing the uglify section to

uglify: {
    dist: {
        files: {
            '<%= yeoman.dist %>/scripts/main.js': [
                '.tmp/scripts/main.js', // THIS WILL ENSURE THAT THE NAMESPACE IS CREATED
                '.tmp/scripts/**/*.js',   // ALL THE OTHER FILES IN THE SUBDIRECTORIES (like routers, views, etc.)
                '.tmp/scripts/templates.js' // THE TEMPLATES ARE ONLY ADDED ATH THE END
            ],
        }
    }
},

Is it possible to have a proper Gruntfile.js when we create the files with the --coffee option?

compass:server fails after generating with generator-backbone

I installed the latest version of generator-backbone from the GitHub source by cloning the repository and running "sudo npm install -g foldername" to get past #44. Now, even after sudo gem update --system && sudo gem install compass I get the following:

Mac-Pro:project username$ grunt server --trace
Running "server" task

Running "clean:server" (clean) task
Cleaning ".tmp"...OK

Running "coffee:dist" (coffee) task

Running "createDefaultTemplate" task

Running "handlebars:compile" (handlebars) task
>> Destination not written because compiled files were empty.

Running "compass:server" (compass) task
Errno::ENOENT on line 441 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb: No such file or directory - /Users/username/Projects/project/app/bower_components
Run with --trace to see the full backtrace
Warning: Task "compass:server" failed. Use --force to continue.

Aborted due to warnings.

Node v0.10.5
Ruby 1.8.7
Compass 0.12.2

cannot build, invalid regular expression in r.js

➜ bbApp grunt requirejs
Running "requirejs:debug" (requirejs) task
commonJs.convert: COULD NOT CONVERT: app, so skipping it. Error was: Error: Line 24: Invalid regular expression
[Error: Error: Parse error using esprima for file: /Users/martingenev/Projects/bbApp/app/app.js
Error: Line 24: Invalid regular expression
at /Users/martingenev/Projects/bbApp/node_modules/grunt-bbb-requirejs/node_modules/requirejs/bin/r.js:23419:47
]

Handlebars problem

I'm trying to setup a new backbone project with require and handlebars support.
The ➜ bbhandlebarstest in front of the commands is just my test directory.
Basically it works fine until I create a new view and try to require it from the main.js. Then it can't find handlebars.js in the script directory.

After each copy/paste from the terminal I have written which problems I could find.

Initial setup

  bbhandlebarstest  yo backbone --template-framework=handlebars

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Out of the box I include HTML5 Boilerplate, jQuery, Backbone.js and Modernizr.
[?] Would you like to include Twitter Bootstrap for Sass?: No
[?] Would you like to include RequireJS (for AMD support)?: Yes
   create .gitignore
   create .gitattributes
   create .bowerrc
   create bower.json
   create .jshintrc
   create .editorconfig
   create Gruntfile.js
   create package.json
   create app/styles/main.css
   create app/404.html
   create app/favicon.ico
   create app/robots.txt
   create app/.htaccess
   create app/index.html
   create app/scripts/main.js
   invoke   mocha:app
   create     test/index.html
   create     test/lib/chai.js
   create     test/lib/expect.js
   create     test/lib/mocha/mocha.css
   create     test/lib/mocha/mocha.js
   create     test/spec/test.js


I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.


npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No readme data.
npm http GET https://registry.npmjs.org/grunt-contrib-concat
npm http GET https://registry.npmjs.org/grunt-contrib-copy
npm http GET https://registry.npmjs.org/grunt-contrib-jshint
npm http GET https://registry.npmjs.org/grunt-contrib-handlebars
npm http GET https://registry.npmjs.org/grunt-contrib-uglify
npm http GET https://registry.npmjs.org/grunt-contrib-cssmin
npm http GET https://registry.npmjs.org/grunt-contrib-connect/0.3.0
npm http GET https://registry.npmjs.org/grunt-contrib-compass
npm http GET https://registry.npmjs.org/grunt-contrib-htmlmin/0.1.3
npm http GET https://registry.npmjs.org/grunt-contrib-coffee
npm http GET https://registry.npmjs.org/grunt-contrib-watch
npm http GET https://registry.npmjs.org/grunt-contrib-clean/0.4.0
npm http GET https://registry.npmjs.org/grunt-contrib-imagemin/0.1.4
npm http GET https://registry.npmjs.org/grunt-bower-requirejs
npm http GET https://registry.npmjs.org/grunt-mocha
npm http GET https://registry.npmjs.org/grunt-usemin
npm http GET https://registry.npmjs.org/grunt-requirejs
npm http GET https://registry.npmjs.org/grunt-open
npm http GET https://registry.npmjs.org/matchdep
npm http GET https://registry.npmjs.org/grunt-rev
npm http GET https://registry.npmjs.org/connect-livereload
npm http GET https://registry.npmjs.org/grunt
bower cloning git://github.com/requirejs/text
bower cached git://github.com/requirejs/text
bower fetching requirejs-text
bower cloning git://github.com/amdjs/backbone
bower cloning git://github.com/components/jquery.git
bower cloning git://github.com/amdjs/underscore.git
bower cloning git://github.com/jrburke/requirejs
bower cached git://github.com/amdjs/backbone
bower fetching backbone-amd
bower cached git://github.com/components/jquery.git
bower fetching jquery
bower cached git://github.com/amdjs/underscore.git
bower fetching underscore-amd
bower cached git://github.com/jrburke/requirejs
bower fetching requirejs
bower cloning git://github.com/Modernizr/Modernizr.git
bower cached git://github.com/Modernizr/Modernizr.git
bower fetching modernizr
npm http 304 https://registry.npmjs.org/grunt-contrib-copy
npm http 304 https://registry.npmjs.org/grunt-contrib-jshint
npm http 304 https://registry.npmjs.org/grunt-contrib-concat
npm http 304 https://registry.npmjs.org/grunt-contrib-handlebars
npm http 304 https://registry.npmjs.org/grunt-contrib-uglify
npm http 304 https://registry.npmjs.org/grunt-contrib-cssmin
npm http 304 https://registry.npmjs.org/grunt-contrib-compass
npm http 304 https://registry.npmjs.org/grunt-contrib-connect/0.3.0
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/grunt-contrib-htmlmin/0.1.3
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/grunt-contrib-coffee
npm http 304 https://registry.npmjs.org/grunt-contrib-watch
npm http 304 https://registry.npmjs.org/grunt-contrib-clean/0.4.0
npm http 304 https://registry.npmjs.org/grunt-contrib-imagemin/0.1.4
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/grunt-bower-requirejs
npm http 304 https://registry.npmjs.org/grunt-mocha
npm http 304 https://registry.npmjs.org/grunt-usemin
npm http 304 https://registry.npmjs.org/grunt-requirejs
npm http 304 https://registry.npmjs.org/grunt-open
npm http 304 https://registry.npmjs.org/matchdep
npm http 304 https://registry.npmjs.org/grunt-rev
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/connect-livereload
npm http 304 https://registry.npmjs.org/grunt
bower checking out underscore-amd#1.4.4
bower checking out requirejs-text#2.0.7
bower checking out jquery#1.9.1
bower copying /Users/myusername/.bower/cache/underscore-amd/8e314e18ef602ee242d3d16dc2c7478d
bower copying /Users/myusername/.bower/cache/requirejs-text/c95a5152b859fd06bd5d98f8cbf4afe9
bower warn Package jquery is still using the deprecated "component.json" file
bower copying /Users/myusername/.bower/cache/jquery/29cb4373d29144ca260ac7c3997f4381
bower checking out requirejs#2.1.6
bower copying /Users/myusername/.bower/cache/requirejs/ca377b0e482cd657ed20ebfa063ade1a
bower checking out modernizr#v2.6.2
npm http GET https://registry.npmjs.org/requirejs
npm http GET https://registry.npmjs.org/minimatch
bower copying /Users/myusername/.bower/cache/modernizr/49c1c17a4ec1b92db2a4728ece50773a
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/filesize
npm http GET https://registry.npmjs.org/jpegtran-bin
npm http GET https://registry.npmjs.org/optipng-bin
npm http GET https://registry.npmjs.org/tmp/0.0.16
npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/html-minifier
npm http GET https://registry.npmjs.org/open/0.0.2
npm http GET https://registry.npmjs.org/jshint
npm http GET https://registry.npmjs.org/gzip-js
npm http GET https://registry.npmjs.org/domino
npm http GET https://registry.npmjs.org/almond
npm http GET https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/grunt-lodashbuilder
npm http GET https://registry.npmjs.org/clean-css
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/requirejs
npm http GET https://registry.npmjs.org/grunt-backbonebuilder
npm http GET https://registry.npmjs.org/grunt-jquerybuilder
npm http GET https://registry.npmjs.org/cheerio
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/grunt-lib-contrib
npm http GET https://registry.npmjs.org/handlebars
bower checking out backbone-amd#1.0.0
npm http GET https://registry.npmjs.org/gaze
npm http GET https://registry.npmjs.org/tiny-lr/0.0.4
bower copying /Users/myusername/.bower/cache/backbone-amd/44d7359c7e3955d0116e5065406bfeea
npm http GET https://registry.npmjs.org/grunt-lib-phantomjs
npm http GET https://registry.npmjs.org/mocha
npm http GET https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/requirejs
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/optipng-bin
npm http 304 https://registry.npmjs.org/jpegtran-bin
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/hooker
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/eventemitter2
npm http GET https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/tmp/0.0.16
npm http 304 https://registry.npmjs.org/filesize
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/iconv-lite
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/js-yaml
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
npm http 304 https://registry.npmjs.org/html-minifier
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
npm http 304 https://registry.npmjs.org/open/0.0.2
npm http 304 https://registry.npmjs.org/jshint
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/gzip-js
npm http 304 https://registry.npmjs.org/domino
npm http 304 https://registry.npmjs.org/almond
npm http 304 https://registry.npmjs.org/temp
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/grunt-lodashbuilder
npm http 304 https://registry.npmjs.org/clean-css
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/requirejs
npm http 304 https://registry.npmjs.org/grunt-backbonebuilder
npm WARN package.json [email protected] No readme data.
npm http GET https://registry.npmjs.org/zlib-browserify/0.0.1
npm http 304 https://registry.npmjs.org/cheerio
npm http 304 https://registry.npmjs.org/grunt-jquerybuilder
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/grunt-lib-contrib
npm http 304 https://registry.npmjs.org/handlebars
npm http 304 https://registry.npmjs.org/gaze
npm http 304 https://registry.npmjs.org/tiny-lr/0.0.4
npm http 304 https://registry.npmjs.org/grunt-lib-phantomjs
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/dateformat/1.0.2-1.2.3
npm http 304 https://registry.npmjs.org/glob
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/hooker
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/jquery-builder
npm http 304 https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/grunt-contrib-nodeunit
npm http 304 https://registry.npmjs.org/eventemitter2
npm http 304 https://registry.npmjs.org/findup-sync
npm http GET https://registry.npmjs.org/backbone
npm http 304 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/iconv-lite
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/node-minify
npm http 304 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/wrench
npm http GET https://registry.npmjs.org/uglify-js/1.3.4
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/zlib-browserify/0.0.1
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/jquery-builder
npm http GET https://registry.npmjs.org/crc32
npm http GET https://registry.npmjs.org/deflate-js
npm http 304 https://registry.npmjs.org/grunt-contrib-nodeunit
npm http 304 https://registry.npmjs.org/backbone
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/node-minify
npm http 304 https://registry.npmjs.org/wrench
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/uglify-js/1.3.4
npm http 304 https://registry.npmjs.org/deflate-js
npm http 304 https://registry.npmjs.org/crc32
npm http GET https://registry.npmjs.org/temporary
npm http GET https://registry.npmjs.org/phantomjs
bower installing requirejs-text#2.0.7
bower installing jquery#1.9.1
bower installing underscore-amd#1.4.4
bower installing modernizr#2.6.2
bower installing backbone-amd#1.0.0
bower installing requirejs#2.1.6
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/noptify
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/faye-websocket
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/keypress
npm http GET https://registry.npmjs.org/fileset
npm http GET https://registry.npmjs.org/entities
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/cheerio-select
npm http GET https://registry.npmjs.org/htmlparser2
npm http GET https://registry.npmjs.org/nodeunit
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/temporary
npm http 304 https://registry.npmjs.org/phantomjs
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/faye-websocket
npm http 304 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/keypress
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/noptify
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/entities
npm http 304 https://registry.npmjs.org/fileset
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/cheerio-select
npm http 304 https://registry.npmjs.org/htmlparser2
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/ncp/0.4.2
npm http GET https://registry.npmjs.org/npmconf/0.0.24
npm http GET https://registry.npmjs.org/kew
npm http GET https://registry.npmjs.org/mkdirp/0.3.5
npm http GET https://registry.npmjs.org/adm-zip/0.2.1
npm http 304 https://registry.npmjs.org/nodeunit
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/package
npm http 304 https://registry.npmjs.org/npmconf/0.0.24
npm http 304 https://registry.npmjs.org/kew
npm http 304 https://registry.npmjs.org/mkdirp/0.3.5
npm http 304 https://registry.npmjs.org/adm-zip/0.2.1
npm http GET https://registry.npmjs.org/esprima
npm http GET https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/CSSselect
npm http 304 https://registry.npmjs.org/package
npm http GET https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/ncp/0.4.2
npm http GET https://registry.npmjs.org/cli/0.4.3
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/qs/0.6.5
npm http GET https://registry.npmjs.org/formidable/1.0.14
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/send/0.1.1
npm http GET https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/CSSselect
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http 304 https://registry.npmjs.org/qs/0.6.5
npm http 304 https://registry.npmjs.org/formidable/1.0.14
npm http 304 https://registry.npmjs.org/cookie/0.0.5
npm http 304 https://registry.npmjs.org/send/0.1.1
npm http 304 https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/domhandler
npm http GET https://registry.npmjs.org/domelementtype
npm http GET https://registry.npmjs.org/domutils
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http 304 https://registry.npmjs.org/fresh/0.1.0
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/osenv/0.0.3
npm http GET https://registry.npmjs.org/config-chain
npm http GET https://registry.npmjs.org/once
npm http GET https://registry.npmjs.org/ini
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/domhandler
npm http 304 https://registry.npmjs.org/domelementtype
npm http 304 https://registry.npmjs.org/domutils
npm http 304 https://registry.npmjs.org/cli/0.4.3
npm http 304 https://registry.npmjs.org/osenv/0.0.3
npm http 304 https://registry.npmjs.org/once
npm http 304 https://registry.npmjs.org/config-chain
npm http 304 https://registry.npmjs.org/ini
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/diff/1.0.2
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/ms/0.3.0
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/growl
npm http GET https://registry.npmjs.org/proto-list
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/CSSwhat
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/range-parser/0.0.4
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/diff/1.0.2
npm http 304 https://registry.npmjs.org/mkdirp/0.3.3
npm http 304 https://registry.npmjs.org/ms/0.3.0
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm WARN package.json [email protected] No repository field.
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/proto-list
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/CSSwhat
npm http 304 https://registry.npmjs.org/bower
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/amdefine

> [email protected] install /Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
> node install.js

Download already available at /var/folders/0j/h9bwysp17_b0pym203f9m_d00000gn/T/phantomjs/phantomjs-1.9.1-macosx.zip
Extracting zip contents
npm http 304 https://registry.npmjs.org/amdefine
npm http GET https://registry.npmjs.org/block-stream
npm http GET https://registry.npmjs.org/fstream
Renaming extracted folder /var/folders/0j/h9bwysp17_b0pym203f9m_d00000gn/T/phantomjs/phantomjs-1.9.1-macosx -> /Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/oauth-signature
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/node-uuid
Fixing file permissions
Done. Phantomjs binary available at /Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-mocha/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/lib/phantom/bin/phantomjs
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/glob-whatev
npm http GET https://registry.npmjs.org/prompt
npm http 304 https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/block-stream
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/form-data
npm WARN package.json [email protected] No readme data.
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/aws-sign
npm WARN package.json [email protected] No readme data.
npm WARN package.json [email protected] No readme data.
npm WARN package.json [email protected] No readme data.
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm http 304 https://registry.npmjs.org/glob-whatev
npm http 304 https://registry.npmjs.org/prompt
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/tap
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/winston
npm http GET https://registry.npmjs.org/mocha
npm http GET https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/tap
npm http 304 https://registry.npmjs.org/winston
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/cryptiles
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm http 304 https://registry.npmjs.org/pkginfo
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/crc/0.2.0
npm http GET https://registry.npmjs.org/cookie/0.0.4
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/send/0.0.4
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/runforcover
npm http GET https://registry.npmjs.org/slide
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/difflet
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/buffer-equal
npm http GET https://registry.npmjs.org/glob
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/hogan.js
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/promptly
npm http GET https://registry.npmjs.org/rc
npm http GET https://registry.npmjs.org/stable
npm http GET https://registry.npmjs.org/unzip/0.1.7
npm http GET https://registry.npmjs.org/tmp
npm http GET https://registry.npmjs.org/read-package-json
npm http 304 https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/archy
npm http GET https://registry.npmjs.org/update-notifier
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/qs/0.5.1
npm http 304 https://registry.npmjs.org/formidable/1.0.11
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/crc/0.2.0
npm http 304 https://registry.npmjs.org/cookie/0.0.4
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/bytes/0.1.0
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/shelljs
npm http GET https://registry.npmjs.org/cli
npm http GET https://registry.npmjs.org/console-browserify
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/runforcover
npm http 304 https://registry.npmjs.org/send/0.0.4
npm http 304 https://registry.npmjs.org/slide
npm WARN package.json [email protected] No repository field.

> [email protected] postinstall /Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-contrib-imagemin/node_modules/optipng-bin
> node pre-build.js

npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/difflet
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/buffer-equal
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/hogan.js
  npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/promptly
npm http 304 https://registry.npmjs.org/rc
npm http 304 https://registry.npmjs.org/stable
npm http 304 https://registry.npmjs.org/read-package-json
npm http 304 https://registry.npmjs.org/unzip/0.1.7

  3 tests complete (290 ms)

pre-build test passed successfully, skipping build...
npm http 304 https://registry.npmjs.org/tmp
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http 304 https://registry.npmjs.org/archy
npm http GET https://registry.npmjs.org/bunker
npm http 304 https://registry.npmjs.org/update-notifier
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/cli
npm http 304 https://registry.npmjs.org/shelljs
npm http 304 https://registry.npmjs.org/console-browserify
npm http 304 https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/bunker
npm http GET https://registry.npmjs.org/deep-is
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/charm
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/charm
npm http GET https://registry.npmjs.org/configstore
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/read
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x"} (current: {"node":"v0.10.12","npm":"1.2.32"})
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/npmlog
npm http GET https://registry.npmjs.org/stack-trace
npm http GET https://registry.npmjs.org/loggly
npm http GET https://registry.npmjs.org/eyes
npm http GET https://registry.npmjs.org/burrito
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/ini
npm http 304 https://registry.npmjs.org/deep-is
npm http 304 https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/npmlog
npm http 304 https://registry.npmjs.org/stack-trace
npm http 304 https://registry.npmjs.org/loggly
npm http GET https://registry.npmjs.org/pullstream
npm http GET https://registry.npmjs.org/binary
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/match-stream/0.0.1
npm http GET https://registry.npmjs.org/setimmediate
npm http 304 https://registry.npmjs.org/configstore
npm http 304 https://registry.npmjs.org/eyes
npm http 304 https://registry.npmjs.org/burrito
npm WARN package.json [email protected] No repository field.
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/yamljs
npm http 304 https://registry.npmjs.org/ini
npm http 304 https://registry.npmjs.org/readable-stream
npm http 304 https://registry.npmjs.org/match-stream/0.0.1
npm http 304 https://registry.npmjs.org/binary
npm http GET https://registry.npmjs.org/ansi
npm http 304 https://registry.npmjs.org/setimmediate
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/yamljs
npm http 304 https://registry.npmjs.org/ansi
npm http 304 https://registry.npmjs.org/pullstream

> [email protected] postinstall /Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-contrib-imagemin/node_modules/jpegtran-bin
> node pre-build.js

npm http GET https://registry.npmjs.org/slice-stream/0.0.0
npm http GET https://registry.npmjs.org/over
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/timespan
npm http GET https://registry.npmjs.org/uglify-js
  npm http GET https://registry.npmjs.org/buffers

  3 tests complete (289 ms)

pre-build test passed successfully, skipping build...
npm http GET https://registry.npmjs.org/chainsaw
npm http GET https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/over
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/timespan
npm http 304 https://registry.npmjs.org/slice-stream/0.0.0
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/buffers
npm http 304 https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/chainsaw
npm http GET https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/underscore.string
npm WARN prefer global [email protected] should be installed with -g
npm http GET https://registry.npmjs.org/uglify-js2
npm http 304 https://registry.npmjs.org/uglify-js2
npm WARN deprecated [email protected]: You can now install this using [email protected] node_modules/uglify-js
npm WARN deprecated ├── [email protected] ([email protected])
npm WARN deprecated └── [email protected] ([email protected])
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/source-map
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/source-map
npm http GET https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/amdefine

> [email protected] postinstall /Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-requirejs/node_modules/grunt-lodashbuilder
> node ./bin/post-install.js

Downloading the Closure Compiler...
There was a problem installing the Closure Compiler.
Try running the command as root, via `sudo`, or manually install by running:

curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/23cf67d0f0b979d97631fc108a2a43bb82225994 | tar xvz -C '/Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-requirejs/node_modules/grunt-lodashbuilder/node_modules/lodash/vendor'

Downloading UglifyJS...
There was a problem installing UglifyJS.
Try running the command as root, via `sudo`, or manually install by running:

curl -H 'Accept: application/vnd.github.v3.raw' https://api.github.com/repos/bestiejs/lodash/git/blobs/a934fb18f8fa2768c6a68de44b6e035fe96a268b | tar xvz -C '/Users/myusername/Desktop/projects/bbhandlebarstest/node_modules/grunt-requirejs/node_modules/grunt-lodashbuilder/node_modules/lodash/vendor'

npm http GET https://registry.npmjs.org/optimist/0.3.4
npm http GET https://registry.npmjs.org/aug/0.0.5
npm http GET https://registry.npmjs.org/combinations/0.1.0
npm http GET https://registry.npmjs.org/resistance/2.0.0alpha2
npm http 304 https://registry.npmjs.org/combinations/0.1.0
npm WARN package.json combinations@0.1.0 No readme data.
npm http 304 https://registry.npmjs.org/aug/0.0.5
npm http 304 https://registry.npmjs.org/resistance/2.0.0alpha2
npm http 304 https://registry.npmjs.org/optimist/0.3.4
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/wordwrap
connect-livereload@0.2.0 node_modules/connect-livereload

grunt-usemin@0.1.12 node_modules/grunt-usemin

grunt-rev@0.1.0 node_modules/grunt-rev

grunt-contrib-clean@0.4.0 node_modules/grunt-contrib-clean

grunt-contrib-concat@0.2.0 node_modules/grunt-contrib-concat

grunt-contrib-copy@0.4.1 node_modules/grunt-contrib-copy

grunt-open@0.2.0 node_modules/grunt-open
└── open@0.0.2

grunt-contrib-compass@0.2.0 node_modules/grunt-contrib-compass
├── tmp@0.0.16
└── grunt-lib-contrib@0.5.3 (zlib-browserify@0.0.1)

matchdep@0.1.2 node_modules/matchdep
└── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.0)

grunt-contrib-htmlmin@0.1.3 node_modules/grunt-contrib-htmlmin
├── html-minifier@0.5.2
└── grunt-lib-contrib@0.6.1 (zlib-browserify@0.0.1)

grunt-contrib-coffee@0.6.7 node_modules/grunt-contrib-coffee
└── coffee-script@1.6.3

grunt-contrib-cssmin@0.6.1 node_modules/grunt-contrib-cssmin
├── clean-css@1.0.10 (commander@1.1.1)
└── grunt-lib-contrib@0.6.1 (zlib-browserify@0.0.1)

grunt-contrib-watch@0.4.4 node_modules/grunt-contrib-watch
├── gaze@0.3.4 (minimatch@0.2.12, fileset@0.1.5)
└── tiny-lr@0.0.4 (debug@0.7.2, faye-websocket@0.4.4, noptify@0.0.3, qs@0.5.6)

grunt-contrib-connect@0.3.0 node_modules/grunt-contrib-connect
└── connect@2.7.11 (fresh@0.1.0, cookie-signature@1.0.1, pause@0.0.1, qs@0.6.5, bytes@0.2.0, buffer-crc32@0.2.1, cookie@0.0.5, debug@0.7.2, formidable@1.0.14, send@0.1.1)

grunt-contrib-uglify@0.2.2 node_modules/grunt-contrib-uglify
├── grunt-lib-contrib@0.6.1 (zlib-browserify@0.0.1)
└── uglify-js@2.3.6 (async@0.2.9, optimist@0.3.7, source-map@0.1.25)

grunt-contrib-handlebars@0.5.9 node_modules/grunt-contrib-handlebars
├── grunt-lib-contrib@0.5.3 (zlib-browserify@0.0.1)
└── handlebars@1.0.12 (optimist@0.3.7, uglify-js@2.3.6)

grunt-mocha@0.3.4 node_modules/grunt-mocha
├── grunt-lib-phantomjs@0.3.1 (semver@1.0.14, eventemitter2@0.4.12, temporary@0.0.5, phantomjs@1.9.1-0)
└── mocha@1.8.2 (growl@1.7.0, debug@0.7.2, commander@0.6.1, diff@1.0.2, mkdirp@0.3.3, ms@0.3.0, jade@0.26.3)

grunt@0.4.1 node_modules/grunt
├── which@1.0.5
├── dateformat@1.0.2-1.2.3
├── colors@0.6.0-1
├── hooker@0.2.3
├── async@0.1.22
├── eventemitter2@0.4.12
├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.0)
├── nopt@1.0.10 (abbrev@1.0.4)
├── rimraf@2.0.3 (graceful-fs@1.1.14)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.2)
├── coffee-script@1.3.3
├── underscore.string@2.2.0rc
├── iconv-lite@0.2.10
├── lodash@0.9.2
├── js-yaml@2.0.5 (esprima@1.0.3, argparse@0.1.15)
└── findup-sync@0.1.2 (lodash@1.0.1)

grunt-contrib-jshint@0.5.4 node_modules/grunt-contrib-jshint
└── jshint@2.0.1 (console-browserify@0.1.6, minimatch@0.2.12, underscore@1.4.4, shelljs@0.1.4, cli@0.4.4-2)

grunt-contrib-imagemin@0.1.4 node_modules/grunt-contrib-imagemin
├── filesize@1.7.9
├── optipng-bin@0.2.6 (which@1.0.5, colors@0.6.0-1, tar@0.1.17, mocha@1.9.0, request@2.16.6)
└── jpegtran-bin@0.1.7 (which@1.0.5, colors@0.6.0-1, tar@0.1.17, request@2.16.6, mocha@1.9.0)

bower@0.9.2 node_modules/bower
├── abbrev@1.0.4
├── stable@0.1.3
├── archy@0.0.2
├── colors@0.6.0-1
├── semver@1.1.4
├── nopt@2.0.0
├── tmp@0.0.20
├── mkdirp@0.3.5
├── rimraf@2.0.3 (graceful-fs@1.1.14)
├── async@0.2.9
├── fstream@0.1.22 (inherits@1.0.0, graceful-fs@1.2.2)
├── promptly@0.1.0 (read@1.0.4)
├── rc@0.0.8 (config-chain@0.3.4, optimist@0.3.7)
├── tar@0.1.17 (inherits@1.0.0, block-stream@0.0.6)
├── read-package-json@0.1.13 (lru-cache@2.0.4, slide@1.1.4, graceful-fs@1.2.2, npmlog@0.0.3)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.2, minimatch@0.2.12)
├── request@2.11.4
├── hogan.js@2.0.0
├── unzip@0.1.7 (setimmediate@1.0.1, readable-stream@1.0.2, pullstream@0.4.0, match-stream@0.0.1, binary@0.3.0)
├── lodash@1.0.1
└── update-notifier@0.1.3 (request@2.12.0, configstore@0.1.2)

grunt-bower-requirejs@0.4.4 node_modules/grunt-bower-requirejs
└── requirejs@2.1.6

grunt-requirejs@0.3.5 node_modules/grunt-requirejs
├── temp@0.4.0
├── almond@0.2.5
├── q@0.8.12
├── gzip-js@0.3.2 (crc32@0.2.2, deflate-js@0.2.3)
├── cheerio@0.10.8 (entities@0.3.0, underscore@1.4.4, htmlparser2@2.6.0, cheerio-select@0.0.3)
├── requirejs@2.1.6
├── grunt-backbonebuilder@0.1.4 (backbone@0.9.10, grunt@0.3.17)
├── domino@1.0.11
├── grunt-lodashbuilder@0.1.7 (semver@1.1.4, wrench@1.4.4, uglify-js@1.3.4, grunt-contrib-jshint@0.1.1, grunt-contrib-watch@0.2.0, lodash@1.3.1, grunt-contrib-nodeunit@0.1.2, node-minify@0.6.1)
└── grunt-jquerybuilder@0.1.4 (grunt-contrib-watch@0.2.0, grunt-contrib-jshint@0.1.1, grunt-contrib-nodeunit@0.1.2, jquery-builder@0.1.0)
  bbhandlebarstest

Problems

There was a problem installing the Closure Compiler.
There was a problem installing UglifyJS.

Creating a view

  bbhandlebarstest  yo backbone:view main
   create app/scripts/templates/main.hbs
   create app/scripts/views/main-view.js
  bbhandlebarstest

Compile with grunt

  bbhandlebarstest  grunt --force
Running "jshint:all" (jshint) task
Linting Gruntfile.js...ERROR
[L56:C14] W070: Extra comma. (it breaks older versions of IE)
            },
Linting app/scripts/main.js...ERROR
[L15:C10] W070: Extra comma. (it breaks older versions of IE)
        },
Linting app/scripts/main.js...ERROR
[L20:C68] W070: Extra comma. (it breaks older versions of IE)
        underscore: '../bower_components/underscore-amd/underscore',
Linting app/scripts/views/main-view.js...ERROR
[L7:C16] W070: Extra comma. (it breaks older versions of IE)
    'templates',

Warning: Task "jshint:all" failed. Used --force, continuing.

Running "clean:server" (clean) task

Running "coffee:dist" (coffee) task

Running "coffee:test" (coffee) task

Running "createDefaultTemplate" task

Running "handlebars:compile" (handlebars) task
File ".tmp/scripts/templates.js" created.

Running "compass:dist" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "compass:server" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "connect:test" (connect) task
Started connect web server on localhost:9000.

Running "mocha:all" (mocha) task
Testing: http://localhost:9000/index.html

  

  1 test complete (105 ms)

>> 1 passed! (0.10s)

Running "clean:dist" (clean) task
Cleaning ".tmp"...OK

Running "coffee:dist" (coffee) task

Running "coffee:test" (coffee) task

Running "createDefaultTemplate" task

Running "handlebars:compile" (handlebars) task
File ".tmp/scripts/templates.js" created.

Running "compass:dist" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "useminPrepare:html" (useminPrepare) task
Going through app/index.html to update the config
Looking for build script HTML comment blocks

Found a block:
        <!-- build:js scripts/vendor/modernizr.js -->
        <script src="bower_components/modernizr/modernizr.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - app/bower_components/modernizr/modernizr.js

Found a block:
        <!-- build:js scripts/main.js -->
        <script data-main="scripts/main" src="bower_components/requirejs/require.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - dist/scripts/main.js

Configuration is now:

  cssmin:
  { dist:
   { files:
      { '<%= yeoman.dist %>/styles/main.css':
         [ '.tmp/styles/{,*/}*.css',
           'app/styles/{,*/}*.css' ] } } }

  concat:
  { 'dist/scripts/vendor/modernizr.js': [ 'app/bower_components/modernizr/modernizr.js' ],
  'dist/scripts/main.js': [ 'dist/scripts/main.js' ] }

  uglify:
  { 'dist/scripts/vendor/modernizr.js': 'dist/scripts/vendor/modernizr.js',
  'dist/scripts/main.js': 'dist/scripts/main.js',
  'dist/bower_components/requirejs/require.js': 'app/bower_components/requirejs/require.js' }

  requirejs:
  { dist:
   { options:
      { baseUrl: 'app/scripts',
        optimize: 'none',
        paths: { templates: '../../.tmp/scripts/templates' },
        preserveLicenseComments: false,
        useStrict: true,
        wrap: true,
        name: 'main',
        out: 'dist/scripts/main.js',
        mainConfigFile: 'app/scripts/main.js' } } }

Running "requirejs:dist" (requirejs) task
>> RequireJS optimizer finished
Uncompressed size: 370209 bytes.
Compressed size: 107817 bytes gzipped.

Running "imagemin:dist" (imagemin) task

Running "htmlmin:dist" (htmlmin) task
File dist/404.html created.
File dist/index.html created.

Running "concat:dist/scripts/vendor/modernizr.js" (concat) task
File "dist/scripts/vendor/modernizr.js" created.

Running "concat:dist/scripts/main.js" (concat) task
File "dist/scripts/main.js" created.

Running "cssmin:dist" (cssmin) task
File dist/styles/main.css created.

Running "uglify:dist/scripts/vendor/modernizr.js" (uglify) task
File "dist/scripts/vendor/modernizr.js" created.

Running "uglify:dist/scripts/main.js" (uglify) task
File "dist/scripts/main.js" created.

Running "uglify:dist/bower_components/requirejs/require.js" (uglify) task
File "dist/bower_components/requirejs/require.js" created.

Running "copy:dist" (copy) task
Copied 3 files

Running "rev:dist" (rev) task
dist/scripts/main.js >> 8b987324.main.js
dist/scripts/vendor/modernizr.js >> f7f27360.modernizr.js
dist/styles/main.css >> b31ab1a2.main.css

Running "usemin:html" (usemin) task

Processing as HTML - dist/404.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Processing as HTML - dist/index.html
Update the HTML to reference our concat/min/revved script files
<script src="scripts/vendor/modernizr.js" changed to <script src="scripts/vendor/f7f27360.modernizr.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="styles/main.css" changed to <link rel="stylesheet" href="styles/b31ab1a2.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
data-main="scripts/main.js" changed to data-main="scripts/8b987324.main"
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Running "usemin:css" (usemin) task

Processing as CSS - dist/styles/b31ab1a2.main.css
Update the CSS with new img filenames

Done, but with warnings.
➜  bbhandlebarstest

So far it seems "OK"

Change main.js to require MainView

from:

require([
    'backbone'
], function (Backbone) {
    Backbone.history.start();
});

to:

require([
    'backbone',
    'views/main-view'
], function (Backbone, MainView) {
    Backbone.history.start();
});

Compile again:

  bbhandlebarstest  grunt --force
Running "jshint:all" (jshint) task
Linting Gruntfile.js...ERROR
[L56:C14] W070: Extra comma. (it breaks older versions of IE)
            },
Linting app/scripts/main.js...ERROR
[L15:C10] W070: Extra comma. (it breaks older versions of IE)
        },
Linting app/scripts/main.js...ERROR
[L20:C68] W070: Extra comma. (it breaks older versions of IE)
        underscore: '../bower_components/underscore-amd/underscore',
Linting app/scripts/main.js...ERROR
[L27:C32] W098: 'MainView' is defined but never used.
], function (Backbone, MainView) {
Linting app/scripts/views/main-view.js...ERROR
[L7:C16] W070: Extra comma. (it breaks older versions of IE)
    'templates',

Warning: Task "jshint:all" failed. Used --force, continuing.

Running "clean:server" (clean) task
Cleaning ".tmp"...OK

Running "coffee:dist" (coffee) task

Running "coffee:test" (coffee) task

Running "createDefaultTemplate" task

Running "handlebars:compile" (handlebars) task
File ".tmp/scripts/templates.js" created.

Running "compass:dist" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "compass:server" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "connect:test" (connect) task
Started connect web server on localhost:9000.

Running "mocha:all" (mocha) task
Testing: http://localhost:9000/index.html

  

  1 test complete (109 ms)

>> 1 passed! (0.11s)

Running "clean:dist" (clean) task
Cleaning ".tmp"...OK
Cleaning "dist/404.html"...OK
Cleaning "dist/bower_components"...OK
Cleaning "dist/favicon.ico"...OK
Cleaning "dist/index.html"...OK
Cleaning "dist/robots.txt"...OK
Cleaning "dist/scripts"...OK
Cleaning "dist/styles"...OK

Running "coffee:dist" (coffee) task

Running "coffee:test" (coffee) task

Running "createDefaultTemplate" task

Running "handlebars:compile" (handlebars) task
File ".tmp/scripts/templates.js" created.

Running "compass:dist" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "useminPrepare:html" (useminPrepare) task
Going through app/index.html to update the config
Looking for build script HTML comment blocks

Found a block:
        <!-- build:js scripts/vendor/modernizr.js -->
        <script src="bower_components/modernizr/modernizr.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - app/bower_components/modernizr/modernizr.js

Found a block:
        <!-- build:js scripts/main.js -->
        <script data-main="scripts/main" src="bower_components/requirejs/require.js"></script>
        <!-- endbuild -->
Updating config with the following assets:
    - dist/scripts/main.js

Configuration is now:

  cssmin:
  { dist:
   { files:
      { '<%= yeoman.dist %>/styles/main.css':
         [ '.tmp/styles/{,*/}*.css',
           'app/styles/{,*/}*.css' ] } } }

  concat:
  { 'dist/scripts/vendor/modernizr.js': [ 'app/bower_components/modernizr/modernizr.js' ],
  'dist/scripts/main.js': [ 'dist/scripts/main.js' ] }

  uglify:
  { 'dist/scripts/vendor/modernizr.js': 'dist/scripts/vendor/modernizr.js',
  'dist/scripts/main.js': 'dist/scripts/main.js',
  'dist/bower_components/requirejs/require.js': 'app/bower_components/requirejs/require.js' }

  requirejs:
  { dist:
   { options:
      { baseUrl: 'app/scripts',
        optimize: 'none',
        paths: { templates: '../../.tmp/scripts/templates' },
        preserveLicenseComments: false,
        useStrict: true,
        wrap: true,
        name: 'main',
        out: 'dist/scripts/main.js',
        mainConfigFile: 'app/scripts/main.js' } } }

Running "requirejs:dist" (requirejs) task
>> Error: Error: ENOENT, no such file or directory '/Users/myusername/Desktop/projects/bbhandlebarstest/app/scripts/handlebars.js'
>> In module tree:
>>     main
>>       views/main-view
>>         templates
>>
>>     at Object.fs.openSync (fs.js:427:18)
Warning: Task "requirejs:dist" failed. Used --force, continuing.

Running "imagemin:dist" (imagemin) task

Running "htmlmin:dist" (htmlmin) task
File dist/404.html created.
File dist/index.html created.

Running "concat:dist/scripts/vendor/modernizr.js" (concat) task
File "dist/scripts/vendor/modernizr.js" created.

Running "concat:dist/scripts/main.js" (concat) task
File "dist/scripts/main.js" created.

Running "cssmin:dist" (cssmin) task
File dist/styles/main.css created.

Running "uglify:dist/scripts/vendor/modernizr.js" (uglify) task
File "dist/scripts/vendor/modernizr.js" created.

Running "uglify:dist/scripts/main.js" (uglify) task
File "dist/scripts/main.js" created.

Running "uglify:dist/bower_components/requirejs/require.js" (uglify) task
File "dist/bower_components/requirejs/require.js" created.

Running "copy:dist" (copy) task
Copied 3 files

Running "rev:dist" (rev) task
dist/scripts/main.js >> d41d8cd9.main.js
dist/scripts/vendor/modernizr.js >> f7f27360.modernizr.js
dist/styles/main.css >> b31ab1a2.main.css

Running "usemin:html" (usemin) task

Processing as HTML - dist/404.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Processing as HTML - dist/index.html
Update the HTML to reference our concat/min/revved script files
<script src="scripts/vendor/modernizr.js" changed to <script src="scripts/vendor/f7f27360.modernizr.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="styles/main.css" changed to <link rel="stylesheet" href="styles/b31ab1a2.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
data-main="scripts/main.js" changed to data-main="scripts/d41d8cd9.main"
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Running "usemin:css" (usemin) task

Processing as CSS - dist/styles/b31ab1a2.main.css
Update the CSS with new img filenames

Done, but with warnings.
➜  bbhandlebarstest

Problems

handlebars.js is missing.

Running "requirejs:dist" (requirejs) task
>> Error: Error: ENOENT, no such file or directory '/Users/myusername/Desktop/projects/bbhandlebarstest/app/scripts/handlebars.js'
>> In module tree:
>>     main
>>       views/main-view
>>         templates
>>
>>     at Object.fs.openSync (fs.js:427:18)
Warning: Task "requirejs:dist" failed. Used --force, continuing.

Also with this last compile the d41d8cd9.main.js is completely empty.

Multiple jshint errors from default install in yo 1.x

Hi,

I know that this generator isn't currently ready for production, but guess that an issue should be opened for this. The generator as it stands does not create a project that can be built with grunt without failing the jshint task.

There are a couple things:

  1. There are multiple indentation errors in Gruntfile.js, I guess this is because its generated expecting an indent of 2, whereas the default .jshintrc is created with an indent of 4.
    • These aren't all fixed by setting the indent to 2, there are a couple of other misindented lines at the end of the requirejs section.
  2. app/scripts/main.js has a couple of indentation errors in the requirejs section too:
    • underscore needs one extra preceding space.
    • jquery needs two extra preceding spaces.
  3. jshint also complains that Backbone is unused in the main function.
  4. app/scripts/templates.js uses doublequotes when the created .jshintrc specifies singlequotes
  5. jshint also complains app/scripts/templates.js should use dot notation for: this["JST"]

Thanks for all your work tho. I'll have a look to see if I can divine a way to fix these - but I'm not au fait with how yeoman actually works.

--test-framework=jasmine Incorrect jasmine task configuration

I've noticed after a clean build using the generator using

yo backbone --test-framework=jasmine
Bootstrap - Yes
RequireJS - No

It doesn't hang like the above for me but after all the bower installs i run grunt test

and the output is

Running "jasmine:all" (jasmine) task
Testing jasmine specs via phantom

0 specs in 0.001s.
>> 0 failures
yo --version  => 1.0.0-rc.1.1
yo backbone --version => 1.0.0-rc.1.1
node -v => v0.11.3
bower -v => v0.10.0
grunt --version
grunt-cli v0.1.9
grunt v0.4.1

When i look at the grunt tasks I see this :

jasmine: {
            all: {
                options: {
                    run: true,
                    urls: ['http://localhost:9000/index.html'] //NOTE i've hardcoded port because markdown stipped out templated bit...
                }
            }
        },

I'm not anything close to experienced, but i couldn't see anything in the grunt-contrib-jasmine git about the option for 'urls' or setting it up this way..this looks more like the standard mocha grunt setup

The only way i've made it work was to put this

jasmine: {
            all: {
        src:'.tmp/scripts/**/*.js',
                options: {
                    run: true,
                    keepRunner:true,
            vendor:[
            'test/bower_components/jquery/jquery.js',
            'test/bower_components/underscore/underscore.js',
            'test/bower_components/backbone/backbone.js',
            'test/bower_components/handlebars/handlebars.js'
            ],
            
                    specs: 'test/spec/**/*.js',
                //helpers: './test/helper/**/*.js',
                }
            }
        },

Was there a better way? Did i miss something obvious? This builds the testRunner.html which as the files i want in it, although it would be nice if i could use something like the original setup the backbone generator was going for, where i guess it traverses the html test files and runs them via PhantomJS.

I have a full source example of whats working right now here if it helps...
https://github.com/KevCJones/yo-backbone-handlebars-personalsetup/tree/jasminefoundation

Additional jshint options for tests

When I have something like that in my tests expect(MyApp.Models.PostModel).to.exist; I get a "W030: Expected an assignment or function call and instead saw an expression." warning from jshint. Since the generator defaults to the expect assertion style, It would be nice to enable the expr option for files inside the spec directory, or enable this option on top of the generated test.js file.

Also, I needed to add expect to jshint globals.

I run the generator opting out of require.js, if it helps.

Using backbone plugins

Is there some secret to using shimmed scripts? I've re-opened this issue because the problem seems to be related to the generator's use of backbone-amd. Including anything that depends on backbone, and that requires a shim results in an error:

Uncaught ReferenceError: Backbone is not defined main.js:4

My shims look like:

    backbone: {
        deps: [
            'underscore',
            'jquery'
        ],
        exports: 'Backbone'
    },
    'backbone-plugin' : {
        deps : [
            'jquery',
            'underscore',
            'backbone'
        ],
        exports : 'Backbone'
    },

The only way I've found to get around this problem is to edit the plugins by adding a define wrapper, eg:

define(['jquery', 'underscore', 'backbone'], function ($, _, Backbone) {
  // regular plugin which depends on a global Backbone
  return {};
});

This seems like a rather heavy handed work-around

CSS Minification breaks CSS File order

I have build a template block in my index.html.

<!-- build:css styles/main.css -->
    <link rel="stylesheet"  href="styles/bootstrap.css">
    <link rel="stylesheet" href="styles/bootstrap-responsive.css">
    <!-- Loading Flat UI -->
    <link rel="stylesheet" href="styles/flat-ui.css">
    <link rel="stylesheet" href="styles/custom.css">
    <!-- endbuild -->

This should concat and minify the css files in the given order to one main.css File.

But it seems, that the cssmin task is changing the order.
When disabeling the cssmin task and looking at the concated file everything is alright.

But the minified main.css is in the wrong order. I have checked for the right order by but putting comments in each css file, as these are appearing on their own line.
In the minified css file the order is like this:

  1. Bootstrap Responsive v2.3.2
  2. Bootstrap v2.3.2
  3. custom.css
  4. flat-ui.css

The output of grunt build shows that the cssmin task has the following configuration:

cssmin:
  { dist: 
   { files: 
      { '<%= yeoman.dist %>/styles/main.css': 
         [ '.tmp/styles/{,*/}*.css',
           'app/styles/{,*/}*.css' ] } },
  'dist/styles/main.css': 'dist/styles/main.css' }

Am I missing something or is this a bug?

Bad uglify config using JST

I'm using the backbone generator with JST template framework. My app is structured with multiples js files. They are added like that in index.html :

<script src="scripts/templates.js"></script>
<script src="scripts/raf.js"></script>
<script src="scripts/models/models.js"></script>
<script src="scripts/collections/collections.js"></script>
<script src="scripts/views/views.js"></script>
<script src="scripts/routers/routers.js"></script>
<script src="scripts/main.js"></script>

The problem is that when the app is build, the uglify task adds the content of main.js first, then all my others js files and finally, at the end of the main.js generated file, the templates.js content (the JST object). This way to concat files generates an error because my views can't access the JST object.

To make it works I edited the uglify task like (I just put the templates.js first) :

uglify: {
            dist: {
                files: {
                    '<%= yeoman.dist %>/scripts/main.js': [
                        '.tmp/scripts/templates.js',
                        '<%= yeoman.app %>/scripts/{,*/}*.js'
                    ],
                }
            }
        },

Don't know if i'm clear enough neither if i'm in a "general use case". Hope this could help.

problem on vendor.js after build

Hi, i have had some probems on my JS after BUILD, i have resolved a few but i have a problem with the vendor libraries (underscore, backbone), this is my html

 <script src="bower_components/underscore/underscore-min.js"></script>
 <script src="bower_components/backbone/backbone-min.js"></script>

i already tried with the non-min version and i have the same problem, this is what i see on the console http://d.pr/7yKN

on dev (app) works perfect, also i'm using strict mode for my own files.
what can i do to fix this? regards

Running with `--test-framework=jasmine` causes generation to fail

The command I'm running:

yo backbone:all --test-framework=jasmine --skip-install

Produces this output:

lindsey:~/P/yo $ yo backbone:all --test-framework=jasmine --skip-install
   create app/scripts/models
   create app/scripts/collections
   create app/scripts/views
   create app/scripts/routes
   create app/scripts/helpers
   create app/scripts/templates
   invoke   backbone:app:/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/all/index.js

     _-----_
    |       |
    |--(o)--|   .--------------------------.
   `---------´  |    Welcome to Yeoman,    |
    ( _´U`_ )   |   ladies and gentlemen!  |
    /___A___\   '__________________________'
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

Out of the box I include HTML5 Boilerplate, jQuery, Backbone.js and Modernizr.
Would you like to include Twitter Bootstrap for Sass? (Y/n)
Would you like to include RequireJS (for AMD support)? (Y/n)
   create     .gitignore
   create     .gitattributes
   create     .bowerrc
   create     bower.json
   create     .jshintrc
   create     .editorconfig
   create     Gruntfile.js
   create     package.json
   create     app/styles/main.scss
   create     app/scripts/vendor/bootstrap.js
   create     app/404.html
   create     app/favicon.ico
   create     app/robots.txt
   create     app/.htaccess
   create     app/index.html
   create     app/scripts/main.js
   invoke       jasmine:app
   create         test/bower.json
   create         test/.bowerrc
   create         test/spec/test.js
   create         test/index.html


I'm all done. Running bower install for you to install the required dependencies. If this fails, try running the command yourself.


   invoke   backbone:router:/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/all/index.js

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/Users/lindsey/Projects/yo/test/app/scripts/main.js'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.readFileSync (fs.js:284:15)
    at Generator.read (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/actions/actions.js:110:13)
    at Generator.isUsingRequireJS (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/script-base.js:57:40)
    at Generator.createControllerFiles (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/router/index.js:22:30)
    at next (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:275:18)
    at Generator.run (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:289:4)
    at Generator.invoke (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/actions/invoke.js:49:20)
    at next (/Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:317:10)
    at /Users/lindsey/Developer/.nvm/v0.10.12/lib/node_modules/generator-backbone/node_modules/yeoman-generator/lib/base.js:322:7
lindsey:~/P/yo $ bower cloning git://github.com/pivotal/jasmine.git
bower cached git://github.com/pivotal/jasmine.git
bower fetching jasmine
bower checking out jasmine#v1.3.1
bower copying /Users/lindsey/.bower/cache/jasmine/a27740853ec01f620c6cbe3c89c9280e
bower installing jasmine#1.3.1

It just hangs at the last installing and I have to ctrl-c to exit.

Running without --skip-install also produces the same output.

Versions 'n whatnot:

lindsey:~/P/yo $ node --version
v0.10.12
lindsey:~/P/yo $ bower --version
0.9.2

Appname

When creating a new app and passing in an appname the namespace remains backbone

yeoman: 1.0.0-rc.1.1
node: v0.10.5
generator-backbone: latest master

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.