gobblejs / gobble

The last build tool you'll ever need
333 stars 20 forks source link

code example for 'task = node.build'? #99

Closed jamesjensen88 closed 8 years ago

jamesjensen88 commented 8 years ago

I need to trigger gobble build from a Node script, and saw [this].(https://github.com/gobblejs/gobble/wiki/API-reference#task--nodebuild-options-)

Could anyone provide a code example?

Rich-Harris commented 8 years ago

Don't know if this is still relevant – sorry – but you can use Gobble programmatically like so:

var node = require( './gobblefile.js' );

var task = node.build({
  dest: 'build'
});

task.then( function () {
  console.log( 'finished!' );
});