(redirected from JavaScript.Jake)

 

 

General

JavaScript build tool, similar to Make or Rake. Built to work with Node.js

 

Docs at that page.

 

anyway.

 

Intro to Jake

 

 

Passing Parameters

Parameters need to be in square brackets, comma-separated, ‘no spaces around the commas.
Parse them out from the arguments object.

 

Normal Shell

jake clone[target,destination]

 

No problem

 

Powershell

Wrap the task AND parameters in quotes; the project page indicates this is true for zshell.

 

jake 'clone[target,destination]'

jake "clone['target','destination']"

 

are identical.

 

sample jakefiles

https://github.com/vojtajina/node-mocks/blob/master/Jakefile - has task to bump minor version

I prefer date-based, but still. similar.

https://typescript.codeplex.com/SourceControl/latest#Jakefile
https://github.com/vojtajina/node-mocks/blob/master/Jakefile
https://github.com/mde/jake/blob/master/Jakefile - Jake’s own jakefile
https://github.com/mde/timezone-js/blob/master/Jakefile - another project by the Jake developer
https://github.com/mde/utilities/blob/master/Jakefile - utilities was spun-off from Jake, I think. by the same dev, anyway
https://github.com/mde/geddy/blob/master/Jakefile

 

https://gitorious.org/serenity-framework/elfinder/source/b2b078e4569d6dbf04ac08b403ca9167f38ad901:Jakefile.js
https://github.com/Studio-42/elFinder/blob/2.x/Jakefile.js

 

 

NOTE: These are from a different version of Jake, and might not be accurate “for me”
http://git.sugarlabs.org/karma/mainline/blobs/master/Jakefile
https://github.com/280north/cappuccino/blob/master/Jakefile

 

 

Packaging files via jake

I’ve had some trouble building zips with node.js. I could just give up, but I would like to keep using the JS toolchain -- that’s why I started using node in the first place!

 

I have some code to generate file-list @ https://github.com/MichaelPaulukonis/WebText/blob/master/jakefile.js

 

I should have some more notes, but not sure where.

 

Various libs had problems. adm-zip was promising, but turned out to completely ignore subfolders -- so everything went into the zip at the same level. UGH.

 

UPDATE: seems the npm-version of adm-zip is 0.4.3 and the github version is 0.4.2, and 0.4.2 works according to the docs, creating subfolders as expected. woo!

 

 

See Also

node.js
NPM where Jake is included as a list of “must install!”

 

 

Tags

JavaScript nodejs packaging deployment