Skip to content

Commit

Permalink
Working on new builder
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Mar 24, 2011
1 parent bf5a74a commit bd199ce
Show file tree
Hide file tree
Showing 4 changed files with 480 additions and 270 deletions.
61 changes: 51 additions & 10 deletions README.md
@@ -1,21 +1,62 @@
Welcome to Buildr. The JavaScript Package Buildr.
# Welcome to Buildr. The JavaScript Package Buildr.

Install it like so:

## Installation

npm install buildr

Use it like so:
__Note: if you would like to be able to compress image files, you will also need to follow the installation instructions [here](https://github.com/bentruyman/pulverizr/blob/master/pulverizr.js)__


## Usage

buildr .

Optionally you can specify a `package.json` file that contains:

- `js: ['file1.js','file2.js']` - a list of javascript files to bundle and minify
- `css: ['file1.css','file2.css']` - a list of css files to bundle and minify
## Configuration

Buildr does not require any configuration by default, but if you would like to configure it you can create a `package.json` file which contains the following keys a `buildr` key:

- `compress`: a boolean value or an object, if an object:
- `js`: a boolean value
- `css`: a boolean value
- `img`: a boolean value
- `html`: a boolean value

- `bundle`: a boolean value or an object, if an object:
- `js`: a boolean value or a javascript filename
- `css`: a boolean value or a css filename
- `src`: a boolean value; for whether or not we should bundle the source files too

- `directories`: an object
- `out`: a directory path; of where the compiled files will go
- `src`: a directory path; of where source files come from

- `subpackages`: an array; containing the locations of each subpackage to compress and bundle

- `files`: an object
- `js`: an array; of javascript files to compress and bundle
- `css`: an array; of css files to compress and bundle

- `templates`: an object
- `out-bundle-header.js`: a file path; to the header for the out bundled file
- `out-bundle-footer.js`: a file path; to the footer for the out bundled file
- `src-bundle-item.js`: a file path; to the replace string for each out bundled file
- `src-bundle-header.js`: a file path; to the header for the src bundled file
- `src-bundle-footer.js`: a file path; to the footer for the src bundled file
- `src-bundle-item.js`: a file path; to the replace string for each src bundled file


## License

Licensed under the [MIT License](http://creativecommons.org/licenses/MIT/)
Copyright 2011 [Benjamin Arthur Lupton](http://balupton.com)


Todo:
## Todo

1. Document properly
2. Make it asynchronous
3. Turn the CSS minifier into it's own project
1. Make it asynchronous
2. Turn the CSS minifier into it's own project
3. Add image optimisation
4. Support the sweet package json file above

2 changes: 1 addition & 1 deletion bin/buildr.js
@@ -1,7 +1,7 @@
// Prepare
var
Buildr = require('buildr').Buildr,
myBuildr = new Buildr(process.argv[2]||__dirname);
myBuildr = new Buildr(process.argv[2]||'.');

// Run
myBuildr.run();

0 comments on commit bd199ce

Please sign in to comment.