Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buildumb

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buildumb

Ultra-dumb exporter of Node.js modules for use in the browser

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

======== buildumb

Ultra-dumb build tool for exporting Node.js_ modules for use in browsers.

.. _Node.js: http://nodejs.org/

Examples

Examples of build files written with buildumb:

  • No dependencies <https://github.com/insin/isomorph/blob/master/support/build.js>__
  • Bundling individual files from a dependency <https://github.com/insin/concur/blob/master/support/build.js>__
  • Lots of dependencies, some of which require eachother using different require() strings <https://github.com/insin/newforms/blob/master/support/build.js>__

API

formatTemplate(path[, arg1, ...])

Reads a template from the given path and formats it with util.format()_, using all additional arguments passed in.

.. _util.format(): http://nodejs.org/docs/latest/api/util.html#util.format

build(config)

Bundles up specified modules and exports to the global namespace, as instructed.

Expected config properties are:

root The absolute path to the build root directory (usually a project directory).

All other paths in the config object are relative to config.root. modules An object mapping source file paths to require() strings used to require them in your code. If the same file is required multiple ways, the right hand side should be an Array.

Did I mention it was dumb? exports An object mapping global variable names to the require() strings which should be used to export to them. output Path to the build output file. header (Optional) A comment header for inclusion at the top of output files. compress (Optional) Path to a compressed output file, which will be created if given.

The Closure Compiler Service API_ is used to compress code - errors, warnings and statistics it returns will be displayed.

A compressed version will not be written if there are errors present.

.. _Closure Compiler Service API: http://code.google.com/closure/compiler/docs/api-ref.html

exposeRequire (Optional) If true, require() will be exported to the global scope.

Keywords

FAQs

Package last updated on 15 Jul 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc