diff --git a/generators/app/index.js b/generators/app/index.js index 5505152f..f43dcd83 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -1,6 +1,7 @@ +"use strict"; + var yeoman = require( "yeoman-generator" ); var yosay = require( "yosay" ); -var path = require( "path" ); // Get the current running directory name @@ -78,7 +79,7 @@ module.exports = yeoman.generators.Base.extend( this.bootstrap = props.bootstrap; this.ie8 = props.ie8; this.multiLanguage = props.multiLanguage; - this.demo = props.demo + this.demo = props.demo; callback(); }.bind( this ) ); diff --git a/generators/collection/index.js b/generators/collection/index.js index b96e76ee..16ee4a87 100644 --- a/generators/collection/index.js +++ b/generators/collection/index.js @@ -1,6 +1,7 @@ +"use strict"; + var yeoman = require( "yeoman-generator" ) , yosay = require( "yosay" ) -, path = require( 'path' ) , varname = require( "varname" ) , fs = require( "fs" ) ; @@ -8,7 +9,6 @@ var yeoman = require( "yeoman-generator" ) // Get the current running directory name // var fullPath = process.cwd() -, folderName = fullPath.split( '/' ).pop() , rootLocation = fullPath ; @@ -87,7 +87,7 @@ module.exports = yeoman.generators.Base.extend( , { type: "confirm" , name: "singleton" - , message: 'Should this collection be a singleton?' + , message: "Should this collection be a singleton?" , default: false } ]; @@ -166,4 +166,4 @@ module.exports = yeoman.generators.Base.extend( } ); } } -} ); \ No newline at end of file +} ); diff --git a/generators/model/index.js b/generators/model/index.js index 33859de1..6d4e021b 100644 --- a/generators/model/index.js +++ b/generators/model/index.js @@ -1,6 +1,7 @@ +"use strict"; + var yeoman = require( "yeoman-generator" ) , yosay = require( "yosay" ) -, path = require( 'path' ) , varname = require( "varname" ) , fs = require( "fs" ) ; @@ -8,7 +9,6 @@ var yeoman = require( "yeoman-generator" ) // Get the current running directory name // var fullPath = process.cwd() -, folderName = fullPath.split( '/' ).pop() , rootLocation = fullPath ; @@ -112,7 +112,7 @@ module.exports = yeoman.generators.Base.extend( , { type: "confirm" , name: "singleton" - , message: 'Should this model be a singleton?' + , message: "Should this model be a singleton?" , default: false } ]; @@ -140,4 +140,4 @@ module.exports = yeoman.generators.Base.extend( this.template( "model.coffee", "src/models/" + this.fileName + ".coffee" ); } -} ); \ No newline at end of file +} ); diff --git a/generators/view/index.js b/generators/view/index.js index aa1fc704..fea9d4e5 100644 --- a/generators/view/index.js +++ b/generators/view/index.js @@ -1,6 +1,7 @@ +"use strict"; + var yeoman = require( "yeoman-generator" ) , yosay = require( "yosay" ) -, path = require( "path" ) , varname = require( "varname" ) , fs = require( "fs" ) ; @@ -8,7 +9,6 @@ var yeoman = require( "yeoman-generator" ) // Get the current running directory name // var fullPath = process.cwd() -, folderName = fullPath.split( '/' ).pop() , rootLocation = fullPath ; @@ -21,7 +21,7 @@ module.exports = yeoman.generators.Base.extend( determineRoot: function() { var callback = this.async() - , rootFound = false + , rootFound = false , tries = 0 ; @@ -34,17 +34,17 @@ module.exports = yeoman.generators.Base.extend( var previousLocation = rootLocation.split( "/" ); // Pop the last folder from the path - // + // previousLocation.pop(); // Create the new path and open it // rootLocation = previousLocation.join( "/" ); - + // Change the process location // process.chdir( rootLocation ); - + // Check if we found the project root, up the counter // we should stop looking some time..... // @@ -54,7 +54,7 @@ module.exports = yeoman.generators.Base.extend( // If we couldn't find the root, let the user know and exit the proces... // - if( rootFound == false ) + if( rootFound === false ) { yeoman.log( "Failed to find root of the project, check that you are somewhere within your project." ); process.exit(); @@ -66,7 +66,7 @@ module.exports = yeoman.generators.Base.extend( , askSomeQuestions: function () { - // This is async + // This is async // var callback = this.async(); @@ -102,10 +102,10 @@ module.exports = yeoman.generators.Base.extend( { this.viewName = props.viewName; this.description = props.description; - + // Convert the filename to dashes instead of camel casing // - this.fileName = varname.dash( this.viewName ) + this.fileName = varname.dash( this.viewName ); // Classnames are uppercase by convention // @@ -122,7 +122,7 @@ module.exports = yeoman.generators.Base.extend( }.bind( this ) ); } -, createView: function( obj ) +, createView: function () { // Create the views coffee file and handlebars template file // @@ -145,7 +145,7 @@ module.exports = yeoman.generators.Base.extend( // for the newly created sass file // var views = this.readFileAsString( "src/sass/_views.sass" ) - , insert = '@import "views/_' + this.fileName + '"'; + , insert = "@import \"views/_" + this.fileName + "\""; // Check if there isn't already in import for this file // just in case.... @@ -156,4 +156,4 @@ module.exports = yeoman.generators.Base.extend( } } } -} ); \ No newline at end of file +} );