Skip to content

Commit

Permalink
0.8. Fixed concurrency support. Fixed compression under certain confi…
Browse files Browse the repository at this point in the history
…gurations. Added Caterpillar for awesome logging.
  • Loading branch information
balupton committed Sep 27, 2011
1 parent d84a5ff commit 19cb5b6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
21 changes: 10 additions & 11 deletions README.md
Expand Up @@ -38,21 +38,15 @@ Before you use Buildr, you must specify some configuration for it. The available
``` coffeescript
{
# Options
name: null # (name to be outputted in log messages) String or null
log: true # (log status updates to console?) true or false
watch: false # (automatically rebuild on file change?) true or false

# Handlers
buildHandler: (err) -> # (fired when build completed) function or false
if err
console.log err
throw err
console.log 'Building completed\n'
rebuildHandler: (err) -> # (fired when rebuild completed) function or false
if err
console.log err
throw err
console.log 'ReBuilding completed\n'

buildHandler: false # (fired when build completed) function or false
rebuildHandler: false # (fired when rebuild completed) function or false
successHandler: false # (fired when (re)build completed successfully) function or false

# Paths
srcPath: false # String
outPath: false # String or false
Expand Down Expand Up @@ -276,6 +270,11 @@ Copyright 2011 [Benjamin Arthur Lupton](http://balupton.com)

### Changelog

- v0.8 September 27, 2011
- Fixed concurrency support
- Fixed compression under certain configurations
- Added [Caterpillar](https://github.com/balupton/caterpillar.npm) for awesome console logging

- v0.7 August 22, 2011
- Added `watch`, `buildHandler` and `rebuildrHandler` options

Expand Down
14 changes: 7 additions & 7 deletions lib/buildr.coffee
Expand Up @@ -114,7 +114,7 @@ class Buildr
@config.successHandler.call(@) if @config.successHandler

# Logger
if @config.log is true then @config.log = 7
if @config.log is true then @config.log = 6
@logger or= @config.logger or new caterpillar.Logger
transports:
level: @config.log or 6
Expand Down Expand Up @@ -296,7 +296,7 @@ class Buildr
false
if @config.compressImages
@config.compressImages = false

# Auto find files?
# Not yet implemented
if @config.bundleScripts is true
Expand Down Expand Up @@ -713,7 +713,10 @@ class Buildr
@compressFile config.bundleStylePath, tasks.completer()

# Handle
@forFilesInDirectory(
@useOrScan(
# Array
config.compressScripts

# Directory
config.outPath

Expand Down Expand Up @@ -805,10 +808,7 @@ class Buildr
useOrScan: (files,parentPath,callback,next) ->
# Handle
if files is true
@forFilesInDir(
# Files
files

@forFilesInDirectory(
# Directory
parentPath

Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -52,15 +52,15 @@
},
"dependencies": {
"less-bal": "=1.1.4",
"coffee-script": "=1.1.1",
"coffee-script": "=1.1.2",
"bal-util": "=0.5",
"jshint": "=0.2.3",
"csslint": "=0.4.0",
"uglify-js": "=1.0.6",
"pulverizr-bal": "=0.5.4",
"cson": "=0.2.0",
"watch-tree": "=0.1.1",
"caterpillar": "=0.1.1"
"caterpillar": "=0.1.2"
},
"engines" : {
"node": ">=0.4.0"
Expand Down

0 comments on commit 19cb5b6

Please sign in to comment.