Skip to content

Commit 10b5179

Browse files
committed
Merge pull request #1312 from DaftMonk/gen-default-babel
feat(gen): always use Babel
2 parents 2365188 + cdfc423 commit 10b5179

29 files changed

+6
-73
lines changed

Diff for: app/generator.js

+6-12
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,13 @@ export default class Generator extends Base {
9090

9191
this.log('# Client\n');
9292

93-
this.prompt([{
93+
this.prompt([/*{
9494
type: 'list',
9595
name: 'script',
9696
message: 'What would you like to write scripts with?',
97-
choices: [ 'JavaScript', 'JavaScript + Babel'],
98-
filter: function( val ) {
99-
return {
100-
'JavaScript': 'js',
101-
'JavaScript + Babel': 'babel'
102-
}[val];
103-
}
104-
}, {
97+
choices: ['Babel', 'TypeScript'],
98+
filter: function(val) { return val.toLowerCase(); }
99+
}, */{
105100
type: 'list',
106101
name: 'markup',
107102
message: 'What would you like to write markup with?',
@@ -134,9 +129,8 @@ export default class Generator extends Base {
134129
}
135130
}], function (answers) {
136131

137-
// also set 'js' to true if using babel
138-
if(answers.script === 'babel') { this.filters.js = true; }
139-
this.filters[answers.script] = true;
132+
this.filters.js = true;
133+
this.filters.babel = true;
140134
this.filters[answers.markup] = true;
141135
this.filters[answers.stylesheet] = true;
142136
this.filters[answers.router] = true;
File renamed without changes.
File renamed without changes.

Diff for: test/test-file-creation.js

-61
Original file line numberDiff line numberDiff line change
@@ -729,66 +729,5 @@ describe('angular-fullstack generator', function () {
729729
}
730730

731731
});
732-
733-
describe('with no preprocessors and no server options', function() {
734-
var testOptions = {
735-
script: 'js',
736-
markup: 'html',
737-
stylesheet: 'css',
738-
router: 'ngroute',
739-
testing: 'jasmine',
740-
odms: [],
741-
auth: false,
742-
oauth: [],
743-
socketio: false,
744-
bootstrap: true,
745-
uibootstrap: true
746-
};
747-
748-
beforeEach(function(done) {
749-
helpers.mockPrompt(gen, testOptions);
750-
done();
751-
});
752-
753-
it('should run client tests successfully', function(done) {
754-
runTest('grunt test:client', this, done);
755-
});
756-
757-
it('should pass jscs', function(done) {
758-
runTest('grunt jscs', this, done);
759-
});
760-
761-
it('should pass lint', function(done) {
762-
runTest('grunt jshint', this, done);
763-
});
764-
765-
it('should run server tests successfully', function(done) {
766-
runTest('grunt test:server', this, done);
767-
});
768-
769-
it('should generate expected files', function (done) {
770-
gen.run(function () {
771-
assert.file(genFiles(testOptions));
772-
done();
773-
});
774-
});
775-
776-
it('should not generate unexpected files', function (done) {
777-
gen.run(function () {
778-
assertOnlyFiles(genFiles(testOptions), done);
779-
});
780-
});
781-
782-
if(!process.env.SKIP_E2E) {
783-
it('should run e2e tests successfully', function (done) {
784-
runTest('grunt test:e2e', this, done, 240000);
785-
});
786-
787-
//it('should run e2e tests successfully for production app', function (done) {
788-
// runTest('grunt test:e2e:prod', this, done, 240000);
789-
//});
790-
}
791-
792-
});
793732
});
794733
});

0 commit comments

Comments
 (0)