64

GitHub - zeit/ncc: Like gcc, for Node.js

 5 years ago
source link: https://github.com/zeit/ncc
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

readme.md

ncc

Simple CLI for compiling a Node.js module into a single file, together with all its dependencies, gcc-style.

Motivation

ncc allows for using and testing rollup quickly, without special configuration.

Usage

CLI

$ ncc input.js -o bundle.js

Node.js

require('@zeit/ncc')('/path/to/input', {
  minify: true  // default
}).then(bundle => {
  // result of rollup `bundle.generate()` call
  console.log(bundle.code)
})

TODO

  • Make self-hosting

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK