npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

systemjs-tools

v2.0.1

Published

(dev)tools for working with SystemJS

Downloads

57

Readme

SystemJS Tools (beta)

npm version

systemjs-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.

Quick Start

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

Features

systemjs-tools provides you with the following

items in bold are unfinished

Motivation

Current development workflows for SystemJS leave much to be desired. Projects end up clobbering together a slow, haphazard subset of their desired workflow and the frustration this causes contributes to developers leaving the SystemJS ecosystem. That's ridiculous, SystemJS provides EXCELLENT primitives to build seamless development workflows and we should be leveraging that. systemjs-tools is my contribution towards tooling for the SystemJS ecosystem, and I would encourage you, if you have the time, to help contribute towards filling the gaps that exist in our ecosystem.

Usage

systemjs-tools exposes a cli tool and a server-side library and has deep integration with systemjs-hot-reloader. Each exposes layered abstractions and hooks for you to describe your unique environment, while still providing a largely automatic experience at all levels.

Client

systemjs-tools uses systemjs-hot-reloader as its frontend client. As such you should follow the instructions listed in the README.

General Usage

systemjs-tools (cli and server) upon initialization, searches upwards for a project root directory (indicated by a systemjs-tools.js file or a systemjs-tools key in your package.json). It then loads the relevant config, describing your environment (eg. baseURL directory and port to serve on).

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.

Setting up trust for the SPDY server

It may be helpful to generate your own localhost certificates for the SPDY server and trust that with your browser. Recently, Chrome and Firefox have begun rejecting certificates that do not specify a Subject Alternative Name. Here is a one-liner to generate your own localhost.crt and localhost.key:

  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:

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
}

API

For an in-depth look at the API, checkout the links below.

  1. Config
  2. Server
  3. CLI

Roadmap (currently usable for development)

  • [x] basic development bundling with file busting
  • [x] cli - boilerplate generation
  • [x] cli - config generation via systemjs-config-builder
  • [x] cli - serve wrapper
  • [x] promise construct for serialization of builder operations
  • [x] rxjs core api (for plugin communication)
  • [x] cross session generic cache with file busting
  • [x] development mode
  • [x] sourcemap support
  • [x] hot module replacement
  • [x] handlers - [static, bundle]
  • [x] basic documentation
  • [x] handlers - [named bundle mappings]
  • [ ] handlers - [compile, http2 server push]
  • [ ] logging via debug package
  • [ ] preemptive file loading
  • [ ] production build story
  • [ ] hmr - [preemptive sources]
  • [ ] development console with error catching
  • [ ] configuration schema and validation (using ajv)
  • [ ] cli - use config schema to automatically expose options
  • [ ] generic dependency tree mapping for hmr of things that have their own dependency resolvers (eg. sass and pcss)