Very familiar with Gulp and Angular, new to TypeScript. I have been using Browserify to bundle my JavaScript and manage the dependency tree but as I understand it I won't want to use Browserify alongside TypeScript.
Before I would have something like this in my main/entry point file.
require('angular');
require('angular-ui-router');
require('./myModules/testModule')
require('./myControllers/mainController')
angular.module('exampleApp', ['mainController','testModule'])
.config(...);
}());
This would insure all of the necessary files were bundled into the final .js
app in the appropriate order.
However with TypeScript (using gulp-typescript) the way to reference other files for building seems to be:
/// <reference path="myModule.ts"/>)
But this only works for other TypeScript files. How would I load my angular
and other non TS deps?
For reference, my build looks like:
var jsStream = function() {
return gulp.src(PUBLIC + '/js/**/*.ts')
.pipe(typescript({
declarationFiles: false,
sortOutput: true,
out: 'app.js'
}))
.pipe( streamify( rev() ) )
.pipe( gulp.dest( PATHS.dest.js ) );
};