Wednesday, 3 May 2017

Include all .d.ts but exclude .ts on glob for gulp.src

Background

After I compile my Typescript files on my Angular2 project, I will have the following directory structure (simplified):

├── app
│   └── app.module.d.ts
│   └── app.module.js
│   └── app.module.ts
│   └── index.d.ts
│   └── index.js
│   └── index.ts
│   └── sample.component.d.ts
│   └── sample.component.js
│   └── sample.component.ts
│   └── sample.component.html
│   └── sample.component.css

Problem

Using gulp@3.9.1 and gulp.src(), how can I create a glob array which will include all the files under the app folder, but ignoring the .ts files corresponding to their .d.ts files?



via mercador

No comments:

Post a Comment