1.0.3 • Published 10 years ago

gulp-systemjs-module-name-injector v1.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
10 years ago

Gulp systemjs module name injector

This plugin was created to aid with the TypeScript module system. When TypeScript files are compiled using the --module system flag, the compiler does not output module names.

An example:

System.register(["./other/module/dependency"], function($_export) {
  // ... module
});

The output is totally unusable, since the module doesn't have a name. This plugin converts the output to this:

System.register("module/path", ["./other/module/dependency"], function($_export) {
  // ... module
});

Usage

Install the plugin:

npm install gulp-systemjs-module-name-injector --save-dev

In your gulpfile:

var systemjsModuleName = require('gulp-systemjs-module-name-injector');

function buildTypescript() {
    return gulp.src(/* ... */)
        .pipe(typescript(tsProject))
        .pipe(systemjsModuleName())
        .pipe(/* ... */);
}
1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago