Skip to content

Commit

Permalink
Updated the readme to make a bit more informational
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed May 4, 2011
1 parent 956d530 commit 225a20d
Showing 1 changed file with 57 additions and 9 deletions.
66 changes: 57 additions & 9 deletions README.md
Expand Up @@ -3,13 +3,60 @@

## Installation

npm install buildr

__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/balupton/pulverizr)__
1. To install buildr, you first need Node.js and NPM installed, if you do not have them installed run the following:

- On OSX
1. [Install Git](http://git-scm.com/download)

2. [Install Xcode](http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1)

3. Run the following in terminal
sudo chown -R $USER /usr/local
git clone https://github.com/joyent/node.git && cd node && git checkout v0.4.7 && ./configure && make && sudo make install && cd .. && rm -Rf node
curl http://npmjs.org/install.sh | sh
- On Apt Linux

sudo chown -R $USER /usr/local
sudo apt-get update && sudo apt-get install curl build-essential openssl libssl-dev git
git clone https://github.com/joyent/node.git && cd node && git checkout v0.4.7 && ./configure && make && sudo make install && cd .. && rm -Rf node
curl http://npmjs.org/install.sh | sh

- On Yum Linux
sudo chown -R $USER /usr/local
sudo yum -y install tcsh scons gcc-c++ glibc-devel openssl-devel git
git clone https://github.com/joyent/node.git && cd node && git checkout v0.4.7 && ./configure && make && sudo make install && cd .. && rm -Rf node
curl http://npmjs.org/install.sh | sh

2. To install buildr globally with NPM v1

npm -g install buildr

3. If you would also like to enable image compression, run the following

- On OSX

npm -g install pulverizr-bal
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
brew install gifsicle libjpeg optipng pngcrush

- On Apt Linux
npm -g install pulverizr-bal
sudo apt-get update && sudo apt-get install gifsicle libjpeg-progs optipng pngcrush

- On Yum Linux
sudo yum -y install gifsicle libjpeg-progs optipng pngcrush


## Usage

In the javascript program which you would like to buldr, run the following in terminal:

buildr .


Expand All @@ -24,14 +71,13 @@ Buildr does not require any configuration by default, but if you would like to c
- `html`: a boolean value

- `check`: 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
- `jsOptions`: a object
- `js`: a boolean value; whether or not we should run javascript through the JSLint checker before building
- `jsOptions`: an object; to pass to the JSLint checker

- `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
- `js`: a boolean value or a javascript filename; what should the bundled Javascript file be called?
- `css`: a boolean value or a css filename; what should hte bundled CSS file be called?
- `src`: a boolean value; whether or not we should bundle the source files too

- `directories`: an object
- `out`: a directory path; of where the compiled files will go
Expand All @@ -54,6 +100,8 @@ Buildr does not require any configuration by default, but if you would like to c
- `src_bundle_item.js`: a file path; to the replace string for each src bundled file
- `src_bundle_subpackage.js`: a file path; to the replace string for each src bundled subpackage

For reference you can refer to the [History.js](https://github.com/balupton/history.js) [package.json file](https://github.com/balupton/history.js/raw/dev/package.json) which utilises simple bundling and compression, and the [Aloha Editor](https://github.com/alohaeditor/Aloha-Editor) [package.json file](https://github.com/alohaeditor/Aloha-Editor/raw/0.10/package.json) which utilises bundling for both the src and out packages, subpackages and javascript+css+image compression.


## License

Expand Down

0 comments on commit 225a20d

Please sign in to comment.