diff --git a/generators/app/index.js b/generators/app/index.js
index 5470b49..448a7dd 100644
--- a/generators/app/index.js
+++ b/generators/app/index.js
@@ -19,12 +19,9 @@ module.exports = generators.Base.extend({
type: Boolean
});
- this.composeWith('generator-mocha' + ':app', {
- options: {
- 'skip-install': this.options['skip-install']
- }
- }, {
- local: require.resolve('generator-mocha/generators/app/index.js')
+ this.option('skip-install', {
+ desc: 'Skip installing dependencies',
+ type: Boolean
});
},
@@ -162,7 +159,7 @@ module.exports = generators.Base.extend({
},
installing: function() {
- if(!this.options['skip-install']) {
+ if (!this.options['skip-install']) {
this.npmInstall();
this.spawnCommand('bundle', ['install']);
}
diff --git a/generators/boilerplate/templates/jscsrc b/generators/boilerplate/templates/jscsrc
index 4b5fa83..623b55c 100644
--- a/generators/boilerplate/templates/jscsrc
+++ b/generators/boilerplate/templates/jscsrc
@@ -1,3 +1,4 @@
{
- "preset": "google"
+ "preset": "google",
+ "esnext": true
}
diff --git a/generators/gulp/templates/gulpfile.babel.js b/generators/gulp/templates/gulpfile.babel.js
index aad8428..b061dba 100755
--- a/generators/gulp/templates/gulpfile.babel.js
+++ b/generators/gulp/templates/gulpfile.babel.js
@@ -26,16 +26,19 @@ const wiredep = wiredeps.stream;
import bowerFiles from 'main-bower-files';
// Deletes the directory that the optimized site is output to
-gulp.task('clean:dist', done => { trash(['dist']); done(); });
-gulp.task('clean:assets', done => { trash(['.tmp']); done(); });
-gulp.task('clean:metadata', done => { trash(['src/.jekyll-metadata']); done(); });
+gulp.task('clean:dist', cb => { trash(['dist']); cb(); });
+gulp.task('clean:assets', cb => { trash(['.tmp']); cb(); });
+gulp.task('clean:metadata', cb => { trash(['src/.jekyll-metadata']); cb(); });
// Tasks for building Jekyll, either with development settings (drafts etc) or
// with production settings
-gulp.task('jekyll:dev', done => { shell.exec('jekyll build --quiet'); done(); });
-gulp.task('jekyll:prod', done => {
+gulp.task('jekyll:dev', cb => {
+ shell.exec('jekyll build --quiet');
+ cb();
+});
+gulp.task('jekyll:prod', cb => {
shell.exec('jekyll build --quiet --config _config.yml,_config.build.yml');
- done();
+ cb();
});
// Compiles the SASS files and moves them into the 'assets/stylesheets' directory
@@ -123,10 +126,12 @@ gulp.task('bower', () => {
html: {
replace: {
js: filePath => {
- return '';
+ return '';
},
css: filePath => {
- return '';
+ return '';
}
}
}
@@ -281,7 +286,7 @@ gulp.task('jslint', () => {
// Runs 'jekyll doctor' on your site to check for errors with your configuration
// and will check for URL errors a well
-gulp.task('doctor', done => { shell.exec('jekyll doctor'); done(); });
+gulp.task('doctor', cb => { shell.exec('jekyll doctor'); cb(); });
// BrowserSync will serve our site on a local server for us and other devices to use
// It will also autoreload across all devices as well as keep the viewport synchronized
@@ -328,7 +333,8 @@ gulp.task('build', gulp.series(
));
// Clean out your dist and .tmp folder and delete .jekyll-metadata
-gulp.task('rebuild', gulp.series('clean:dist', 'clean:assets', 'clean:metadata'));
+gulp.task('rebuild', gulp.series('clean:dist', 'clean:assets',
+ 'clean:metadata'));
// Checks your CSS, JS and Jekyll for errors
gulp.task('check', gulp.series('doctor', 'jslint'));
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index 8b79420..c8987af 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -18,14 +18,11 @@ const handleErr = err => {
gulp.task('check', () => {
return gulp.src([
'test/*.js',
- 'test/tmp/**/*.js',
+ 'test/tmp/**/gulpfile.babel.js',
'generators/**/index.js',
'gulpfile.babel.js'
])
- .pipe(jscs({
- esnext: true,
- excludeFiles: ['app/test/*', 'build/test/*']
- }))
+ .pipe(jscs())
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'))
diff --git a/package.json b/package.json
index 27823d1..121bddc 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"repository": "sondr3/generator-jekyllized",
"license": "MIT",
"scripts": {
- "test": "gulp istanbul && gulp"
+ "test": "gulp test && gulp"
},
"files": [
"index.js",
@@ -23,7 +23,7 @@
"dependencies": {
"chalk": "^1.1.0",
"globule": "^0.2.0",
- "lodash": "^3.9.3",
+ "lodash": "^3.10.0",
"shelljs": "^0.5.1",
"yeoman-generator": "^0.20.1",
"yosay": "^1.0.4"
@@ -44,7 +44,6 @@
"istanbul": "^0.3.17",
"jshint": "^2.8.0",
"jshint-stylish": "^2.0.1",
- "lodash": "^3.10.0",
"mocha": "^2.2.5",
"mocha-lcov-reporter": "^0.0.2",
"trash": "^1.4.1",