bob-bundler

1.1.0 • Public • Published

Bob Bundler

Bundle HTML, CSS, JS with optional server and live reload

Install

npm install bob-bundler -g

..or as devDependency:

npm install bob-bundler -D

Commands

bob build

  • Build all

bob dev

  • Build all
  • Watch and compile on file change
  • If using nodemon or static server, live reload browser

Configure

Set bob property in package.json

Example configuration

"bob": {
  "browserify": {
    "src": "src/client/index.js",
    "dest": "build/client/app.js",
    "watch": "src/client/**/*.js"
  },
  "sass": {
    "src": "src/client/index.scss",
    "dest": "build/client/app.css",
    "watch": "src/client/**/*.scss"
  },
  "html": {
    "src": "src/client/index.html",
    "dest": "build/client",
    "watch": "src/client/**/*.html"
  },
  "babel": {
    "src": "src/server",
    "dest": "build/server",
    "watch": "src/server/**/*.js"
  },
  "copy": {
    "src": "assets/**",
    "dest": "build/client",
    "watch": "assets/**"
  },
  "nodemon": {
    "src": "build/server",
    "port": "3000"
  },
  "static": {
    "src": "build/client",
    "port": "3001"
  }
}

All tasks are optional. Each task can also be an array.

Examples

See /examples folder in this repo.

  • client - Static site
  • client-react - Static site with React
  • server - Server only
  • fullstack - Site with express server
  • fullstack-react - TODO: React with server-side rendering

Run the example:

npm install && npm start

Readme

Keywords

none

Package Sidebar

Install

npm i bob-bundler

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

77.3 kB

Total Files

42

Last publish

Collaborators

  • eliot