protopack
WORK-IN-PROGRESS. A bundler for prototypes.
npm install protopack --save-dev
Documentation
protopack
is built on top of rollup
, babel
, postcss
and many other libraries.
Get started
Create a new directory for a prototype. Add a file called .protopack.config.js
(or protopack.json
):
// .protopack.config.js'use strict' moduleexports = input: './src/index.html' output: './dist/index.html'
Create a new directory called src
, and add an index.html
file to it.
Then call:
NODE_ENV=production npx protopack build
Node.js API
const opts = cwd: path baseUrl: 'http://localhost:3000'
Express middleware
const app = const opts = cwd: path baseUrl: 'http://localhost:3000' // Use the middleware before routesapp app
TODO
- Support images
- Support inline styles/scripts (via
inline-source
?) - Hot-reloading
- Support custom
babel
presets/plugins - Support custom
postcss
plugins - Directory listing
-
express
middleware - Install missing npm modules on
build()