Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

version bump and documentation

  • Loading branch information...
commit 0722276c41ef2d524e6fb1627b19c1cf20bd8dab 1 parent 14dd133
@tkellen authored
Showing with 22 additions and 9 deletions.
  1. +16 −5 README.md
  2. +6 −4 package.json
View
21 README.md
@@ -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:
@@ -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
View
10 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": [
@@ -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": {
},
@@ -33,6 +34,7 @@
"grunt-contrib": "*",
"grunt-jasmine-task": "*",
"requirejs": "*",
- "coffee-script": "*"
+ "coffee-script": "*",
+ "servedir": "*"
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.