New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

build-modules

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-modules

`build-modules` ============

  • 1.0.11
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
30
increased by114.29%
Maintainers
1
Weekly downloads
 
Created
Source

build-modules

DEPRECATED - I highly recommend using webpack over browserify or any browserify-derived modules (like build-modules). Webpack is eaiser to develop in than browserify, and creates more efficient bundles.

Builds modules of different formats from a CommonJS (node.js style) source file. Builds AMD and traditional globalized browser module pattern files, minified and non-minified.

Install

npm install build-modules

Example

var build = require('buildModules')
build('outputDirectory/', 'moduleName', '/*Some Header - probably a copywrite*/', 'some/path/to/file.js', function(error) {
   // done
})

Why use build-modules over...

  • Browserify - build-modules uses browserify under the hood, but makes it much simpler to put together simple umd packages.

Usage

buildDirectory, name, header, modulePath

build(<outputDirectory>, <moduleName>, <header>, <modulePath>, <errback>)
  • <outputDirectory> is the directory in which the built files are created
  • <moduleName> is name of the module
  • <header> is a header included in each built file
  • <modulePath> is the path of the file to build
  • <errback> is a node.js errback function (first argument is error) that is called when build is finished.

Outputs the following files:

  • A minified and unminified universal module
  • A sourcemap file for mapping from the minified to the non-minified modules for both amd and globalized versions.

Change Log

  • 1.0.10 - upgrading modules so no dependencies have post-install scripts (which npm chokes on very often)
  • 1.0.9
    • deprecating this module
    • adding bundle options to support sourcemaps (this is probably the last addition that will be made to this module)
  • 1.0.4 - changing api to pass in the module path as the 4th parameter instead of the module contents
  • 1.0.2 - now uses browserify and just outputs umd packages.
  • 1.0.1 - now supports modules with dependencies!

License

Released under the MIT license: http://opensource.org/licenses/MIT

FAQs

Package last updated on 30 Apr 2014

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