lead.js
lead.js copied to clipboard
run examples as tests
For the node examples, the npm module will need to be linked.
grunt.registerTask 'npm-link', ->
done = @async()
grunt.util.spawn cmd: "npm", args: ['link'], opts: {cwd: "#{__dirname}/dist/node", env: {npm_config_prefix: "#{__dirname}/build/node/npm"}}, (err, result, code) ->
if err?
grunt.log.error 'npm link failed'
grunt.log.error result.stderr
done false
else
grunt.log.ok result.stdout
done()
(this doesn't quite work, it fails with execvp(): No such file or directory)