Skip to content

Commit

Permalink
ES2015, Travis and Syntax changes
Browse files Browse the repository at this point in the history
Updates a few things to be ES2015 and removed the dependency for Babel
for the gulpfile, removed ESlint and moved to XO as we already used
their settings, renamed the Gulpfile back to good ol' gulpfile.js and
fixed some warnings for the JS.

Also updated what versions to use for Travis.
  • Loading branch information
sondr3 committed May 22, 2016
1 parent 96374df commit 3a2cc26
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 39 deletions.
9 changes: 3 additions & 6 deletions .travis.yml
@@ -1,12 +1,9 @@
language: node_js
sudo: false
node_js:
- "4"
- "stable"
- "6"
- "5"
- "4"
after_script:
- CODECLIMATE_REPO_TOKEN=7b0cbee1382c968a036868d26ec04d0ddc7b7aeef25ceead5ff9ff50a3c2ae8b codeclimate < coverage/lcov.info
- rm -rf ./coverage
notifications:
email:
on_success: change
on_failure: change
8 changes: 4 additions & 4 deletions generators/gulp/templates/gulpfile.js
@@ -1,5 +1,9 @@
'use strict';

<% if (amazonS3 || rsync) { -%>
// 'fs' is used to read files from the system (used for uploading)
const fs = require('fs');
<% } -%>
const gulp = require('gulp');
// Loads the plugins without having to list all of them, but you need
// to call them as $.pluginname
Expand All @@ -9,10 +13,6 @@ const $ = gulpLoadPlugins();
const del = require('del');
// Used to run shell commands
const shell = require('shelljs');
<% if (amazonS3 || rsync) { -%>
// 'fs' is used to read files from the system (used for uploading)
const fs = require('fs');
<% } -%>
<% if (amazonS3) { -%>
// Parallelize the uploads when uploading to Amazon S3
const parallelize = require('concurrent-transform');
Expand Down
27 changes: 7 additions & 20 deletions gulpfile.babel.js → gulpfile.js
@@ -1,24 +1,11 @@
'use strict';

import coveralls from 'gulp-coveralls';
import gulp from 'gulp';
import istanbul from 'gulp-istanbul';
import eslint from 'gulp-eslint';
import mocha from 'gulp-mocha';
import path from 'path';
import del from 'del';

gulp.task('check', () =>
gulp.src([
'gulpfile.babel.js',
'test/*.js',
'test/tmp/**/gulpfile.babel.js',
'generators/**/index.js'
])
.pipe(eslint())
.pipe(eslint.formatEach())
.pipe(eslint.failOnError())
);
const path = require('path');
const gulp = require('gulp');
const coveralls = require('gulp-coveralls');
const istanbul = require('gulp-istanbul');
const mocha = require('gulp-mocha');
const del = require('del');

gulp.task('istanbul', done =>
gulp.src([
Expand Down Expand Up @@ -48,4 +35,4 @@ gulp.task('coveralls', () => {
});

gulp.task('test', gulp.series('clean', 'istanbul'));
gulp.task('default', gulp.series('check', 'coveralls'));
gulp.task('default', gulp.series('coveralls'));
24 changes: 16 additions & 8 deletions package.json
Expand Up @@ -13,7 +13,7 @@
"repository": "sondr3/generator-jekyllized",
"license": "MIT",
"scripts": {
"test": "gulp test && gulp"
"test": "xo && gulp test && gulp"
},
"files": [
"index.js",
Expand All @@ -29,27 +29,35 @@
"yosay": "^1.1.1"
},
"devDependencies": {
"babel-core": "^6.7.7",
"babel-eslint": "^6.0.3",
"babel-preset-es2015": "^6.6.0",
"codeclimate-test-reporter": "^0.3.1",
"coveralls": "^2.11.6",
"del": "^2.2.0",
"eslint": "^2.8.0",
"eslint-config-xo": "^0.13.0",
"eslint-config-xo-space": "^0.12.0",
"generator-mocha": "^0.3.0",
"gulp": "git://github.com/gulpjs/gulp.git#4.0",
"gulp-coveralls": "^0.1.4",
"gulp-eslint": "^2.0.0",
"gulp-istanbul": "^0.10.4",
"gulp-load-plugins": "^1.2.2",
"gulp-mocha": "^2.2.0",
"istanbul": "^0.4.3",
"mocha": "^2.4.5",
"mocha-lcov-reporter": "^1.2.0",
"xo": "^0.15.1",
"yeoman-assert": "^2.2.1",
"yeoman-test": "^1.1.0",
"yo": "^1.7.0"
},
"xo": {
"space": true,
"globals": [
"describe",
"before",
"it"
],
"ignores": [
"generators/app/templates/**",
"generators/boilerplate/templates/**",
"generators/gulp/templates/**",
"generators/jekyll/templates/**"
]
}
}
2 changes: 1 addition & 1 deletion test/app.js
@@ -1,7 +1,7 @@
'use strict';

var _ = require('lodash');
var path = require('path');
var _ = require('lodash');
var assert = require('yeoman-assert');
var helpers = require('yeoman-test');

Expand Down

0 comments on commit 3a2cc26

Please sign in to comment.