标签:als 开发 include cti comm esc option src pfile
tsc --init
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": false,
"outDir": "./dist"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
gulpfiles.js
var gulp = require("gulp");
var ts = require("gulp-typescript");
var nodemon = require(‘gulp-nodemon‘);
var tsProject = ts.createProject("tsconfig.json");
gulp.task("build", function () {
return tsProject.src()
.pipe(tsProject())
.js.pipe(gulp.dest("dist"));
});
gulp.task(‘start‘, function () {
nodemon({
script: ‘./dist/app.js‘
})
});
gulp.task(‘watch‘, [‘build‘], function() {
gulp.watch(‘src/**/*.ts‘, [‘build‘]);
gulp.watch(‘dist/**/*.js‘, [‘start‘]);
});
gulp.task(‘default‘, [‘build‘]);
与你相遇好幸运,使用gulp流程化Typescript后端开发
标签:als 开发 include cti comm esc option src pfile
原文地址:http://www.cnblogs.com/restful/p/6102536.html