Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit b1d25d3153ddd214a842880224033dcf15e621d2 @quartzmo quartzmo committed Feb 6, 2012
Showing with 107 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +24 −0 Makefile
  3. +39 −0 Readme.md
  4. +1 −0 index.js
  5. +10 −0 lib/example.js
  6. +19 −0 package.json
  7. +3 −0 src/example.coffee
  8. +6 −0 test/example.coffee
  9. +3 −0 test/mocha.opts
@@ -0,0 +1,2 @@
+.DS_Store
+node_modules
@@ -0,0 +1,24 @@
+REPORTER = dot
+
+all: build
+
+build:
+ @./node_modules/coffee-script/bin/coffee \
+ -c \
+ -o lib src
+
+clean:
+ rm -rf lib
+ mkdir lib
+
+watch:
+ @./node_modules/coffee-script/bin/coffee \
+ -o lib \
+ -cw src
+
+test:
+ @./node_modules/mocha/bin/mocha \
+ --reporter $(REPORTER) \
+ test/*.coffee
+
+.PHONY: build clean watch test
@@ -0,0 +1,39 @@
+# Mocha CoffeeScript Boilerplate
+
+A minimalistic boilerplate for a CoffeeScript project that is tested with [visionmedia/mocha](http://visionmedia.github.com/mocha).
+Requires Node.js to run unit tests.
+
+For a more extensive demo of Mocha's featureset, take a look at [ryu22e/mocha-example](https://github.com/ryu22e/mocha-example).
+
+## Usage
+
+1. `npm install .`
+1. `make test`
+1. `rm -rf .git`
+1. Replace `example.coffee` in both `test` and `lib` with your own code.
+1. Edit `Readme.md`, `package.json`, and `index.js`, replacing this project's details with your own.
+
+## License
+
+The MIT License
+
+Copyright (c) 2012 Chris Smith
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
+module.exports = require('./lib/example');
@@ -0,0 +1,10 @@
+(function() {
+ var example;
+
+ example = exports;
+
+ example.truth = function() {
+ return true;
+ };
+
+}).call(this);
@@ -0,0 +1,19 @@
+{
+ "name": "mocha-coffeescript-boilerplate"
+ , "version": "0.0.1"
+ , "description": "minimalistic template for a CoffeeScript project based on visionmedia/mocha"
+ , "keywords": ["mocha", "boilerplate", "test", "coffeescript", "coffee-script"]
+ , "author": "Chris Smith <quartzmo@gmail.com>"
+ , "main": "index"
+ , "engines": { "node": ">= 0.4.x < 0.8.0" }
+ , "scripts": {
+ "test": "make test"
+ }
+ , "dependencies":{
+ "coffee-script": ">= 1.2.0"
+ }
+ , "devDependencies": {
+ "mocha": ">= 0.11.0"
+ , "should": ">= 0.5.1"
+ }
+}
@@ -0,0 +1,3 @@
+example = exports
+
+example.truth = -> true
@@ -0,0 +1,6 @@
+example = require('../')
+
+describe 'example', ->
+ describe '#truth()', ->
+ it 'should return the Boolean value true', ->
+ example.truth().should.be.true
@@ -0,0 +1,3 @@
+--require should
+--reporter dot
+--ui bdd

0 comments on commit b1d25d3

Please sign in to comment.