mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
49 lines
773 B
TypeScript
49 lines
773 B
TypeScript
import SystemJS = require('systemjs');
|
|
|
|
SystemJS.config({
|
|
baseURL: '/app'
|
|
});
|
|
|
|
SystemJS.import('main.js');
|
|
|
|
SystemJS.config({
|
|
// or 'traceur' or 'typescript'
|
|
transpiler: 'babel',
|
|
// or traceurOptions or typescriptOptions
|
|
babelOptions: {
|
|
|
|
}
|
|
});
|
|
|
|
|
|
SystemJS.config({
|
|
map: {
|
|
traceur: 'path/to/traceur.js'
|
|
}
|
|
});
|
|
|
|
SystemJS.config({
|
|
map: {
|
|
'local/package': {
|
|
x: 'vendor/x.js'
|
|
},
|
|
'another/package': {
|
|
x: 'vendor/y.js'
|
|
}
|
|
}
|
|
});
|
|
|
|
SystemJS.transpiler = 'traceur';
|
|
|
|
|
|
// loads './app.js' from the current directory
|
|
SystemJS.import('./app.js').then(function (m) {
|
|
console.log(m);
|
|
});
|
|
|
|
SystemJS.import('lodash').then(function (_) {
|
|
console.log(_);
|
|
});
|
|
|
|
const clonedSystemJSJS = new SystemJS.constructor();
|