forked from egret-labs/egret-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
24 lines (22 loc) · 920 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
/**
* Created by wander on 15/9/9.
*/
var gulp = require('gulp');
var ts = require('gulp-typescript');
//var tsc = require("../TypeScript-master/built/local/typescript.js")
var sourcemaps = require('gulp-sourcemaps');
//var tsc = require("./tools/lib/typescript/tsclark.js")
//gulp.src(['tools/**/*.ts','!tools/templates/**/*.ts','!tools/lib/typescript/**/*.ts','!tools/lib/core/typescript/**/*.d.
gulp.task('build-tools', function () {
var tsResult = gulp.src(['tools/**/*.ts','!tools/templates/**/*.ts','!tools/lib/typescript/**/*.ts','!tools/lib/core/typescript/**/*.d.ts'])
.pipe(sourcemaps.init())
.pipe(ts({
//typescript:tsc,
target:"ES5",
module:"commonjs"
}));
return tsResult.js.pipe(sourcemaps.write(".")).pipe(gulp.dest('tools'));
});
gulp.task('watch', ['build-tools'], function() {
gulp.watch('tools/**/*.ts', ['build-tools']);
});