Merge pull request #332 from ljharb/add_package_json

Add package json
master
Jordan Harband 2013-12-17 13:17:52 -08:00
commit 5c7996da5b
3 changed files with 43 additions and 8 deletions

6
.gitignore vendored
View File

@ -4,7 +4,11 @@ v*
alias
# For testing
bak
test/bak
.urchin.log
.urchin_stdout
node_modules/
.DS_Store

View File

@ -80,26 +80,24 @@ The above copyright notice and this permission notice shall be included in all c
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.
## Running tests
Tests are written in [Urchin](https://github.com/scraperwiki/urchin). Install Urchin like so.
Tests are written in [Urchin](https://github.com/scraperwiki/urchin). Install Urchin (and other dependencies) like so:
npm install -g urchin
(Or put it some other place in your PATH.)
npm install
There are slow tests and fast tests. The slow tests do things like install node
and check that the right versions are used. The fast tests fake this to test
things like aliases and uninstalling. From the root of the nvm git repository,
run the fast tests like this.
urchin test/fast
npm run test/fast
Run the slow tests like this.
urchin test/slow
npm run test/slow
Run all of the tests like this
urchin test
npm test
Nota bene: Avoid running nvm while the tests are running.

33
package.json 100644
View File

@ -0,0 +1,33 @@
{
"name": "nvm",
"version": "0.2.0",
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
"directories": {
"test": "test"
},
"scripts": {
"test": "urchin test",
"test/fast": "urchin -f test/fast",
"test/slow": "urchin -f test/slow"
},
"repository": {
"type": "git",
"url": "git://github.com/creationix/nvm.git"
},
"keywords": [
"nvm",
"node",
"version",
"manager"
],
"author": "Tim Caswell <tim@creationix.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/creationix/nvm/issues"
},
"homepage": "https://github.com/creationix/nvm",
"devDependencies": {
"urchin": "~0.0.2"
}
}