@@ -16,8 +16,7 @@ var plugins = gulpLoadPlugins();
1616var config ;
1717
1818var yeoman = {
19- app : require ( './bower.json' ) . appPath || 'app' ,
20- dist : 'dist'
19+ app : require ( './bower.json' ) . appPath || 'client/app'
2120} ;
2221
2322var paths = {
@@ -37,7 +36,8 @@ var paths = {
3736 'client/bower_components/angular-route/angular-route.js' , < % if ( filters . coffee ) { % >
3837 'client/**/*.spec.coffee' < % } else { % >
3938 'client/**/*.spec.js' < % } % >
40- ]
39+ ] ,
40+ bower : 'client/bower_components/'
4141 } ,
4242 server : { < % if ( filters . coffee ) { % >
4343 scripts : [ 'server/**/*.coffee' ] ,
@@ -47,12 +47,13 @@ var paths = {
4747
4848 } ,
4949 views : { < % if ( filters . jade ) { % >
50- main : 'client/app/ index.jade' ,
50+ main : 'client/index.jade' ,
5151 files : [ 'client/app/**/*.jade' ] < % } else { % >
52- main : 'client/app/ index.html' ,
52+ main : 'client/index.html' ,
5353 files : [ 'client/app/**/*.html' ] < % } % >
5454 } ,
55- karma : 'karma.conf.js'
55+ karma : 'karma.conf.js' ,
56+ dist : 'dist'
5657} ;
5758
5859//////////////////////
@@ -174,6 +175,7 @@ gulp.task('watch', function () {
174175gulp . task ( 'serve' , function ( callback ) {
175176 runSequence ( 'clean:tmp' ,
176177 [ 'lint:scripts' ] ,
178+ 'bower' ,
177179 [ 'start:server' , 'start:client' ] ,
178180 'watch' , callback ) ;
179181} ) ;
@@ -197,10 +199,9 @@ gulp.task('test:client', function () {
197199gulp . task ( 'bower' , function ( ) {
198200 return gulp . src ( paths . views . main )
199201 . pipe ( wiredep ( {
200- directory : yeoman . app + '/bower_components' ,
201- ignorePath : '..'
202+ exclude : [ / b o o t s t r a p - s a s s - o f f i c i a l / , / b o o t s t r a p .j s / , '/json3/' , '/es5-shim/' , / b o o t s t r a p .c s s / , / f o n t - a w e s o m e .c s s / ]
202203 } ) )
203- . pipe ( gulp . dest ( yeoman . app + '/views /') ) ;
204+ . pipe ( gulp . dest ( 'client /') ) ;
204205} ) ;
205206
206207///////////
@@ -237,12 +238,12 @@ gulp.task('client:build', ['html'], function () {
237238 . pipe ( plugins . revReplace ( ) )
238239 . pipe ( plugins . useref ( ) ) < % if ( filters . jade ) { % >
239240 . pipe ( assets ) < % } % >
240- . pipe ( gulp . dest ( yeoman . dist + '/public' ) ) ;
241+ . pipe ( gulp . dest ( paths . dist + '/public' ) ) ;
241242} ) ;
242243
243244gulp . task ( 'html' , function ( ) {
244245 return gulp . src ( yeoman . app + '/views/**/*' )
245- . pipe ( gulp . dest ( yeoman . dist + '/public/views' ) ) ;
246+ . pipe ( gulp . dest ( paths . dist + '/public/views' ) ) ;
246247} ) ;
247248
248249gulp . task ( 'images' , function ( ) {
@@ -252,23 +253,23 @@ gulp.task('images', function () {
252253 progressive : true ,
253254 interlaced : true
254255 } ) ) )
255- . pipe ( gulp . dest ( yeoman . dist + '/public/images' ) ) ;
256+ . pipe ( gulp . dest ( paths . dist + '/public/images' ) ) ;
256257} ) ;
257258
258259gulp . task ( 'copy:extras' , function ( ) {
259260 return gulp . src ( yeoman . app + '/*.*' , { dot : true } )
260- . pipe ( gulp . dest ( yeoman . dist + '/public' ) ) ;
261+ . pipe ( gulp . dest ( paths . dist + '/public' ) ) ;
261262} ) ;
262263
263264gulp . task ( 'copy:fonts' , function ( ) {
264265 return gulp . src ( yeoman . app + '/fonts/**/*' )
265- . pipe ( gulp . dest ( yeoman . dist + '/fonts' ) ) ;
266+ . pipe ( gulp . dest ( paths . dist + '/fonts' ) ) ;
266267} ) ;
267268
268269gulp . task ( 'copy:server' , function ( ) {
269270 return gulp . src ( [
270271 'package.json' ,
271272 'server.js' ,
272273 'lib/**/*'
273- ] , { cwdbase : true } ) . pipe ( gulp . dest ( yeoman . dist ) ) ;
274+ ] , { cwdbase : true } ) . pipe ( gulp . dest ( paths . dist ) ) ;
274275} ) ;
0 commit comments