systemjs-configurator
v0.4.1
Published
Build SystemJS configurations for node packages
Downloads
10
Readme
SystemJS Configurator
A tool to build SystemJS configurations for your Node.js project and all its package dependencies.
Installation
yarn add systemjs-configurator --dev
Or
npm install systemjs-configurator --save-dev
Usage
const configurator = require("systemjs-configurator");
// Some optional params
const options = {
basedir: "path/to/dir",
outfile: "path/to/out/file",
excludes: ["package-a", "package-b", ...],
overrides: { "systemjs-plugin-text": {name: "text"} }
};
let config = configurator.buildConfig(options);
console.log(JSON.stringify(config, null, 2));
configurator.writeConfig(config, "systemjs.config.js");
options:
basedir
: The path to your project's base direcotry (default:process.cwd()
).outfile
: The file path to write out the config to. If not defined no file will be written (default:null
).excludes
: A list of package names to exclude from the configuration (default:[]
).overrides
: An object containing package overrides (default:{}
).
Examples
bootstrap
: Shows you, how to override thepackage.json
of a dependency so that it works with SystemJS. Given this package.json the following systemjs.config.js is created.
License
Released under the MIT license.