Skip to content

Commit

Permalink
Move some subgenerators to a boilerplate generator
Browse files Browse the repository at this point in the history
Moved the git, editorconfig, jscs and jshint subgenerator into a
boilerplate generator instead because I like that approach better.
  • Loading branch information
sondr3 committed May 17, 2015
1 parent 0667750 commit 420aac0
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 177 deletions.
16 changes: 2 additions & 14 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,8 @@ module.exports = generators.Base.extend({
},

default: function() {
this.composeWith('jekyllized:editorconfig', {}, {
local: require.resolve('../editorconfig')
});

this.composeWith('jekyllized:jshint', {}, {
local: require.resolve('../jshint')
});

this.composeWith('jekyllized:jscs', {}, {
local: require.resolve('../jscs')
});

this.composeWith('jekyllized:git', {}, {
local: require.resolve('../git')
this.composeWith('jekyllized:boilerplate', {}, {
local: require.resolve('../boilerplate')
});

this.composeWith('jekyllized:gulp', {}, {
Expand Down
12 changes: 0 additions & 12 deletions generators/editorconfig/index.js

This file was deleted.

12 changes: 0 additions & 12 deletions generators/editorconfig/templates/editorconfig

This file was deleted.

17 changes: 0 additions & 17 deletions generators/git/index.js

This file was deleted.

1 change: 0 additions & 1 deletion generators/git/templates/gitattributes

This file was deleted.

70 changes: 0 additions & 70 deletions generators/git/templates/gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions generators/jscs/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions generators/jscs/templates/jscsrc

This file was deleted.

12 changes: 0 additions & 12 deletions generators/jshint/index.js

This file was deleted.

18 changes: 0 additions & 18 deletions generators/jshint/templates/jshintrc

This file was deleted.

3 changes: 2 additions & 1 deletion test/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ describe('jekyllized:app', function() {
'.jscsrc',
'.gitignore',
'.gitattributes',
'package.json'
'package.json',
'gulpfile.js'
]);
});

Expand Down
2 changes: 1 addition & 1 deletion test/editorconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var helpers = require('yeoman-generator').test;

describe('jekyllized:editorconfig', function() {
before(function(done) {
helpers.run(path.join(__dirname, '../generators/editorconfig'))
helpers.run(path.join(__dirname, '../generators/boilerplate'))
.on('end', done);
});

Expand Down
2 changes: 1 addition & 1 deletion test/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var helpers = require('yeoman-generator').test;

describe('jekyllized:git', function() {
before(function(done) {
helpers.run(path.join(__dirname, '../generators/git'))
helpers.run(path.join(__dirname, '../generators/boilerplate'))
.on('end', done);
});

Expand Down
3 changes: 2 additions & 1 deletion test/gulp.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ describe('jekyllized:gulp', function() {
describe('without any uploading', function() {
before(function(done) {
this.answers = {
uploading: 'noUploadg'
uploading: 'noUpload'
};
helpers.run(path.join(__dirname, '../generators/gulp'))
.inDir(path.join(__dirname, 'tmp/gulp'))
.withPrompts(this.answers)
.on('end', done);
});
Expand Down
2 changes: 1 addition & 1 deletion test/jscs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var helpers = require('yeoman-generator').test;

describe('jekyllized:jscs', function() {
before(function(done) {
helpers.run(path.join(__dirname, '../generators/app'))
helpers.run(path.join(__dirname, '../generators/boilerplate'))
.on('end', done);
});

Expand Down
2 changes: 1 addition & 1 deletion test/jshint.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var helpers = require('yeoman-generator').test;

describe('jekyllized:jshint', function() {
before(function(done) {
helpers.run(path.join(__dirname, '../generators/jshint'))
helpers.run(path.join(__dirname, '../generators/boilerplate'))
.on('end', done);
});

Expand Down

0 comments on commit 420aac0

Please sign in to comment.