README.md

Introduction

Weber improves upon Hem by providing more flexibility in terms of input sources and multiple build targets. If Hem
is good enough for you then stick with it. Otherwise take a look at what Weber can offer you below.

Installation

npm install -g weber

Usage

Weber runs in 3 modes. Let's look at the server mode first...

Server mode

Once you have Weber configured you can launch server mode by typing the following in the root of your project:

$ weber server

This will launch a simple Strata server running on http://localhost:9294.
This mode allows you to quickly test out your scripts, stylesheets and templates and rapidly iterate with them.

The above configuration is put there by Weber just to show you what configuration options are available.

The first key-value pair tells Weber which folder to use as the document root when running in server mode. In
this case Weber will expect an index.html file inside the ./public_assets folder to serve up when the browser
navigates to http://localhost:9294. If this setting is ommitted then Weber will assume the document root to be the
folder containing weber.json. By the way, Weber can be told to listen on a different port by adding a
port: <portnum key in the config file above.

The remaining key-value pairs in the config file tell Weber what to do when the browser visits the relative URLs
/css/app.css, /css/test.css, /js/app.js and /js/test.js respectively. When this happens Weber dynamically
builds and outputs these files using the information provided in the config file. Here is what it does for each file:

/css/app.css - concatenates reset.css with main.styl and then minifies the final result.

/css/test.css - concatenates all CSS and Stylus files in ./css/test.

/js/apps.js - concatenates the npm module es5-shimify with ./lib/jquery.js with all the modularized
versions of all the code in ./coffee and then minifies the final result.