Skip to content

Commit

Permalink
version bump and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Kellen committed Aug 22, 2012
1 parent 14dd133 commit 0722276
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
21 changes: 16 additions & 5 deletions README.md
Expand Up @@ -5,19 +5,32 @@ This template is a starting point for developing modern javascript modules and l

Whichever method you use, the result is a single file with no external dependencies that runs in Node or the browser (with AMD, or as an inline script).

## Building with RequireJS

## Building / Testing with Node

Kick off the requirejs optimizer by hand:
```console
node vendor/r.js -o build.js
```

If your project does not require a browser environment, run Jasmine tests with node.
```console
node test/runner-node
```

If your project does require a browser, start a webserver in the root directry.
```console
servedir
```
...and browse to [http://localhost:8000/test/runner.html](http://localhost:8000/test/runner.html)


## Building / Testing / Minifying with Grunt

Start by installing grunt and a few required tasks:
```console
npm install -g grunt
npm install grunt-contrib
npm install grunt-jasmine-task
npm install
```

Then, use grunt to run your tests in a headless browser ([PhantomJS](http://www.phantomjs.org/)), or kick off the RequireJS optimizer from any path inside the root of your project using these commands:
Expand All @@ -44,8 +57,6 @@ Note that the `phantomjs` executable needs to be in the system `PATH` for grunt
* [Where does $PATH get set in OS X 10.6 Snow Leopard?](http://superuser.com/questions/69130/where-does-path-get-set-in-os-x-10-6-snow-leopard)
* [How do I change the PATH variable in Linux](https://www.google.com/search?q=How+do+I+change+the+PATH+variable+in+Linux)

### Running tests and demos in a browser
Start your preferred HTTP server (I use [servedir](https://github.com/remy/servedir)) in the root path of this repository and browse to the respective files.

## Thanks to

Expand Down
10 changes: 6 additions & 4 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "requirejs-library-skeleton",
"description": "RequireJS skeleton for modern JS libraries.",
"version": "0.1.5",
"version": "0.2.0",
"homepage": "http://github.com/tkellen/requirejs-library-skeleton",
"author": "Tyler Kellen",
"licenses": [
Expand All @@ -14,14 +14,15 @@
"type": "git",
"url": "git://github.com/tkellen/requirejs-library-skeleton.git"
},
"main": "build/skeleton.js",
"engines": {
"node": ">=0.6.0"
},
"keywords": [
"requirejs",
"library",
"boilerplate"
"boilerplate",
"skeleton",
"template"
],
"dependencies": {
},
Expand All @@ -33,6 +34,7 @@
"grunt-contrib": "*",
"grunt-jasmine-task": "*",
"requirejs": "*",
"coffee-script": "*"
"coffee-script": "*",
"servedir": "*"
}
}

0 comments on commit 0722276

Please sign in to comment.