@@ -9,7 +9,7 @@ var lazypipe = require('lazypipe');
99var wiredep = require ( 'wiredep' ) . stream ;
1010var nodemon = require ( 'nodemon' ) ;
1111var runSequence = require ( 'run-sequence' ) ;
12- var path = require ( 'path' ) ; < % if ( stylus ) { % >
12+ var path = require ( 'path' ) ; < % if ( filters . stylus ) { % >
1313var nib = require ( 'nib' ) ; < % } % >
1414var config ;
1515
@@ -20,30 +20,30 @@ var yeoman = {
2020
2121var paths = {
2222 client : {
23- scripts : [ yeoman . app + '/scripts/**/*.<% if ( coffee) { %>coffee<% } else { %>js<% } %>' ] ,
24- styles : [ yeoman . app + '/styles/**/*.<% if ( stylus) { %>styl<% } else if (sass) { %>scss<% } else { %>css<% } %>' ] ,
25- test : [ 'test/client/**/*.<% if ( coffee) { %>coffee<% } else { %>js<% } %>' ] ,
23+ scripts : [ yeoman . app + '/scripts/**/*.<% if(filters. coffee) { %>coffee<% } else { %>js<% } %>' ] ,
24+ styles : [ yeoman . app + '/styles/**/*.<% if(filters. stylus) { %>styl<% } else if (filters. sass) { %>scss<% } else { %>css<% } %>' ] ,
25+ test : [ 'test/client/**/*.<% if(filters. coffee) { %>coffee<% } else { %>js<% } %>' ] ,
2626 testRequire : [
2727 yeoman . app + '/bower_components/angular/angular.js' ,
2828 yeoman . app + '/bower_components/angular-mocks/angular-mocks.js' ,
2929 yeoman . app + '/bower_components/angular-resource/angular-resource.js' ,
3030 yeoman . app + '/bower_components/angular-cookies/angular-cookies.js' ,
3131 yeoman . app + '/bower_components/angular-sanitize/angular-sanitize.js' ,
32- yeoman . app + '/bower_components/angular-route/angular-route.js' , < % if ( coffee ) { % >
32+ yeoman . app + '/bower_components/angular-route/angular-route.js' , < % if ( filters . coffee ) { % >
3333 'test/mock/**/*.coffee' ,
3434 'test/spec/**/*.coffee' < % } else { % >
3535 'test/mock/**/*.js' ,
3636 'test/spec/**/*.js' < % } % >
3737 ]
3838 } ,
39- server : { < % if ( coffee ) { % >
39+ server : { < % if ( filters . coffee ) { % >
4040 scripts : [ 'lib/**/*.coffee' ] ,
4141 test : [ 'test/server/**/*.coffee' ] , < % } else { % >
4242 scripts : [ 'lib/**/*.js' ] ,
4343 test : [ 'test/server/**/*.js' ] , < % } % >
4444
4545 } ,
46- views : { < % if ( jade ) { % >
46+ views : { < % if ( filters . jade ) { % >
4747 main : yeoman . app + '/views/index.jade' ,
4848 files : [ yeoman . app + '/views/**/*.jade' ] < % } else { % >
4949 main : yeoman . app + '/views/index.html' ,
@@ -89,17 +89,17 @@ function whenServerReady (cb) {
8989// Reusable pipelines //
9090////////////////////////
9191
92- var lintScripts = lazypipe ( ) < % if ( coffee ) { % >
92+ var lintScripts = lazypipe ( ) < % if ( filters . coffee ) { % >
9393 . pipe ( $ . coffeelint )
9494 . pipe ( $ . coffeelint . reporter ) ; < % } else { % >
9595 . pipe ( $ . jshint , '.jshintrc' )
9696 . pipe ( $ . jshint . reporter , 'jshint-stylish' ) ; < % } % >
9797
98- var styles = lazypipe ( ) < % if ( stylus ) { % >
98+ var styles = lazypipe ( ) < % if ( filters . stylus ) { % >
9999 . pipe ( $ . stylus , {
100100 use : [ nib ( ) ] ,
101101 errors : true
102- } ) < % } % > < % if ( sass ) { % >
102+ } ) < % } % > < % if ( filters . sass ) { % >
103103 . pipe ( $ . rubySass , {
104104 style : 'expanded' ,
105105 precision : 10
@@ -114,7 +114,7 @@ var styles = lazypipe()<% if (stylus) { %>
114114gulp . task ( 'styles' , function ( ) {
115115 return gulp . src ( paths . client . styles )
116116 . pipe ( styles ( ) ) ;
117- } ) ; < % if ( coffee ) { % >
117+ } ) ; < % if ( filters . coffee ) { % >
118118
119119gulp . task ( 'coffee' , function ( ) {
120120 return gulp . src ( paths . client . scripts )
@@ -132,7 +132,7 @@ gulp.task('clean:tmp', function () {
132132 return gulp . src ( '.tmp' , { read : false } ) . pipe ( $ . clean ( ) ) ;
133133} ) ;
134134
135- gulp . task ( 'start:client' , [ < % if ( coffee ) { % > 'coffee' , < % } % > 'styles'], function (callback) {
135+ gulp . task ( 'start:client' , [ < % if ( filters . coffee ) { % > 'coffee' , < % } % > 'styles'], function (callback) {
136136 whenServerReady ( function ( ) {
137137 openURL ( 'http://localhost:' + config . port ) ;
138138 callback ( ) ;
@@ -160,7 +160,7 @@ gulp.task('watch', function () {
160160
161161 $ . watch ( { glob : paths . client . scripts } )
162162 . pipe ( $ . plumber ( ) )
163- . pipe ( lintScripts ( ) ) < % if ( coffee ) { % >
163+ . pipe ( lintScripts ( ) ) < % if ( filters . coffee ) { % >
164164 . pipe ( $ . coffee ( { bare : true } ) . on ( 'error' , $ . util . log ) )
165165 . pipe ( gulp . dest ( '.tmp/scripts' ) ) < % } %>
166166 . pipe ( $ . livereload ( ) ) ;
@@ -220,10 +220,10 @@ gulp.task('clean:dist', function () {
220220
221221gulp.task('client:build', ['html'], function () {
222222 var jsFilter = $ . filter ( '**/*.js' ) ;
223- var cssFilter = $ . filter ( '**/*.css' ) ; < % if ( jade ) { % >
223+ var cssFilter = $ . filter ( '**/*.css' ) ; < % if ( filters . jade ) { % >
224224 var assets = $ . filter ( '**/*.{js,css}' ) ; < % } %>
225225
226- return gulp . src ( paths . views . main ) < % if ( jade ) { % >
226+ return gulp . src ( paths . views . main ) < % if ( filters . jade ) { % >
227227 .pipe($.jade({ pretty : true } ))< % } % >
228228 .pipe($.useref.assets({ searchPath : [ yeoman . app , '.tmp' ] } ))
229229 .pipe(jsFilter)
@@ -236,7 +236,7 @@ gulp.task('client:build', ['html'], function () {
236236 .pipe($.rev())
237237 .pipe($.useref.restore())
238238 .pipe($.revReplace())
239- .pipe($.useref())< % if ( jade ) { % >
239+ .pipe($.useref())< % if ( filters . jade ) { % >
240240 .pipe(assets)< % } % >
241241 .pipe(gulp.dest(yeoman.dist + '/public'));
242242} ) ;
0 commit comments