2016-08-19 10:59:45 -07:00
|
|
|
'use strict';
|
|
|
|
|
/**
|
|
|
|
|
* Load the TypeScript compiler, then load the TypeScript gulpfile which simply loads all
|
|
|
|
|
* the tasks. The tasks are really inside tools/gulp/tasks.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
|
|
2017-06-16 19:58:34 +02:00
|
|
|
const tsconfigPath = path.join(__dirname, 'tools/gulp/tsconfig.json');
|
2017-07-05 18:10:22 -07:00
|
|
|
const tsconfig = require(tsconfigPath);
|
2017-06-16 19:58:34 +02:00
|
|
|
|
2016-08-19 10:59:45 -07:00
|
|
|
// Register TS compilation.
|
|
|
|
|
require('ts-node').register({
|
2017-06-16 19:58:34 +02:00
|
|
|
project: tsconfigPath
|
|
|
|
|
});
|
|
|
|
|
|
2017-07-05 18:10:22 -07:00
|
|
|
// The gulp tsconfig file maps specific imports to relative paths. In combination with ts-node
|
|
|
|
|
// this doesn't work because the JavaScript output will still refer to the imports instead of
|
|
|
|
|
// to the relative path. Tsconfig-paths can be used to support path mapping inside of Node.
|
|
|
|
|
require("tsconfig-paths").register({
|
|
|
|
|
baseUrl: path.dirname(tsconfigPath),
|
|
|
|
|
paths: tsconfig.compilerOptions.paths
|
|
|
|
|
});
|
|
|
|
|
|
2016-08-19 10:59:45 -07:00
|
|
|
require('./tools/gulp/gulpfile');
|