Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions app/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ export default class Generator extends Base {
defaults: false
});

this.option('gulp', {
desc: 'Use experimental Gulp configuration',
type: Boolean,
defaults: false
});

this.option('app-suffix', {
desc: 'Allow a custom suffix to be added to the module name',
type: String,
Expand Down Expand Up @@ -129,6 +135,11 @@ export default class Generator extends Base {
this.filters[answers.router] = true;
this.filters.bootstrap = !!answers.bootstrap;
this.filters.uibootstrap = !!answers.uibootstrap;

this.scriptExt = answers.script === 'coffee' ? 'coffee' : 'js';
this.templateExt = answers.markup;
this.styleExt = answers.stylesheet;

cb();
}.bind(this));
},
Expand Down Expand Up @@ -243,7 +254,14 @@ export default class Generator extends Base {

this.log('\n# Project\n');

this.prompt([{
this.prompt([/*{
type: 'list',
name: 'buildtool',
message: 'Would you like to use Gulp (experimental) instead of Grunt?',
choices: ['Grunt', 'Gulp'],
default: 0,
filter: val => val.toLowerCase()
}, */{
type: 'list',
name: 'testing',
message: 'What would you like to write tests with?',
Expand All @@ -268,10 +286,10 @@ export default class Generator extends Base {
return answers.testing === 'mocha';
}
}], function (answers) {
/**
* Default to grunt until gulp support is implemented
*/
this.filters.grunt = true;
this.filters.grunt = !this.options['gulp'];
this.filters.gulp = !!this.options['gulp'];
// this.filters.grunt = answers.buildtool === 'grunt';
// this.filters.gulp = answers.buildtool === 'gulp';

this.filters[answers.testing] = true;
if (answers.testing === 'mocha') {
Expand Down
File renamed without changes.
87 changes: 66 additions & 21 deletions app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,52 @@
},
"devDependencies": {
"autoprefixer": "^6.0.0",
"babel-core": "^5.6.4",
"babel-core": "^5.6.4",<% if(filters.gulp) { %>
"del": "^2.0.2",
"gulp": "^3.9.0",
"gulp-add-src": "^0.2.0",
"gulp-angular-templatecache": "^1.7.0",
"gulp-autoprefixer": "2.3.1",<% if(filters.babel) { %>
"gulp-babel": "^5.1.0",<% } %>
"gulp-cache": "^0.2.10",
"gulp-concat": "^2.6.0",
"gulp-filter": "^2.0.2",
"gulp-imagemin": "^2.2.1",
"gulp-inject": "^1.3.1",
"gulp-jshint": "^1.11.0",<% if(filters.less) { %>
"gulp-less": "3.0.3",<% } %>
"gulp-livereload": "^3.8.0",
"gulp-load-plugins": "^1.0.0-rc.1",
"gulp-minify-css": "^1.1.6",
"gulp-mocha": "^2.1.3",
"gulp-ng-annotate": "^1.1.0",
"gulp-ng-constant": "^1.1.0",
"gulp-plumber": "^1.0.1",
"gulp-rename": "^1.2.2",
"gulp-rev": "^5.0.0",
"gulp-rev-replace": "^0.4.2",
"gulp-sort": "^1.1.1",
"gulp-sourcemaps": "^1.5.2",
"gulp-svgmin": "^1.1.2",
"gulp-uglify": "^1.2.0",
"gulp-useref": "^1.2.0",
"gulp-util": "^3.0.5",
"gulp-watch": "^4.3.5",<% if(filters.jade) { %>
"gulp-jade": "^1.0.1",<% } if(filters.stylus) { %>
"gulp-stylus": "^2.0.4",
"gulp-stylint": "^1.1.3",
"nib": "^1.1.0",<% } if(filters.sass) { %>
"gulp-sass": "^2.0.1",
"gulp-scss-lint": "^0.2.1",<% } if(filters.less) { %>
"gulp-less": "^3.0.3",
"gulp-recess": "^1.1.2",<% } if(filters.coffee) { %>
"gulp-coffeelint": "^0.5.0",
"gulp-coffee": "^2.3.1",<% } %>
"utile": "~0.3.0",
"nodemon": "^1.3.7",
"run-sequence": "^1.1.0",
"lazypipe": "^0.2.4",
"wiredep": "^2.2.2",<% } /*end gulp*/ if(filters.grunt) { %>
"grunt": "~0.4.5",
"grunt-wiredep": "^2.0.0",
"grunt-concurrent": "^2.0.1",
Expand All @@ -49,11 +94,9 @@
"grunt-contrib-jshint": "~0.11.2",
"grunt-contrib-uglify": "~0.11.0",
"grunt-contrib-watch": "~0.6.1",<% if (filters.jade) { %>
"grunt-contrib-jade": "^0.15.0",
"karma-ng-jade2js-preprocessor": "^0.2.0",<% } %><% if (filters.less) { %>
"grunt-contrib-jade": "^0.15.0",<% } %><% if (filters.less) { %>
"grunt-contrib-less": "^1.0.0",<% } %><% if(filters.babel) { %>
"karma-babel-preprocessor": "^5.2.1",<% } %>
"grunt-babel": "~5.0.0",
"grunt-babel": "~5.0.0",<% } %>
"grunt-google-cdn": "~0.4.0",
"grunt-jscs": "^2.1.0",
"grunt-newer": "^1.1.1",
Expand All @@ -73,39 +116,41 @@
"grunt-contrib-sass": "^0.9.0",<% } %><% if(filters.stylus) { %>
"grunt-contrib-stylus": "~0.22.0",<% } %>
"jit-grunt": "^0.9.1",
"time-grunt": "^1.2.1",
"grunt-express-server": "^0.5.1",
"grunt-postcss": "~0.7.1",
"grunt-open": "~0.2.3",
"time-grunt": "^1.2.1",
"grunt-mocha-test": "~0.12.7",
"grunt-mocha-istanbul": "^3.0.1",<% } /*end grunt*/ %>
"open": "~0.0.4",
"jshint-stylish": "~2.1.0",
"connect-livereload": "^0.5.3",
"mocha": "^2.2.5",
"grunt-mocha-test": "~0.12.7",
"grunt-mocha-istanbul": "^3.0.1",
"istanbul": "~0.4.1",
"chai": "^3.2.0",
"sinon": "^1.16.1",
"chai-as-promised": "^5.1.0",
"chai-things": "^0.2.0",
"sinon-chai": "^2.8.0",<% if (filters.mocha) { %>
"karma-mocha": "^0.2.0",
"karma-chai-plugins": "^0.6.0",<% } if (filters.jasmine) { %>
"jasmine-core": "^2.3.4",
"karma-jasmine": "~0.3.0",
"jasmine-spec-reporter": "^2.4.0",<% } %>
"karma": "~0.13.3",
"karma-ng-scenario": "~0.1.0",
"karma-firefox-launcher": "~0.1.6",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.2.0",
"requirejs": "~2.1.11",
"karma-requirejs": "~0.2.2",
"karma-jade-preprocessor": "0.0.11",
"phantomjs": "^1.9.18",
"karma-phantomjs-launcher": "~0.2.0",
"karma": "~0.13.3",
"karma-ng-html2js-preprocessor": "~0.2.0",
"karma-phantomjs-launcher": "~0.2.0",<% if (filters.jade) { %>
"karma-ng-jade2js-preprocessor": "^0.2.0",<% } else { %>
"karma-ng-html2js-preprocessor": "~0.2.0",<% } %>
"karma-spec-reporter": "~0.0.20",
"sinon-chai": "^2.8.0",<% if (filters.mocha) { %>
"mocha": "^2.2.5",
"karma-mocha": "^0.2.0",
"karma-chai-plugins": "^0.6.0",<% } if (filters.jasmine) { %>
"jasmine-core": "^2.3.4",
"karma-jasmine": "~0.3.0",
"jasmine-spec-reporter": "^2.4.0",<% } if(filters.babel) { %>
"karma-babel-preprocessor": "^5.2.1",<% } %>
"requirejs": "~2.1.11",
"phantomjs": "^1.9.18",
"proxyquire": "^1.0.1",
"supertest": "^1.1.0"
},
Expand All @@ -115,7 +160,7 @@
},
"scripts": {
"start": "node server",
"test": "grunt test",
"test": "<%= filters.grunt ? 'grunt' : 'gulp' %> test",
"update-webdriver": "node node_modules/grunt-protractor-runner/node_modules/protractor/bin/webdriver-manager update"
},
"private": true
Expand Down
Loading