-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
35 lines (31 loc) · 825 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**
* @copyright Copyright 2016 Kevin Locke <kevin@kevinlocke.name>
* @license MIT
*/
'use strict';
const gulp = require('gulp');
const babel = require('gulp-babel');
const rename = require('gulp-rename');
const sourcemaps = require('gulp-sourcemaps');
const uglify = require('gulp-uglify');
const umd = require('gulp-umd');
const pump = require('pump');
const DIST_DIR = 'dist';
gulp.task('default', (done) => {
pump(
gulp.src('index.js'),
rename({ basename: 'promise-nodeify' }),
babel(),
umd({
exports() { return 'promiseNodeify'; },
namespace() { return 'promiseNodeify'; },
}),
gulp.dest(DIST_DIR),
sourcemaps.init(),
uglify({ output: { comments: 'some' } }),
rename({ extname: '.min.js' }),
sourcemaps.write('.'),
gulp.dest(DIST_DIR),
done,
);
});