forked from dieface/ag-grid-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
35 lines (28 loc) · 956 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
const gulp = require('gulp');
const gulpTypescript = require('gulp-typescript');
const header = require('gulp-header');
const merge = require('merge2');
const pkg = require('./package.json');
const tsConfig = 'tsconfig.json';
const rename = require('gulp-rename');
const headerTemplate = '// <%= pkg.name %> v<%= pkg.version %>\n';
const tsProject = gulpTypescript.createProject(tsConfig);
gulp.task('default', tscTask);
function tscTask() {
const tsResult = gulp
.src('src/**/*.ts')
.pipe(tsProject());
return merge([
tsResult.dts
.pipe(header(headerTemplate, {pkg: pkg}))
.pipe(gulp.dest('lib')),
tsResult.js
.pipe(header(headerTemplate, {pkg: pkg}))
.pipe(gulp.dest('lib'))
]);
}
gulp.task('publishForCI', () => {
return gulp.src("./ag-grid-react*.tgz")
.pipe(rename("ag-grid-react.tgz"))
.pipe(gulp.dest("c:/ci/ag-grid-react/"));
});