pack cli
Last updated 4 years ago by fruuf .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cc-pack 
SYNC missed versions from official npm registry.


  • simple build process cli for JS projects (node and browser)
  • babel (airbnb, react), webpack, sourcemaps and hot-reloading ready to go


  • imports and bundles scripts, stylesheets (sass), images, fonts, svgs and jsx
  • development server with hot reload and component hot reload
  • builds optimised production bundle with assets
  • proxy to sit on top of existing server


  • full es6 support
  • hot-reloading with source maps
  • builds bundle for node v4 and above

get started


git checkout demo
npm install
npm start


npm install fruuf/pack --save

add package links (package.json)

  "scripts": {
    "start": "pack -w",
    "build": "pack",
    "help": "pack -h"

folder structure

- src
  - main.js


enable react mode to mount export default Component from src/main into #render or an empty div. enables component hot reload while preserving state. if a directory src/components exists, components can be imported as modules. (import Component from 'Component'; resolves to src/components/Component.js).

folder structure

- src
  - components
    - App
      - index.js
      - style.scss
  - main.js


.description('pack a bundle')
.option('-n, --node', 'enable node mode', false)
.option('-w, --watch', 'enable watch mode', false)
.option('-r, --react', 'enable react', false)
.option('-e, --env', 'load .env file', false)
.option('-s --src [srcdir]', 'source directory [src]', 'src')
.option('-o, --output [directory]', 'output directory [dist]', 'dist')
.option('-a --assets [pubdir]', 'assets directory []', '')
.option('-p, --port [port]', 'port number [8080]', 8080)
.option('--bundle [bundle]', 'bundle name [bundle]', 'bundle')
.option('--main [main]', 'main filename [main]', 'main')
.option('--static [staticdir]', 'static folder for development server []', '')
.option('--proxy [proxy]', 'proxy port or server []', '')
.option('--components [compdir]', 'react component dir [components]', 'components')

Current Tags

  • 0.1.4                                ...           latest (4 years ago)

1 Versions

  • 0.1.4                                ...           4 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © |