0.0.1 • Published 9 years ago
serve-bin v0.0.1
serve-bin
A zero-configuration plugin system for on-the-fly building and serving assets for development.
Installing
serve-bin
is available as an
npm package.
Usage
Add serve-bin
to the package.json
as follows:
{
"name": "project",
"private": true,
"scripts": {
"start": "serve"
},
"devDependencies": {
"serve-bin": "^0.0.1"
}
}
Then add plugins for each desired asset build workflow. Existing plugins are
listed below. By default, serve-bin
will serve static files with the src
directory as root.
From the command line, run:
npm start
Plugins
- serve-esnext compiles ES.next modules.
Writing Plugins
Plugins must have a name
that starts with serve-
.
{
"name": "serve-esnext",
"main": "src/index.js"
}
Plugins must export an Express middleware.
export default async function(request, response, next) {
// ...
}
Development
Getting Started
The application requires the following external dependencies:
- Node.js
The rest of the dependencies are handled through:
npm install
Run tests with:
npm test
0.0.1
9 years ago