(dev)tools for working with SystemJS
npm install systemjs-toolssystemjs-tools is a collection of powerful, customizable build tools,
to help build compelling development and production stories for projects
that rely on SystemJS. Think figwheel
or webpack, for SystemJS.
Install the cli
yarn global add systemjs-tools
Navigate to your frontend root and initialise the config
THIS STEP DOESN'T WORK YET, YOU NEED TO MANUALLY CREATE THE CONFIG
systemjs init
Start the development server
systemjs serve
systemjs-tools provides you with the following
- Snappy Page Refreshes
- Hot Module Replacement
- Cache Persistence (across process restarts)
- Automatic Configuration and Smart Defaults
- Bundling and Builds
- Contribution Friendly Codebase
- Automatic JSPM Interoperability
- Development Feedback Console
- node_modules package resolution (beta)
- Project Templates
- IDE Analysis Engine
items in bold are unfinished
systemjs-tools is my contribution towards tooling forsystemjs-tools exposes a cli tool and a server-side library and has deep integrationsystemjs-tools uses systemjs-hot-reloadersystemjs-tools (cli and server) upon initialization, searches upwards forproject root directory (indicated by a systemjs-tools.js file or a systemjs-toolspackage.json). It then loads the relevant config,If you do not already have a config file, navigate to the directory containing
your frontend source files and run systemjs init (not ready yet),
to create a config describing your project.
Typically one would then run a command such as systemjs serve, to start
up a development server.
```
openssl req -x509 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -days 365 -nodes -subj '/CN=localhost' -reqexts SAN -extensions SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:localhost"))
To use this, specify a configuration within your systemjs-tools.js:
`js
fs = require('fs')
// Specify keys for localhost
module.exports.config.serve.keys = {
key: fs.readFileSync('localhost.key', 'utf-8'),
cert: fs.readFileSync('localhost.crt', 'utf-8'),
ca: fs.readFileSync('localhost.key', 'utf-8'),
}
module.exports.config.channel = {
keys: module.exports.config.serve.keys
}
`
For an in-depth look at the API, checkout the links below.