-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCakefile
More file actions
28 lines (23 loc) · 759 Bytes
/
Cakefile
File metadata and controls
28 lines (23 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{spawn, exec} = require 'child_process'
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 `coffeedoctest` globally but from this source using npm', () ->
process.chdir(__dirname)
run('npm install -g .')
)
task('publish', 'Publish to npm (may need to run twice)', () ->
process.chdir(__dirname)
run('npm publish .')
)