mako-js

1.1.4 • Public • Published

mako-js

A plugin for working with JS, using npm as a package manager.

npm version npm dependencies npm dev dependencies

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 node
  • bundle if set, should be a pathname (relative to root) that specifies an extra file to put shared dependencies in
  • checkSyntax if unset, will disable the syntax check hook
  • core adds a list of custom "core modules" to resolve
  • detectiveOptions additional options to be passed to detective
  • extensions additional extensions to resolve with in addition to .js and .json (eg: .coffee)
  • modules additional modules to be passed to browser-resolve
  • resolveOptions additional options to be passed to resolve
  • sourceMaps specify true to enable source-maps (default: false)
  • sourceRoot specifies the path used as the source map root (default: "mako://")

Readme

Keywords

Package Sidebar

Install

npm i mako-js

Weekly Downloads

3

Version

1.1.4

License

MIT

Last publish

Collaborators

  • dominicbarnes