Permalink
Browse files

added example

  • Loading branch information...
1 parent 260e9fc commit 366513774775fe760f3c4407ee533fc72ee9b4b4 @jbenet committed Dec 8, 2012
View
@@ -0,0 +1,31 @@
+module.exports = (grunt) ->
+
+ # Project configuration.
+ grunt.initConfig
+
+ coffee:
+ default:
+ src: 'coffee/**/*.coffee'
+ dest: 'js'
+ options:
+ preserve_dirs: true
+ base_path: 'coffee'
+
+ jasmineSpecServer:
+ src: 'js/src/**/*.js'
+ specs: 'js/specs/**/*.js'
+
+ watch:
+ files: 'coffee'
+ tasks: 'coffee'
+
+ clean:
+ js: 'js'
+
+ # Load tasks
+ grunt.loadNpmTasks 'grunt-coffee'
+ grunt.loadNpmTasks 'grunt-contrib-clean'
+ grunt.loadNpmTasks 'grunt-jasmine-spec-server'
+
+ # Register tasks
+ grunt.registerTask 'default', ['coffee', 'jasmineSpecServer', 'watch']
View
@@ -0,0 +1,4 @@
+# grunt-jasmine-spec-server example
+
+This is an example project using
+[grunt-jasmine-spec-server](http://github.com/jbenet/grunt-jasmine-spec-server)
@@ -0,0 +1,7 @@
+describe 'Radio', ->
+
+ it 'was invented in 1893', ->
+ expect(Radio.year).toBe(1893)
+
+ it 'was invented by Nikola Tesla', ->
+ expect(Radio.inventor).toBe('Nikola Tesla')
@@ -0,0 +1,7 @@
+describe 'TeslaCoil', ->
+
+ it 'was invented in 1891', ->
+ expect(TeslaCoil.year).toBe(1891)
+
+ it 'was invented by Nikola Tesla', ->
+ expect(TeslaCoil.inventor).toBe('Nikola Tesla')
@@ -0,0 +1,3 @@
+Radio =
+ year: 1896
+ inventor: 'Guglielmo Marconi'
@@ -0,0 +1,3 @@
+TeslaCoil =
+ year: 1891
+ inventor: 'Nikola Tesla'
View
@@ -0,0 +1,17 @@
+{
+ "name": "grunt-jasmine-spec-server-example",
+ "version": "0.0.0",
+ "description": "example of a project using grunt-jasmine-spec-server",
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "author": "Juan Batiz-Benet <juan@benet.ai>",
+ "license": "MIT",
+ "readme": "README.md",
+ "devDependencies": {
+ "grunt": "~0.3.17",
+ "grunt-coffee": "~0.0.6",
+ "grunt-contrib-clean": "~0.3.1",
+ "grunt-jasmine-spec-server": "~0.0.1"
+ }
+}

0 comments on commit 3665137

Please sign in to comment.