forked from toryas/serverless-glue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (33 loc) · 1.02 KB
/
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
36
37
38
39
40
41
const { task, src, series, dest } = require('gulp');
const file = require('gulp-file');
const pkg = require('./package.json');
const del = require('del')
task('clean', async () => {
return del.sync(['lib'])
})
task('copyToDist', async () => {
// await src('./src/module/**/*').pipe(dest('./dist/'))
await src('./README.md').pipe(dest('./lib/'))
})
task('makePackageJson', async () => {
let distPkg = {
name:pkg.name,
version:pkg.version,
}
distPkg.dependencies = pkg.dependencies
distPkg.description = pkg.description;
distPkg.main = pkg.main;
distPkg.keywords = pkg.keywords;
distPkg.license = pkg.license;
distPkg.bugs = pkg.bugs;
distPkg.homepage = pkg.homepage;
distPkg.repository = pkg.repository;
distPkg.author = pkg.author;
await file('package.json', JSON.stringify(distPkg, null, 2), { src: true })
.pipe(dest('lib'));
})
task('build', series(
// 'clean',
'copyToDist',
'makePackageJson'
));