__no__de __mo__dules for the browser.
- Write modules for Node and browsers without environment branching.
- Dependency management with NPM for browser packages.
- Merge scripts into a single file.
npm install nomo
- Reads a package.json in the current directory to find the main file or fall
- Scans the js file for
requireand resolves them relatively. It also looks into
- Generate a script with all modules wrapped into a micro module loading framework and prints it on stdout.
nomo section into your package.json. The following properties are
require: The main file to initially require in the generated script
exportTarget: Assigns the result of the initial require call to the given path, e.g.
requireTarget: Assigns the internal require function to the given path, e.g.
window.require. If the require function already exists, it will be replaced and delegated to if the module is not found.
fileName: The desired file name. Defaults to nomo.js.
name: The name of the project to put into the script header. Defaults to the package name.
- Configuration via command line options.