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

one

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

one

Bundles NodeJS modules/libraries for web browsers

  • 3.0.12
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
decreased by-24.22%
Maintainers
1
Weekly downloads
 
Created
Source

OneJS v3

Bundles NodeJS modules/libraries for web browsers.

$ one index.js > browser.js

Or, from NodeJS:

one('index.js').save('bundle.js')

See tests for more examples and documentation.

Looking for OneJS v2?

What's New?
V2 Compatibility
  • Multiple bundles, async require and in-manifest configurations haven't implemented yet.
  • No more main modules. The specified entry module will be called by the bundle itself.
Who Uses OneJS v3?

Command-line Manual

    USAGE

        onejs [entry] [options]

    ENTRY

       An entry might be any filename that's under an NPM package.

       Examples:

          onejs myapp/index.js
          cd myapp && onejs
          myapp test/index.js
          myapp lib/foo/bar.js

    OPTIONS
        -o      --target      Target file to save the build.

        -d      --debug       Enable SourceUrls and verbose mode.
        -g      --global      Expose a global require.
        -r      --require     Require given URI from the entry module. e.g -a .\/foo,underscore
        -i      --ignore      Ignore given modules or packages. e.g -i lib\/foo.js,underscore
        -n      --native      Forward builtins & unresolved modules to native/global require.

        -v      --version     Show version and exit.
        -h      --help        Show this help and exist.

    DEBUGGING

        Enable debugging by setting the environment variable "DEBUG" as following

        DEBUG=one:* onejs

JavaScript Manual

one('index.js').save('bundle.js')

All Available methods:

one('index.js').debug().global().require('foobar').ignore('jquery').native().save('/tmp/foo.js')

See the command-line manual above for details.

TODO

  • -t --tie
  • Async Require & Multiple Bundles
  • Components/Assets

FAQs

Package last updated on 13 May 2013

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