How to use the systemjs.defaultJSExtensions function in systemjs

To help you get started, we’ve selected a few systemjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 01alchemist / TurboScript / sample / make.js View on Github external
// combine kernel modules and compile
"use strict";
let fs = require("fs");
let path = require("path");
let childProcess = require("child_process");
let System = require('systemjs');
System.defaultJSExtensions = true;

// let modules = [//     "./src/turbo/common.tts",//     "./src/tracer/axis.tts",//     "./src/turbo/color.tts",//     "./src/turbo/vector.tts",//     "./src/utils/util.tts",//     "./src/turbo/box.tts",//     "./src/turbo/matrix.tts",//     "./src/turbo/image.tts",//     "./src/turbo/texture.tts",//     "./src/turbo/material.tts",//     "./src/tracer/ray.tts",////     "./src/turbo/shapes/shape.tts",//     "./src/turbo/shapes/cube.tts",//     "./src/turbo/shapes/sphere.tts",//     "./src/turbo/shapes/triangle.tts",//     "./src/turbo/shapes/mesh.tts",////     "./src/turbo/tree.tts",//     "./src/tracer/hit.tts",//     "./src/turbo/camera.tts",//     "./src/turbo/scene.tts",//     "./src/three/buffer_geometry.tts",//     "./src/tracer/sampler.tts",////     "./src/tracer/vector3.tts",//     "./src/tracer/color3.tts",//     "./src/tracer/matrix4.tts",//// ];
let modules = [
    "./src/turbo/vector3.tbs",
    "./src/turbo/color.tbs",
    "./src/turbo/image.tbs"
];
let buildCommand = [];
modules.forEach((file) => {
    buildCommand.push(path.resolve(__dirname, file));
});

let TURBO_PATH = path.resolve(__dirname, "../");
process.env.TURBO_PATH = TURBO_PATH;

// let outFile = path.resolve(__dirname, "xray-kernel-turbo.asm.js");
let outFile = path.resolve(__dirname, "xray-kernel-turbo");