From 62233207535800501b313abe3f4a0dc0c428143b Mon Sep 17 00:00:00 2001 From: Bryan Berry Date: Mon, 04 Jan 2010 03:30:15 +0000 Subject: minor changes to Jakefile --- diff --git a/Jakefile b/Jakefile index fbb3e72..6fe3753 100644 --- a/Jakefile +++ b/Jakefile @@ -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 diff --git a/Jakefile~ b/Jakefile~ index 3161f73..fbb3e72 100644 --- a/Jakefile~ +++ b/Jakefile~ @@ -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 -- cgit v0.9.1