diff --git a/.gitignore b/.gitignore index fe24bd9..5d8a5a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ -# v1.3.5 October 31, 2013 +# v1.3.10 December 10, 2013 # https://github.com/bevry/base # Temp Files **/*.log +**/.docpad.db # Build Files build/ @@ -10,3 +11,8 @@ components/ bower_components/ node_modules/ out/ + +# ===================================== +# CUSTOM MODIFICATIONS + +# None diff --git a/.npmignore b/.npmignore index 2613dcc..91caedf 100644 --- a/.npmignore +++ b/.npmignore @@ -1,8 +1,9 @@ -# v1.3.3 October 26, 2013 +# v1.3.10 December 10, 2013 # https://github.com/bevry/base # Temp Files **/*.log +**/.docpad.db # Build Files build/ @@ -23,4 +24,9 @@ HISTORY.md # Other Package Definitions template.js component.json -bower.json \ No newline at end of file +bower.json + +# ===================================== +# CUSTOM MODIFICATIONS + +# None diff --git a/.travis.yml b/.travis.yml index 4eb0e7e..5a60058 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,22 @@ -# v1.3.8 November 7, 2013 +# v1.3.17 May 29, 2014 # https://github.com/bevry/base language: node_js +# ensure npm is the latest (handled via npm install -g npm) +# ensure dev dependencies are installed (handled via npm install) +# ensure test dependencies are installed (handled via cake install) +install: "npm install -g npm && npm install && ./node_modules/.bin/cake install" +# ensure our application is compiled before we run our tests +before_script: "./node_modules/.bin/cake compile" script: "npm test" node_js: - "0.8" - "0.10" +cache: + directories: + - node_modules notifications: irc: - "irc.freenode.org#bevry-dev" email: recipients: - - travisci@bevry.me \ No newline at end of file + - travisci@bevry.me diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab90baa..6dc12e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -75,8 +75,7 @@ For project maintainers ``` 5. Publish new version - + ``` bash cake publish ``` - diff --git a/Cakefile b/Cakefile index 71c7d35..1d9dbf3 100644 --- a/Cakefile +++ b/Cakefile @@ -1,4 +1,4 @@ -# v1.3.13 December 19, 2013 +# v1.3.16 May 23, 2014 # https://github.com/bevry/base @@ -24,18 +24,17 @@ PACKAGE_DATA = require(PACKAGE_PATH) MODULES_PATH = pathUtil.join(APP_PATH, "node_modules") DOCPAD_PATH = pathUtil.join(MODULES_PATH, "docpad") -BIN_PATH = pathUtil.join(MODULES_PATH, ".bin") -CAKE = pathUtil.join(BIN_PATH, "cake" + EXT) -COFFEE = pathUtil.join(BIN_PATH, "coffee" + EXT) -PROJECTZ = pathUtil.join(BIN_PATH, "projectz" + EXT) -DOCCO = pathUtil.join(BIN_PATH, "docco" + EXT) -DOCPAD = pathUtil.join(BIN_PATH, "docpad" + EXT) +CAKE = pathUtil.join(MODULES_PATH, "coffee-script/bin/cake") +COFFEE = pathUtil.join(MODULES_PATH, "coffee-script/bin/coffee") +PROJECTZ = pathUtil.join(MODULES_PATH, "projectz/bin/projectz") +DOCCO = pathUtil.join(MODULES_PATH, "docco/bin/docco") +DOCPAD = pathUtil.join(MODULES_PATH, "docpad/bin/docpad") config = {} config.TEST_PATH = "test" config.DOCCO_SRC_PATH = null config.DOCCO_OUT_PATH = "docs" -config.COFFEE_SRC_PATH = "src" # eventually we'll set this to null, right now it isn't for b/c compat +config.COFFEE_SRC_PATH = null config.COFFEE_OUT_PATH = "out" config.DOCPAD_SRC_PATH = null config.DOCPAD_OUT_PATH = "out" @@ -82,10 +81,10 @@ actions = clean: (opts,next) -> # Prepare (next = opts; opts = {}) unless next? - + # Add compilation paths args = ['-Rf', config.COFFEE_OUT_PATH, config.DOCPAD_OUT_PATH, config.DOCCO_OUT_PATH] - + # Add common ignore paths for path in [APP_PATH, config.TEST_PATH] args.push( @@ -133,11 +132,11 @@ actions = step2 = -> return step3() if !config.COFFEE_SRC_PATH or !fsUtil.existsSync(COFFEE) console.log('coffee compile') - spawn(COFFEE, ['-co', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) + spawn(NODE, [COFFEE, '-co', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) step3 = -> return step4() if !config.DOCPAD_SRC_PATH or !fsUtil.existsSync(DOCPAD) console.log('docpad generate') - spawn(DOCPAD, ['generate'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4) + spawn(NODE, [DOCPAD, 'generate'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step4) step4 = next # Start @@ -154,12 +153,12 @@ actions = step2 = -> return step3() if !config.COFFEE_SRC_PATH or !fsUtil.existsSync(COFFEE) console.log('coffee watch') - spawn(COFFEE, ['-wco', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background + spawn(NODE, [COFFEE, '-wco', config.COFFEE_OUT_PATH, config.COFFEE_SRC_PATH], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background step3() # continue while coffee runs in background step3 = -> return step4() if !config.DOCPAD_SRC_PATH or !fsUtil.existsSync(DOCPAD) console.log('docpad run') - spawn(DOCPAD, ['run'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background + spawn(NODE, [DOCPAD, 'run'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe) # background step4() # continue while docpad runs in background step4 = next @@ -193,11 +192,11 @@ actions = step2 = -> return step3() if !fsUtil.existsSync(PROJECTZ) console.log('projectz compile') - spawn(PROJECTZ, ['compile'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) + spawn(NODE, [PROJECTZ, 'compile'], {stdio:'inherit', cwd:APP_PATH}).on('close', safe next, step3) step3 = -> return step4() if !config.DOCCO_SRC_PATH or !fsUtil.existsSync(DOCCO) console.log('docco compile') - exec("#{DOCCO} -o #{config.DOCCO_OUT_PATH} #{config.DOCCO_SRC_PATH}", {stdio:'inherit', cwd:APP_PATH}, safe next, step4) + exec("#{NODE} #{DOCCO} -o #{config.DOCCO_OUT_PATH} #{config.DOCCO_SRC_PATH}", {stdio:'inherit', cwd:APP_PATH}, safe next, step4) step4 = -> console.log('cake test') actions.test(opts, safe next, step5) diff --git a/HISTORY.md b/HISTORY.md index 169e022..87605cf 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,13 +1,17 @@ # History -- v1.1.1 December 27, 2013 - - Fixed `domain.create()` not returning anything +## v1.1.2 June 8, 2014 +- Added `domain.createDomain()` alias + - Thanks to [James Halliday](https://github.com/substack) for [pull request #1](https://github.com/bevry/domain-browser/pull/1) -- v1.1.0 November 1, 2013 - - Dropped component.io and bower support, just use ender or browserify +## v1.1.1 December 27, 2013 +- Fixed `domain.create()` not returning anything -- v1.0.1 September 18, 2013 - - Now called `domain-browser` everywhere +## v1.1.0 November 1, 2013 +- Dropped component.io and bower support, just use ender or browserify -- v1.0.0 September 18, 2013 - - Initial release +## v1.0.1 September 18, 2013 +- Now called `domain-browser` everywhere + +## v1.0.0 September 18, 2013 +- Initial release diff --git a/README.md b/README.md index 11b2261..5fe6aa9 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,13 @@ [![Build Status](http://img.shields.io/travis-ci/bevry/domain-browser.png?branch=master)](http://travis-ci.org/bevry/domain-browser "Check this project's build status on TravisCI") [![NPM version](http://badge.fury.io/js/domain-browser.png)](https://npmjs.org/package/domain-browser "View this project on NPM") +[![Dependency Status](https://david-dm.org/bevry/domain-browser.png?theme=shields.io)](https://david-dm.org/bevry/domain-browser) +[![Development Dependency Status](https://david-dm.org/bevry/domain-browser/dev-status.png?theme=shields.io)](https://david-dm.org/bevry/domain-browser#info=devDependencies)
[![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip") [![Flattr donate button](http://img.shields.io/flattr/donate.png?color=yellow)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr") [![PayPayl donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal") +[![BitCoin donate button](http://img.shields.io/bitcoin/donate.png?color=yellow)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin") +[![Wishlist browse button](http://img.shields.io/wishlist/browse.png?color=yellow)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us") @@ -28,14 +32,14 @@ Note, this is merely an evented try...catch with the same API as node. Nothing m ## Install -### [Node](http://nodejs.org/) +### [NPM](http://npmjs.org/) - Use: `require('domain-browser')` - Install: `npm install --save domain-browser` ### [Browserify](http://browserify.org/) - Use: `require('domain-browser')` - Install: `npm install --save domain-browser` -- CDN URL: `//wzrd.in/bundle/domain-browser@1.1.1` +- CDN URL: `//wzrd.in/bundle/domain-browser@1.1.2` ### [Ender](http://ender.jit.su/) - Use: `require('domain-browser')` @@ -69,6 +73,8 @@ No sponsors yet! Will you be the first? [![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip") [![Flattr donate button](http://img.shields.io/flattr/donate.png?color=yellow)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr") [![PayPayl donate button](http://img.shields.io/paypal/donate.png?color=yellow)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal") +[![BitCoin donate button](http://img.shields.io/bitcoin/donate.png?color=yellow)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin") +[![Wishlist browse button](http://img.shields.io/wishlist/browse.png?color=yellow)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us") ### Contributors diff --git a/index.js b/index.js index b792da3..7a3625e 100644 --- a/index.js +++ b/index.js @@ -1,27 +1,26 @@ /*global define:false require:false */ module.exports = (function(){ - // Import Events - var events = require('events'); + // Import Events + var events = require('events'); - // Export Domain - var domain = {}; - domain.create = function(){ - var d = new events.EventEmitter(); - d.run = function(fn){ - try { - fn(); - } - catch (err) { - this.emit('error', err); - } - return this; - }; - d.dispose = function(){ - this.removeAllListeners(); - return this; - }; - return d; - }; - domain.createDomain = domain.create; - return domain; + // Export Domain + var domain = {}; + domain.createDomain = domain.create = function(){ + var d = new events.EventEmitter(); + d.run = function(fn){ + try { + fn(); + } + catch (err) { + this.emit('error', err); + } + return this; + }; + d.dispose = function(){ + this.removeAllListeners(); + return this; + }; + return d; + }; + return domain; }).call(this); \ No newline at end of file diff --git a/package.json b/package.json index b945147..6ffc8a4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "title": "Node's [domain module](http://nodejs.org/api/domain.html) for the web browser", "name": "domain-browser", - "version": "1.1.1", + "version": "1.1.2", "description": "Note, this is merely an evented try...catch with the same API as node. Nothing more.", "homepage": "https://github.com/bevry/domain-browser", "license": { @@ -10,9 +10,13 @@ "badges": { "travis": true, "npm": true, + "david": true, + "daviddev": true, "gittip": "bevry", "flattr": "344188/balupton-on-Flattr", - "paypal": "QB8GQPZAH84N6" + "paypal": "QB8GQPZAH84N6", + "bitcoin": "https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a", + "wishlist": "http://amzn.com/w/2F8TXKSNAFG4V" }, "keywords": [ "domain", @@ -53,8 +57,8 @@ "main": "./index.js", "devDependencies": { "projectz": "~0.3.2", - "chai": "~1.8.1", - "joe": "~1.3.2", + "chai": "~1.9.1", + "joe": "~1.4.0", "joe-reporter-console": "~1.2.1" }, "scripts": {