Skip to content

Commit

Permalink
Update readme with tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ndhoule committed Sep 4, 2014
1 parent bdf4be2 commit c409f9c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,23 @@ 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

#
# 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
Expand Down Expand Up @@ -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
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -71,9 +80,6 @@ open http://localhost:8000
<!--
## Goals
- Browser support
- IE9+? Whatever jQuery supports?
- Puts the developer first:
- Usable in browser and Node
- Forward-thinking
Expand Down

0 comments on commit c409f9c

Please sign in to comment.