From c409f9c3c1efaf8c08c84a90ff9baf1b401c331e Mon Sep 17 00:00:00 2001 From: Nathan Houle Date: Thu, 4 Sep 2014 01:56:18 -0700 Subject: [PATCH] Update readme with tasks --- Makefile | 12 ++++++------ README.md | 30 ++++++++++++++++++------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 8a256aa..b492e9c 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,10 @@ clean: | $(COMPILE_DIR) build.commonjs: | clean $(COMPILE_DIR) @$(TRACEUR) $(TRACEUR_COMMONJS_FLAGS) --dir $(INPUT_DIR) $(COMPILE_DIR)/commonjs -build.browser: | clean $(COMPILE_DIR) +build.amd: | clean $(COMPILE_DIR) @$(TRACEUR) $(TRACEUR_BROWSER_FLAGS) --dir $(INPUT_DIR) $(COMPILE_DIR)/amd -build.browser.dist: build.browser $(DIST_DIR) +build.script: build.amd $(DIST_DIR) @.bin/build-browser > $(DIST_DIR)/browser.js @$(UGLIFYJS) $(DIST_DIR)/browser.js $(UGLIFYJS_FLAGS) > $(DIST_DIR)/browser.min.js 2> /dev/null @@ -93,12 +93,12 @@ build.browser.dist: build.browser $(DIST_DIR) # Testing Tasks # -test: | test.commonjs test.browser +test: | test.node test.browser -test.commonjs: | build.commonjs +test.node: | build.commonjs @$(MOCHA) $(MOCHA_COMMON_FLAGS) --reporter spec $(TEST_DIR)/**/*.test.js -test.browser: | build.browser.dist +test.browser: | build.script @$(KARMA) start test/config/karma.conf.js test.coverage.coveralls: | build.commonjs @@ -131,5 +131,5 @@ unwatch: .DEFAULT_GOAL = build.commonjs -.PHONY: build.commonjs build.browser build.browser.dist test.commonjs test.coverage.coveralls \ +.PHONY: build.commonjs build.amd build.script test.node test.coverage.coveralls \ test.coverage.html docs watch unwatch diff --git a/README.md b/README.md index a27a8d0..2019637 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,27 @@ var fungus = require('fungus'); Requirements: - Node.js v0.10.x -- [Watchman](https://facebook.github.io/watchman/docs/install.html) *(Optional)* +- [Watchman][watchman] *(Optional)* ### Build Tasks -Task | Description ---- | --- -`make` | Runs the default task (`make build`). -`make test` | Runs the test suite. -`make build` | Builds the library into ES5-compatible modules. -`make docs` | Builds the documentation. -`make watch` | Watch and rebuild the source and documentation on file changes. -`make unwatch` | Stop file watching. +Task | Description +--- | --- +`make` | Runs the default task (`make build.commonjs`). +`make test` | Runs the test suite. Runs both the `test.node` and `test.browser` tasks. +`make test.node` | Runs the test suite in a Node environment. +`make test.browser` | Runs the test suite in a browser environment. +`make test.coverage.coveralls` | Runs the test suite in a Node environment, outputting a coverage report and sending it to the [Coveralls][coveralls] code coverage tracking service. +`make test.coverage.html` | Runs the test suite in a Node environment, outputting a HTML coverage report. +`make build.commonjs` | Builds the library into ES5-compatible CommonJS modules. +`make build.amd` | Builds the library into ES5-compatible AMD modules. +`make build.script` | Builds the library into a single, ES5-compatible script file. +`make docs` | Builds the documentation. +`make watch` | Watch and rebuild the source and documentation on file changes. Runs as a background task via [Watchman][watchman]. +`make unwatch` | Stop file watching. + +[coveralls]: http://coveralls.io +[watchman]: https://facebook.github.io/watchman/docs/install.html ### Building @@ -71,9 +80,6 @@ open http://localhost:8000