-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
48 lines (39 loc) · 1.05 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
42
43
44
45
46
47
48
var gulp = require('gulp');
var ts = require('gulp-typescript');
var jeditor = require("gulp-json-editor");
var project = ts.createProject({
"declarationFiles": false,
"noExternalResolve": true,
"module": "commonjs",
});
var tsWeb = ts.createProject({
"declarationFiles": false,
"noExternalResolve": true,
"sortOutput": true,
});
var src = {
lib: ['*.ts', 'typings/*/*.d.ts'],
pkg: ['package.json'],
npm: ['.npmignore', 'README.md', 'LICENSE'],
};
var out = {
lib: 'build',
};
gulp.task('lib', function () {
return gulp.src(src.lib)
.pipe(ts(project))
.pipe(gulp.dest(out.lib));
});
gulp.task('package', function () {
return gulp.src(src.pkg)
.pipe(jeditor({ 'devDependencies': undefined }))
.pipe(gulp.dest(out.lib));
});
gulp.task('npm', function () {
return gulp.src(src.npm)
.pipe(gulp.dest(out.lib));
});
gulp.task('build', ['lib', 'package', 'npm'], function () {
});
gulp.task('default', ['build'], function () {
});