Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
This is a CommonJS/npm compatible module system. It works both client-side and server-side in Node.js. For browsers, it supports refresh-to-reload debugging, as well as a build step compatible with Browserify to produce bundles for production. The System module loader can resolve both module and resource locations by module identifier across package boundaries.
In addition, System adds support for configuring module translators (text to JavaScript text), dependency analyzers, and compilers (text to module factory function).
npm init
npm install --save system
To load in Node.js:
var System = require("system");
System.loadSystem(location)
.then(function (system) {
return system.import("./entry");
});
To load in a browser during development:
<script src="node_modules/system/boot.js" data-import="./entry"></script>
To bundle for deployment:
bundle entry.js > bundle.js
Then to load in production:
<script src="bundle.js"></script>
This project started at Motorola Mobility with the work of Tom Robinson (@tlrobinson), originally called C.js. This became the foundation for module loading in Motorola Mobility's MontageJS web application framework, thus the name Montage Require, or Mr. Kris Kowal (@kriskowal) took responsibility for maintaining the library, converted it to use promises internally, and added support for loading packages installed by npm. Stuart Knightley (@stuk) took over responsibility for maintaining the library when work on MontageJS resumed at Montage Studio.
The System module loader is an iteration from that lineage, with a more focused scope, targetting npm packages more precisely, an interface more closely aligned with the proposed ECMAScript System object, adding support for configurable (per package in package.json) translators, compilers, and dependency analyzers.
FAQs
Flexible module and resource system
The npm package system receives a total of 13,245 weekly downloads. As such, system popularity was classified as popular.
We found that system demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.