aularon / produce-example-no-conf

A no-configuration (zero config) example for produce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

produce-example-no-conf

A no-configuration example for produce engine.

produce looks at your package.json and finds plugins, automatically sets rules from that.

Then, based command line arguments it sets source and target (more info on this in the Run section below)

Setup

1. Clone repository

git clone https://github.com/aularon/produce-example-no-conf.git
cd produce-example-no-conf/
npm install

2. Install produce globally

npm install -g produce

Run

1. Development mode (serve/preview/etc.)

This mode takes one argument, that is the source directory, and creates a FileSystemSource out of it, then delivers it over HTTP (using HTTPTarget) on port 9000 (or PORT environment variable)

produce source/

After that point your browser at http://localhost:9000/index.html and it will serve automatically-transformed files

Example TTY GIF for dev mode run

2. Production mode (dist/build/etc.)

This mode takes two arguments, first is the source directory and the second is the target directory, and creates a FileSystemSource and FileSystemTarget out of them, then runs transforming every file in source dir to target dir, using the transformation rules provided by the automatically loaded plugins

produce source/ target/

Example TTY GIF for production mode run

target/ is an arbitrarily named folder, it can be anything.

About

A no-configuration (zero config) example for produce


Languages

Language:CoffeeScript 63.0%Language:HTML 27.0%Language:CSS 10.0%