@@ -384,12 +384,29 @@ function appendFilesToJade(jadeOrOptions, fileType, optimizedPath, sourceFileLis
384384 return updatedContent ;
385385}
386386
387+ Generator . prototype . navBarScript = function navBarScript ( ) {
388+ var ext = 'js' ;
389+ var folder = 'javascript' ;
390+ var minsafe = '' ;
391+
392+ if ( this . env . options . coffee ) {
393+ ext = 'coffee' ;
394+ folder = 'coffeescript' ;
395+ }
396+
397+ if ( this . env . options . minsafe ) {
398+ minsafe = '-min' ;
399+ }
400+
401+ this . copy ( '../../templates/' + folder + minsafe + '/navbar.' + ext , 'app/scripts/controllers/navbar.' + ext ) ;
402+ } ;
403+
387404Generator . prototype . appJs = function appJs ( ) {
388405 var appendOptions = {
389406 html : this . indexFile ,
390407 fileType : 'js' ,
391408 optimizedPath : 'scripts/scripts.js' ,
392- sourceFileList : [ 'scripts/app.js' , 'scripts/controllers/main.js' ] ,
409+ sourceFileList : [ 'scripts/app.js' , 'scripts/controllers/main.js' , 'scripts/controllers/navbar.js' ] ,
393410 searchPath : [ '.tmp' , 'app' ]
394411 } ;
395412 if ( this . jade ) {
@@ -410,13 +427,15 @@ Generator.prototype.createIndex = function createIndex() {
410427Generator . prototype . addJadeViews = function addHtmlJade ( ) {
411428 if ( this . jade ) {
412429 this . copy ( '../../templates/views/jade/partials/main.jade' , 'app/views/partials/main.jade' ) ;
430+ this . copy ( '../../templates/views/jade/partials/navbar.jade' , 'app/views/partials/navbar.jade' ) ;
413431 this . copy ( '../../templates/views/jade/404.jade' , 'app/views/404.jade' ) ;
414432 }
415433} ;
416434
417435Generator . prototype . addHtmlViews = function addHtmlViews ( ) {
418436 if ( ! this . jade ) {
419437 this . copy ( '../../templates/views/html/partials/main.html' , 'app/views/partials/main.html' ) ;
438+ this . copy ( '../../templates/views/html/partials/navbar.html' , 'app/views/partials/navbar.html' ) ;
420439 this . copy ( '../../templates/views/html/404.html' , 'app/views/404.html' ) ;
421440 }
422441} ;
0 commit comments