From 5e6eec97b960298829a2228333cb87c3b76c24d8 Mon Sep 17 00:00:00 2001 From: Liucw Date: Sun, 9 Nov 2014 20:31:12 +0800 Subject: [PATCH] Init project --- .gitignore | 17 +++++++++++++++++ .travis.yml | 4 ++++ LICENSE | 20 ++++++++++++++++++++ Makefile | 23 +++++++++++++++++++++++ package.json | 25 +++++++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 package.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2d066a --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules + +coverage.html diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..df63076 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.10" + - "0.8" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..74b9dba --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Liucw + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2725eee --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +TESTS = $(shell find test -type f -name "*.js") +REPORTER = spec +TIMEOUT = 5000 +MOCHA_OPTS = + +install: + @npm install +test: install + @NODE_ENV=test ./node_modules/mocha/bin/mocha \ + --reporter $(REPORTER) \ + --timeout $(TIMEOUT) \ + $(MOCHA_OPTS) \ + $(TESTS) + +test-cov: + @rm -f coverage.html + @$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=html-cov > coverage.html + @$(MAKE) test MOCHA_OPTS='--require blanket' REPORTER=travis-cov + @ls -lh coverage.html + +test-all: test test-cov + +.PHONY: test test-cov test-all diff --git a/package.json b/package.json new file mode 100644 index 0000000..8fcd49a --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "node-dota2-api", + "version": "0.0.1", + "description": "Dota2 web api node.js version", + "main": "index.js", + "scripts": { + "test": "make test-all" + }, + "repository": { + "type": "git", + "url": "https://github.com/booxood/node-dota2-api.git" + }, + "keywords": [ + "dota2", + "web", + "api", + "steam" + ], + "author": "Liucw", + "license": "MIT", + "bugs": { + "url": "https://github.com/booxood/node-dota2-api/issues" + }, + "homepage": "https://github.com/booxood/node-dota2-api" +}