Skip to content

Commit

Permalink
chore(gulp): clean up gulp tasks [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
suguru03 committed Jun 12, 2017
1 parent a0e1f3b commit 36a5aed
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 40 deletions.
8 changes: 4 additions & 4 deletions gulp/tasks/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const generator = require('changelog-generator');

const async = require('../../');

gulp.task('changelog', (done) => {
let filepath = path.resolve(__dirname, '../..', 'package.json');
let url = require(filepath).homepage;
gulp.task('changelog', done => {
const filepath = path.resolve(__dirname, '../..', 'package.json');
const { homepage } = require(filepath);

async.angelFall([

async.apply(generator, url),
async.apply(generator, homepage),

async.apply(git.exec, {
args: 'add ./CHANGELOG.md'
Expand Down
8 changes: 4 additions & 4 deletions gulp/tasks/gh-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const git = require('gulp-git');
const async = require('../../');
const jsdoc = require('./jsdoc');

gulp.task('gh-pages', (done) => {
gulp.task('gh-pages', done => {

let filepath = path.resolve(__dirname, '../..', 'lib/async.js');
let options = {
const filepath = path.resolve(__dirname, '../..', 'lib/async.js');
const options = {
encoding: 'utf8'
};
let asyncFile = fs.readFileSync(filepath, options);
const asyncFile = fs.readFileSync(filepath, options);
async.angelFall([

async.apply(git.fetch, 'origin', ''),
Expand Down
4 changes: 2 additions & 2 deletions gulp/tasks/jsbeautifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const config = require('../config');
gulp.task('jsfmt', ['jsbeautifier']);

gulp.task('jsbeautifier', () => {
let dirnames = config.jsbeautifier.dirnames;
let streams = _.map(dirnames, (task) => {
const { dirnames } = config.jsbeautifier;
const streams = _.map(dirnames, task => {
let dirname = task.slice(0, _.lastIndexOf(task, '/'));
return gulp.src(task)
.pipe(jsbeautifier({
Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/jscs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const jscs = require('gulp-jscs');
const config = require('../config');

gulp.task('jscs', () => {
let dirnames = config.jscs.dirnames;
const { dirnames } = config.jscs;
return gulp.src(dirnames)
.pipe(jscs('.jscsrc'));
});
4 changes: 2 additions & 2 deletions gulp/tasks/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const config = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../..', '.jsd
}));

function createJSDoc(done) {
let dirpath = path.resolve(__dirname, '../..', config.opts.destination);
exec('rm -rf ' + dirpath);
const dirpath = path.resolve(__dirname, '../..', config.opts.destination);
exec(`rm -rf ${dirpath}`);
exec('$(npm bin)/jsdoc -c .jsdocrc ./lib/async.js', done);
}

Expand Down
25 changes: 0 additions & 25 deletions gulp/tasks/perf.js

This file was deleted.

3 changes: 1 addition & 2 deletions gulp/tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ _.forEach(types, type => {
'release:dist',
'release:commit',
'release:tag',
'gh-pages',
'changelog'
'gh-pages'
));
});

Expand Down

0 comments on commit 36a5aed

Please sign in to comment.