express-template/build

19 lines
480 B
JavaScript
Executable File

#!/bin/env node
const shell = require('shelljs')
const path = require('path')
const dist_dir_path = path.resolve(__dirname,'dist')
shell.rm('-rf',dist_dir_path)
shell.exec('tsc')
shell.cp('./www',dist_dir_path)
shell.cp('-r','./views',dist_dir_path)
shell.chmod('+x',path.join(dist_dir_path,'www'))
shell.echo('====================================')
shell.echo('构建完成,目录如下:')
shell.ls('-l',dist_dir_path)
shell.echo('====================================')