mako-js
A plugin for working with JS, using npm as a package manager.
Purpose
- compiles each entry file recursively via
require(...)
statements into a single output file (similar to browserify/webpack) - makes JSON files
require
-able - allow for creating a shared dependency bundle
- generates proper source maps (to be written by mako-sourcemaps)
API
js(options)
Create a new plugin instance, with the following options
available:
browser
if unset, will disable browser-specific features, resulting in a script that can run in nodebundle
if set, should be a pathname (relative toroot
) that specifies an extra file to put shared dependencies incheckSyntax
if unset, will disable the syntax check hookcore
adds a list of custom "core modules" to resolvedetectiveOptions
additional options to be passed to detectiveextensions
additional extensions to resolve with in addition to.js
and.json
(eg:.coffee
)modules
additional modules to be passed to browser-resolveresolveOptions
additional options to be passed to resolvesourceMaps
specifytrue
to enable source-maps (default:false
)sourceRoot
specifies the path used as the source map root (default:"mako://"
)