jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.97k stars 190 forks source link

global Jakefile.js #232

Open PhilWaldmann opened 10 years ago

PhilWaldmann commented 10 years ago

Hi,

is it possible to define a global Jakefile for tasks that are relevant to all projects?

mde commented 10 years ago

There's not currently a built-in way to do that, but there is the -f/--jakefile option for the command line that allows you to specify what Jakefile to use. There's also the -J/--jakelibdir option, that lets you specify a directory of .jake files to load.

Once the CLI starts up, it just loads the Jakefile or .jake files with simple Node require, so you can easily require an NPM-installed module that defines Jake tasks, namespaces, whatever.

TL;DR -- there's nothing built in, but there are a number of ways to do what you're talking about.