diff options
author | Bryan Berry <bryan@olenepal.org> | 2010-01-04 03:30:15 (GMT) |
---|---|---|
committer | Bryan Berry <bryan@olenepal.org> | 2010-01-04 03:30:15 (GMT) |
commit | 62233207535800501b313abe3f4a0dc0c428143b (patch) | |
tree | cb117cadff58410b01d36fa9dd55aace933161d3 | |
parent | cfed9673f47b2cd030f9bb06c27ae93977f39789 (diff) |
minor changes to Jakefile
-rw-r--r-- | Jakefile | 60 | ||||
-rw-r--r-- | Jakefile~ | 59 |
2 files changed, 81 insertions, 38 deletions
@@ -5,6 +5,13 @@ var FILE = require("file"), OS = require("os"), JAKE = require("jake"); +var buildDir = './build', + bundleSrcDir = FILE.join(buildDir, 'bundleSrc'), + lessonsDir = FILE.join(buildDir, 'bundleSrc'); + +var includedLessons = []; + + var CLEAN = require('jake/clean').CLEAN; CLEAN.include('**/#*#', '**/\.tmp'); CLEAN.exclude('\.git'); @@ -24,45 +31,26 @@ JAKE.task('docs', function(){ }); - -/* -JAKE.task("cleanfoo", function() +JAKE.task('build stable', function() { - cleanList.toString(); - cleanList.forEach(function(aFilename) - { - try - { print(aFilename); - FILE.rmtree(aFilename); - } - catch(anException) - { - } - }); + if (!FILE.exists(buildDir)){ + FILE.mkdir(buildDir); + } + + print('foo'); }); -*/ - -/*var CLEAN = require('jake/clean').CLEAN; -var CLEANFOO = new JAKE.FileList("*.bak"); - -//clean -JAKE.task("cleanfoo", function() -{ - print('foo'); - print(CLEANFOO._items); - CLEANFOO.forEach(function(aFilename) - { print('foo'); - try - { print(aFilename); - FILE.rmtree(aFilename); - } - catch(anException) - { - print(anException); - } - }); + + +JAKE.task('build', function() +{ + if (!FILE.exists(buildDir)){ + FILE.mkdir(buildDir); + } + + print('foobar'); }); -*/ + + //clobber //checkout bundle @@ -5,15 +5,70 @@ var FILE = require("file"), OS = require("os"), JAKE = require("jake"); -//clean +var CLEAN = require('jake/clean').CLEAN; +CLEAN.include('**/#*#', '**/\.tmp'); +CLEAN.exclude('\.git'); + +//docs, documentation +JAKE.task('docs', function(){ + var path = './tools/jsdoc-toolkit'; + if(FILE.exists(path)){ + var cmd = 'java -jar ' + path + '/jsrun.jar ' + + path + '/app/run.js ' + './js/karma.js -d=docs/ ' + + '-t=tools/jsdoc-toolkit/templates/jsdoc/'; + OS.system(cmd); + } else { + print("The folder ./tools/jsdoc-toolkit isn't present " + + "you need it to generate documentation"); + } + +}); + +/* +JAKE.task("cleanfoo", function() +{ + cleanList.toString(); + cleanList.forEach(function(aFilename) + { + try + { print(aFilename); + FILE.rmtree(aFilename); + } + catch(anException) + { + } + }); +}); +*/ + +/*var CLEAN = require('jake/clean').CLEAN; +var CLEANFOO = new JAKE.FileList("*.bak"); + +//clean +JAKE.task("cleanfoo", function() +{ + print('foo'); + print(CLEANFOO._items); + CLEANFOO.forEach(function(aFilename) + { print('foo'); + try + { print(aFilename); + FILE.rmtree(aFilename); + } + catch(anException) + { + print(anException); + } + }); +}); +*/ //clobber //checkout bundle //checkout lessons -//docs, documentation //delete backup files and commit their removal |