Using `tsc` give output module a name | بلاگ

Using `tsc` give output module a name

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I have this code:

I use this command:

tsc --out foo.js values/java-junit/*.ts --module amd

or

tsc --out foo.js values/java-junit/*.ts --module system

and I get

define("index", ["require", "exports"], function (require, exports) {
    "use strict";
    exports.__esModule = true;
    var CodeGenerator = /** @class */ (function () {
        function CodeGenerator() {
            this.rawCode = '';
            this.styledCode = '';
        }
        // ...
        CodeGenerator.pluginName = 'java-junit';
        return CodeGenerator;
    }());
    exports.CodeGenerator = CodeGenerator;
});

or

System.register("index", [], function (exports_1, context_1) {
    "use strict";
    var __moduleName = context_1 && context_1.id;
    var CodeGenerator;
    return {
        setters: [],
        execute: function () {
            CodeGenerator = /** @class */ (function () {
                function CodeGenerator() {
                    this.rawCode = '';
                    this.styledCode = '';
                }
                 // ...
                CodeGenerator.pluginName = 'java-junit';
                return CodeGenerator;
            }());
            exports_1("CodeGenerator", CodeGenerator);
        }
    };
});

my question is - is there a way to name the module with a command line option, instead of the module name being "index"?

asked 35 secs ago
Olegzandr Denman

...
نویسنده : استخدام کار بازدید : 7 تاريخ : چهارشنبه 25 بهمن 1396 ساعت: 3:12