diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..845263a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +sudo: false +language: node_js +cache: + directories: + - node_modules +notifications: + email: false +node_js: + - 'stable' +before_install: + - npm i -g npm@^2.0.0 +before_script: + - npm prune + - npm run lint + - npm run coverage +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index 13882df..c879a0b 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,34 @@ { "name": "observable-air", - "version": "1.0.0", "description": "Observables for the calorie conscious", "main": "src/Observable", "scripts": { "test": "ava", + "lint": "tslint ./src/**.ts", "hydra": "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm chore/benchmark.js", "rfc": "node chore/rfc", "benchmark": "date >> benchmark.md && node chore/benchmark >> benchmark.md", - "postinstall": "tsc" + "postinstall": "tsc", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "author": "", "license": "ISC", "devDependencies": { "ava": "^0.16.0", "benchmark": "^2.1.1", + "cz-conventional-changelog": "^1.2.0", "es-observable-tests": "^0.3.0", + "semantic-release": "^4.3.5", + "tslint-microsoft-contrib": "^2.0.12", "typescript": "^2.0.3" + }, + "repository": { + "type": "git", + "url": "https://github.com/tusharmath/observable-air.git" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } } } diff --git a/tslint.json b/tslint.json index 509971b..4bda596 100644 --- a/tslint.json +++ b/tslint.json @@ -1,58 +1,3 @@ { - "rules": { - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "indent": [ - true, - "spaces" - ], - "no-duplicate-variable": true, - "no-eval": true, - "no-internal-module": true, - "no-trailing-whitespace": true, - "no-unsafe-finally": true, - "no-var-keyword": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": [ - true, - "double" - ], - "semicolon": [ - false, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ], - "variable-name": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator", - "check-type" - ] - } + "rules-dir": "node_modules/tslint-microsoft-contrib" }