Permalink
Browse files

made it coffeedoc-lm for npm

  • Loading branch information...
lmaccherone committed Mar 30, 2012
1 parent fd9f51f commit afc625b9bd9eabfd9cc52ce656d37b825dc9022d
Showing with 28 additions and 8 deletions.
  1. +25 −5 Cakefile
  2. +1 −1 README.md
  3. +2 −2 package.json
View
@@ -1,13 +1,33 @@
###
Coffeedoc Cakefile, adapted from [docco](http://jashkenas.github.com/docco/)
-by jashkenas
+by jashkenas, forked by Larry Maccherone
###
{spawn, exec} = require 'child_process'
-option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`'
-task 'install', 'install `coffeedoc` globally but from this source using npm', (options) ->
- exec('npm install -g .', (err, stdout, stderr) ->
- if err then console.error stderr
+run = (command, options, next) ->
+ if options? and options.length > 0
+ command += ' ' + options.join(' ')
+ exec(command, (error, stdout, stderr) ->
+ if stderr.length > 0
+ console.log("Stderr exec'ing command '#{command}'...\n" + stderr)
+ if error?
+ console.log('exec error: ' + error)
+ if next?
+ next(stdout)
+ else
+ if stdout.length > 0
+ console.log("Stdout exec'ing command '#{command}'...\n" + stdout)
)
+
+
+task('install', 'Install globally but from this source using npm', () ->
+ process.chdir(__dirname)
+ run('npm install -g .')
+)
+
+task('publish', 'Publish to npm', () ->
+ process.chdir(__dirname)
+ run('npm publish .')
+)
View
@@ -52,7 +52,7 @@ interesting example, here is [the result of running coffeedoc against
CoffeeDoc requires [Node.js][], [CoffeeScript][], and [eco][]. Install using
npm with the following command:
- sudo npm install -g coffeedoc
+ sudo npm install -g coffeedoc-lm
The -g option installs CoffeeDoc globally, adding the coffeedoc executable to
your PATH. If you would rather install locally, omit the -g option.
View
@@ -1,6 +1,6 @@
{
- "name": "coffeedoc",
- "description": "An API documentation generator for CoffeeScript",
+ "name": "coffeedoc-lm",
+ "description": "Fork of CoffeeDoc by Larry Maccherone - an API documentation generator for CoffeeScript",
"keywords": [
"documentation",
"docs",

0 comments on commit afc625b

Please sign in to comment.