Skip to content

Commit db652dd

Browse files
committed
Added a cake dev task and tidied up the README.
1 parent d29eb80 commit db652dd

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

Cakefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,10 @@ mergeFiles =(inputFiles, outputFile, minify=false) ->
3838
task 'bake', 'Compile and concatenate CoffeeScript files to JavaScript, and create minified versions', ->
3939
mergeFiles ['reqwest', 'swagger'], 'swagger', false
4040

41-
# task 'watch', 'Automatically recompile CoffeeScript files to JavaScript', ->
42-
# exec "coffee --compile --bare --watch --output /lib /src
41+
task 'watch', 'Automatically recompile CoffeeScript files to JavaScript', ->
42+
exec "coffee -o lib/ -cw src/"
43+
44+
task 'dev', "Open source files, run spec in browser, and watch for changes", ->
45+
exec "$EDITOR ."
46+
exec "open spec.html"
47+
exec "coffee -o lib/ -cw src/"

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,20 +150,24 @@ Development
150150
Please [fork the code](https://github.com/wordnik/swagger.js) and help us improve
151151
swagger.js. Send us a pull request and **we'll mail you a wordnik T-shirt!**
152152

153-
Swagger.js is written in CoffeeScript, so you'll need the
154-
CoffeeScript compiler. To install it, check out
153+
Swagger.js is written in CoffeeScript, so you'll need Node.js and the
154+
CoffeeScript compiler. For more detailed installation instructions, see
155155
[coffeescript.org/#installation](http://coffeescript.org/#installation).
156156

157157
```bash
158-
# Watch /src for changes and auto-compile to /lib
159-
coffee -o lib/ -cw src/
158+
open http://nodejs.org/#download
159+
npm install -g coffee-script
160160
```
161161

162-
Swagger.js uses the Jasmine testing framework.
163-
164162
```bash
165-
# Run the test suite
166-
open spec.html
163+
# The 'dev' cake task will:
164+
# 1. Open source files in your $EDITOR
165+
# 2. Open and run the Jasmine specs in your browser.
166+
# 3. Watch for changes to CoffeeScript files and auto-compile them to Javascript.
167+
cake dev
168+
169+
# List all cake tasks:
170+
cake
167171
```
168172

169173
License

lib/swagger-spec.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
(function() {
22

3-
window.context = window.describe;
4-
5-
window.xcontext = window.xdescribe;
6-
73
window.api_key = 'a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5';
84

95
describe('Api', function() {

src/swagger-spec.coffee

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
window.context = window.describe
2-
window.xcontext = window.xdescribe
31
window.api_key = 'a2a73e7b926c924fad7001ca3111acd55af2ffabf50eb4ae5'
42

53
describe 'Api', ->

0 commit comments

Comments
 (0)