also / lead.js

lead.github.io
MIT License
29 stars 8 forks source link

run examples as tests #170

Open also opened 10 years ago

also commented 10 years ago

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)