Skip to content

Commit

Permalink
General update and polish
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkGriffiths committed Feb 9, 2019
1 parent d078610 commit c0c4eed
Show file tree
Hide file tree
Showing 21 changed files with 3,806 additions and 6,926 deletions.
57 changes: 9 additions & 48 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
const gulp = require('gulp')
const rename = require('gulp-rename')
const rollup = require('gulp-better-rollup')
const strip = require('gulp-strip-comments')
const babel = require('rollup-plugin-babel')

const babelConfig = {
presets: [['@babel/preset-env', {
modules: false,
targets: {
node: '8.0.0'
}
}]]
presets: [
['@babel/preset-env', {
modules: false,
targets: {
node: '8.0.0'
}
}]
],
comments: false
}

gulp.task('cjs', () =>
Expand All @@ -20,7 +22,6 @@ gulp.task('cjs', () =>
}, {
format: 'cjs'
}))
.pipe(strip())
.pipe(gulp.dest('.'))
)

Expand All @@ -31,48 +32,8 @@ gulp.task('es6', () =>
}, {
format: 'es'
}))
.pipe(strip())
.pipe(rename('index.mjs'))
.pipe(gulp.dest('.'))
)

gulp.task('default', gulp.series('cjs', 'es6'))

/* Old:
gulp.task('default', () =>
gulp.src('src/index.js')
.pipe(babel({
presets: [['babel-preset-env', {
targets: {
node: "10.0.0"
}}]]
}))
.pipe(gulp.dest('lib'))
)
gulp.task('bundle', cordial.macro({
babel: {
plugins: ['external-helpers']
},
exports: 'named',
source: 'src/index.js'
}).bundle())
// Clean
gulp.task('clean', cordial.shell({
source: ['lib', 'npm-debug.*', './.nyc_output', './coverage']
}).trash())
// Tests
gulp.task('ava', cordial.test().ava(['test/*.js']))
gulp.task('xo', cordial.test().xo(['src/*.js']))
gulp.task('test', gulp.parallel('xo', 'ava'))
// Hooks
gulp.task('start-release', gulp.series('reset', 'clean', 'bundle'))
gulp.task('test-release', gulp.series('test'))
gulp.task('finish-release', gulp.series('push-force', 'push-tags'))
// Default
gulp.task('default', gulp.series('bump', 'clean', 'bundle'))
*/
Loading

0 comments on commit c0c4eed

Please sign in to comment.