Permalink
Browse files

Wrap module in a JavaScript file and require coffee-script

Avoiding build step and managing compiled files
  • Loading branch information...
1 parent 6951155 commit 8cb334af57f9ad608252bcd64807520b97886674 @jacobrask committed Nov 7, 2011
View
@@ -1,10 +1,5 @@
{exec} = require 'child_process'
-task 'build', 'Compile CoffeeScript to JavaScript', ->
- exec 'coffee --compile --output lib/ src/', (err, stdout, stderr) ->
- throw err if err
- console.log stdout + stderr
-
task 'test', 'Run tests', ->
exec 'coffee test/*.coffee', (err, stdout, stderr) ->
throw err if err
View
@@ -14,14 +14,10 @@ Features so far
Install
-------
-upnp-device is not ready for npm yet, so you need to install manually. CoffeeScript is required for building.
+upnp-device is not ready for npm yet, so you need to install manually.
```bash
$ git clone https://github.com/jacobrask/node-upnp-device.git ./node_modules/upnp-device
-$ cd node_modules/upnp-device
-$ npm install -d
-# npm install -g coffee-script
-$ cake build
```
Usage
View
@@ -0,0 +1,2 @@
+require('coffee-script');
+module.exports = require('./lib/upnp');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -3,14 +3,13 @@
"version": "0.0.1",
"description": "Create UPnP devices.",
"dependencies": {
+ "coffee-script": ">=1.1.2",
"xml": ">=0.0.5",
"http": ">=0.0.0",
"node-uuid": ">=1.2.0"
},
"devDependencies": {
- "xml2js": ">=0.1.11",
- "coffee-script": ">=1.1.2"
+ "xml2js": ">=0.1.11"
},
- "author": "Jacob Rask (http://jacobrask.net)",
- "main": "./lib/upnp"
+ "author": "Jacob Rask (http://jacobrask.net)"
}

0 comments on commit 8cb334a

Please sign in to comment.