express-template/build

19 lines
480 B
Plaintext
Raw Permalink Normal View History

2021-08-16 14:29:43 +00:00
#!/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')
2021-08-29 10:31:21 +00:00
shell.cp('./www',dist_dir_path)
2021-08-16 14:29:43 +00:00
shell.cp('-r','./views',dist_dir_path)
2021-08-29 10:31:21 +00:00
shell.chmod('+x',path.join(dist_dir_path,'www'))
shell.echo('====================================')
shell.echo('构建完成,目录如下:')
shell.ls('-l',dist_dir_path)
shell.echo('====================================')