@@ -21,34 +21,35 @@ var yeoman = {
2121
2222var paths = {
2323 client : {
24- scripts : [ yeoman . app + '/scripts/**/*.<% if(filters.coffee) { %>coffee<% } else { %>js<% } %>' ] ,
25- styles : [ yeoman . app + '/styles/**/*.<% if(filters.stylus) { %>styl<% } else if (filters.sass) { %>scss<% } else { %>css<% } %>' ] ,
26- test : [ 'test/client/**/*.<% if(filters.coffee) { %>coffee<% } else { %>js<% } %>' ] ,
24+ scripts : [
25+ 'client/**/*.<% if(filters.coffee) { %>coffee<% } else { %>js<% } %>' ,
26+ '!client/bower_components/**/*.js'
27+ ] ,
28+ styles : [ 'client/**/*.<% if(filters.stylus) { %>styl<% } else if (filters.sass) { %>scss<% } else { %>css<% } %>' ] ,
29+ test : [ 'client/**/*.spec.<% if(filters.coffee) { %>coffee<% } else { %>js<% } %>' ] ,
2730 testRequire : [
28- yeoman . app + '/bower_components/angular/angular.js' ,
29- yeoman . app + '/bower_components/angular-mocks/angular-mocks.js' ,
30- yeoman . app + '/bower_components/angular-resource/angular-resource.js' ,
31- yeoman . app + '/bower_components/angular-cookies/angular-cookies.js' ,
32- yeoman . app + '/bower_components/angular-sanitize/angular-sanitize.js' ,
33- yeoman . app + '/bower_components/angular-route/angular-route.js' , < % if ( filters . coffee ) { % >
34- 'test/mock/**/*.coffee' ,
35- 'test/spec/**/*.coffee' < % } else { % >
36- 'test/mock/**/*.js' ,
37- 'test/spec/**/*.js' < % } % >
31+ 'client/bower_components/angular/angular.js' ,
32+ 'client/bower_components/angular-mocks/angular-mocks.js' ,
33+ 'client/bower_components/angular-resource/angular-resource.js' ,
34+ 'client/bower_components/angular-cookies/angular-cookies.js' ,
35+ 'client/bower_components/angular-sanitize/angular-sanitize.js' ,
36+ 'client/bower_components/angular-route/angular-route.js' , < % if ( filters . coffee ) { % >
37+ 'client/**/*.spec.coffee' < % } else { % >
38+ 'client/**/*.spec.js' < % } % >
3839 ]
3940 } ,
4041 server : { < % if ( filters . coffee ) { % >
41- scripts : [ 'lib /**/*.coffee' ] ,
42- test : [ 'test/ server/**/*.coffee' ] , < % } else { % >
43- scripts : [ 'lib /**/*.js' ] ,
44- test : [ 'test/ server/**/*.js' ] , < % } % >
42+ scripts : [ 'server /**/*.coffee' ] ,
43+ test : [ 'server/**/*.spec .coffee' ] , < % } else { % >
44+ scripts : [ 'server /**/*.js' ] ,
45+ test : [ 'server/**/*.spec .js' ] , < % } % >
4546
4647 } ,
4748 views : { < % if ( filters . jade ) { % >
48- main : yeoman . app + '/views /index.jade',
49- files : [ yeoman . app + '/views /**/*.jade'] < % } else { % >
50- main : yeoman . app + '/views /index.html',
51- files : [ yeoman . app + '/views /**/*.html'] < % } % >
49+ main : 'client/app /index.jade',
50+ files : [ 'client/app /**/*.jade'] < % } else { % >
51+ main : 'client/app /index.html',
52+ files : [ 'client/app /**/*.html'] < % } % >
5253 } ,
5354 karma : 'karma.conf.js'
5455} ;
@@ -101,10 +102,7 @@ var styles = lazypipe()<% if(filters.stylus) { %>
101102 use : [ nib ( ) ] ,
102103 errors : true
103104 } ) < % } % > < % if ( filters . sass ) { % >
104- . pipe ( plugins . rubySass , {
105- style : 'expanded' ,
106- precision : 10
107- } ) < % } % >
105+ . pipe ( plugins . rubySass , paths . client . styles ) < % } % >
108106 . pipe ( plugins . autoprefixer , 'last 1 version' )
109107 . pipe ( gulp . dest , '.tmp/styles' ) ;
110108
@@ -113,8 +111,7 @@ var styles = lazypipe()<% if(filters.stylus) { %>
113111///////////
114112
115113gulp . task ( 'styles' , function ( ) {
116- return gulp . src ( paths . client . styles )
117- . pipe ( styles ( ) ) ;
114+ return styles ( ) ;
118115} ) ; < % if ( filters . coffee ) { % >
119116
120117gulp . task ( 'coffee' , function ( ) {
@@ -142,31 +139,31 @@ gulp.task('start:client', [<% if(filters.coffee) { %>'coffee', <% } %>'styles'],
142139
143140gulp.task('start:server', function () {
144141 process . env . NODE_ENV = process . env . NODE_ENV || 'development' ;
145- config = require ( './lib /config/config ' ) ;
146- nodemon ( '-w lib server.js' )
142+ config = require ( './server /config/environment ' ) ;
143+ nodemon ( '-w lib server/app .js' )
147144 . on ( 'log' , onServerLog ) ;
148145} );
149146
150147gulp.task('watch', function () {
151148 var testFiles = paths . client . test . concat ( paths . server . test ) ;
152149
153- plugins . watch ( { glob : paths . client . styles } )
150+ plugins . watch ( paths . client . styles )
154151 . pipe ( plugins . plumber ( ) )
155152 . pipe ( styles ( ) )
156153 . pipe ( plugins . livereload ( ) ) ;
157154
158- plugins . watch ( { glob : paths . views . files } )
155+ plugins . watch ( paths . views . files )
159156 . pipe ( plugins . plumber ( ) )
160157 . pipe ( plugins . livereload ( ) ) ;
161158
162- plugins . watch ( { glob : paths . client . scripts } )
159+ plugins . watch ( paths . client . scripts )
163160 . pipe ( plugins . plumber ( ) )
164161 . pipe ( lintScripts ( ) ) < % if ( filters . coffee ) { % >
165162 . pipe ( plugins . coffee ( { bare : true } ) . on ( 'error' , plugins . util . log ) )
166163 . pipe ( gulp . dest ( '.tmp/scripts' ) ) < % } %>
167164 . pipe ( plugins . livereload ( ) ) ;
168165
169- plugins . watch ( { glob : paths . server . scripts . concat ( testFiles ) } )
166+ plugins . watch ( paths . server . scripts . concat ( testFiles ) )
170167 . pipe ( plugins . plumber ( ) )
171168 . pipe ( lintScripts ( ) ) ;
172169
0 commit comments