thinkjs/template/bin/compile.ts
2016-01-08 19:57:12 +08:00

20 lines
466 B
JavaScript

#!/usr/bin/env node
var thinkjs = require('thinkjs');
var path = require('path');
var WatchCompile = require('thinkjs/lib/util/watch_compile.js');
var rootPath = path.dirname(__dirname);
var srcPath = rootPath + think.sep + 'src';
var outPath = rootPath + think.sep + 'app';
think.ROOT_PATH = rootPath;
think.APP_PATH = outPath;
WatchCompile = WatchCompile.default || WatchCompile;
//compile src to app
WatchCompile.compile(srcPath, outPath, {
type: 'ts'
});