【发布时间】:2016-04-06 13:45:55
【问题描述】:
我正在关注Angular 2 quick start 教程。以下是我的文件夹结构 -
├── gulpfile.js
├── index.html
├── js
| ├── app.component.js
| └── boot.js
├── source
| ├── app.component.ts
| └── boot.ts
├── node_modules
├── module 1
└── module 2
我的打字稿文件位于source/ 目录中。我正在将它编译到js/ 目录。我正在使用 gulp-typescript。
问题是,例如,当我将文件boot.ts 重命名为bootstrap.ts 并再次编译时,会创建相应的bootstrap.js 文件,但旧的boot.js 文件仍保留在js/ 目录中。
现在文件夹结构如下-
├── gulpfile.js
├── index.html
├── js
| ├── app.component.js
| └── bootstrap.js
| └── boot.js
├── source
| ├── app.component.ts
| └── bootstrap.ts
├── node_modules
├── module 1
└── module 2
我想通过 gulp 任务自动删除这个boot.js。如何做到这一点?
【问题讨论】:
标签: javascript typescript gulp angular