From 79b51d5b578927bd510123c81953e7cc8c72f211 Mon Sep 17 00:00:00 2001 From: Dave Geddes Date: Sun, 21 Oct 2012 00:37:59 -0600 Subject: chore(Grunt): switch from Rake to Grunt Migrates the Angular project from Rake to Grunt. Benefits: - Drops Ruby dependency - Lowers barrier to entry for contributions from JavaScript ninjas - Simplifies the Angular project setup and build process - Adopts industry-standard tools specific to JavaScript projects - Support building angular.js on Windows platform (really?!? why?!?) BREAKING CHANGE: Rake is completely replaced by Grunt. Below are the deprecated Rake tasks and their Grunt equivalents: rake --> grunt rake package --> grunt package rake init --> N/A rake clean --> grunt clean rake concat_scenario --> grunt build:scenario rake concat --> grunt build rake concat_scenario --> grunt build:scenario rake minify --> grunt minify rake version --> grunt write:version rake docs --> grunt docs rake webserver --> grunt webserver rake test --> grunt test rake test:unit --> grunt test:unit rake test: --> grunt test: rake test[Firefox+Safari] --> grunt test --browsers Firefox,Safari rake test[Safari] --> grunt test --browsers Safari rake autotest --> grunt autotest NOTES: * For convenience grunt test:e2e starts a webserver for you, while grunt test:end2end doesn't. Use grunt test:end2end if you already have the webserver running. * Removes duplicate entry for Describe.js in the angularScenario section of angularFiles.js * Updates docs/src/gen-docs.js to use #done intead of the deprecated #end * Uses grunt-contrib-connect instead of lib/nodeserver (removed) * Removes nodeserver.sh, travis now uses grunt webserver * Built and minified files are identical to Rake's output, with the exception of one less character for git revisions (using --short) and a couple minor whitespace differences Closes #199 --- docs/src/reader.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/src/reader.js') diff --git a/docs/src/reader.js b/docs/src/reader.js index ded573c1..a021c05f 100644 --- a/docs/src/reader.js +++ b/docs/src/reader.js @@ -7,7 +7,8 @@ exports.collect = collect; var ngdoc = require('./ngdoc.js'), Q = require('qq'), - qfs = require('q-fs'); + qfs = require('q-fs'), + PATH = require('path'); var NEW_LINE = /\n\r?/; @@ -43,7 +44,7 @@ function collect() { var work2; if (file.match(/\.ngdoc$/)) { work2 = Q.when(qfs.read(file, 'b'), function(content){ - var section = '@section ' + file.split('/')[2] + '\n'; + var section = '@section ' + file.split(PATH.sep)[2] + '\n'; allDocs.push(new ngdoc.Doc(section + content.toString(),file, 1).parse()); }); } -- cgit v1.2.3