How can I concat multiple TypeScript with Angular2 files into single JS file like Rails assets:precompile?
For example, in a tutorial of angular2 official page, you see four .ts files:
- app.component.ts
- boot.ts
- hero.ts
- hero-detail.component.ts
and when you look at app.component.ts
file, you see the following part:
import {Hero} from './hero';
import {HeroDetailComponent} from './hero-detail.component';
It works perfectly when you compile all .ts files separately, but I'd like to concat() them into one single .js file so that there would be less http requests. I'm using gulp, and tried gulp-concat
, which didn't work. browserify
neither.
Would anyone help? Thanks in advance.