Skip to content

Commit 7029d97

Browse files
committed
feat(gulp): add Gulp support
1 parent edb543f commit 7029d97

5 files changed

Lines changed: 428 additions & 6 deletions

File tree

app/generator.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,18 @@ export default class Generator extends Base {
257257
this.log('\n# Project\n');
258258

259259
this.prompt([{
260+
type: 'list',
261+
name: 'buildtool',
262+
message: 'Would you like to use Gulp (experimental) instead of Grunt?',
263+
choices: [ 'Grunt', 'Gulp', 'Both'],
264+
filter: function(val) {
265+
return {
266+
'Grunt': 'grunt',
267+
'Gulp': 'gulp',
268+
'Both': 'grunt_and_gulp'
269+
}[val];
270+
}
271+
}, {
260272
type: 'list',
261273
name: 'testing',
262274
message: 'What would you like to write tests with?',
@@ -281,10 +293,8 @@ export default class Generator extends Base {
281293
return answers.testing === 'mocha';
282294
}
283295
}], function (answers) {
284-
/**
285-
* Default to grunt until gulp support is implemented
286-
*/
287-
this.filters.grunt = true;
296+
this.filters.grunt = answers.buildtool === 'grunt' || answers.buildtool === 'grunt_and_gulp';
297+
this.filters.gulp = answers.buildtool === 'gulp' || answers.buildtool === 'grunt_and_gulp';
288298

289299
this.filters[answers.testing] = true;
290300
if (answers.testing === 'mocha') {

app/templates/_package.json

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,49 @@
3737
},
3838
"devDependencies": {
3939
"autoprefixer": "^6.0.0",
40-
"babel-core": "^5.6.4",
40+
"babel-core": "^5.6.4",<% if(filters.gulp) { %>
41+
"gulp": "^3.9.0",
42+
"gulp-add-src": "^0.2.0",
43+
"gulp-angular-templatecache": "^1.7.0",
44+
"gulp-autoprefixer": "2.3.1",<% if(filters.babel) { %>
45+
"gulp-babel": "^5.1.0",<% } %>
46+
"gulp-cache": "^0.2.10",
47+
"gulp-clean": "^0.3.1",
48+
"gulp-concat": "^2.6.0",
49+
"gulp-filter": "^2.0.2",
50+
"gulp-imagemin": "^2.2.1",
51+
"gulp-inject": "^1.3.1",
52+
"gulp-jshint": "^1.11.0",
53+
"gulp-karma": "0.0.4",<% if(filters.less) { %>
54+
"gulp-less": "3.0.3",<% } %>
55+
"gulp-livereload": "^3.8.0",
56+
"gulp-load-plugins": "^1.0.0-rc.1",
57+
"gulp-minify-css": "^1.1.6",
58+
"gulp-ngmin": "^0.3.0",
59+
"gulp-plumber": "^1.0.1",
60+
"gulp-rev": "^5.0.0",
61+
"gulp-rev-replace": "^0.4.2",
62+
"gulp-sourcemaps": "^1.5.2",
63+
"gulp-svgmin": "^1.1.2",
64+
"gulp-uglify": "^1.2.0",
65+
"gulp-useref": "^1.2.0",
66+
"gulp-util": "^3.0.5",
67+
"gulp-watch": "^4.2.4",
68+
"utile": "~0.3.0",
69+
"nodemon": "^1.3.7",
70+
"run-sequence": "^1.1.0",
71+
"lazypipe": "^0.2.4",
72+
"wiredep": "^2.2.2",<% if(filters.jade) { %>
73+
"gulp-jade": "^1.0.1",<% } if(filters.stylus) { %>
74+
"gulp-stylus": "^2.0.4",
75+
"gulp-stylint": "^1.1.3",
76+
"nib": "^1.1.0",<% } if(filters.sass) { %>
77+
"gulp-sass": "^2.0.1",
78+
"gulp-scss-lint": "^0.2.1",<% } if(filters.less) { %>
79+
"gulp-less": "^3.0.3",
80+
"gulp-recess": "^1.1.2",<% } if(filters.coffee) { %>
81+
"gulp-coffeelint": "^0.5.0",
82+
"gulp-coffee": "^2.3.1",<% }} if(filters.grunt) { %>
4183
"grunt": "~0.4.5",
4284
"grunt-wiredep": "^2.0.0",
4385
"grunt-concurrent": "^2.0.1",
@@ -74,7 +116,7 @@
74116
"time-grunt": "^1.2.1",
75117
"grunt-express-server": "^0.5.1",
76118
"grunt-postcss": "^0.6.0",
77-
"grunt-open": "~0.2.3",
119+
"grunt-open": "~0.2.3",<% } %>
78120
"open": "~0.0.4",
79121
"jshint-stylish": "~2.0.1",
80122
"connect-livereload": "^0.5.3",

0 commit comments

Comments
 (0)