diff --git a/.travis.yml b/.travis.yml index 740feca..1ea8c2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,20 @@ +sudo: false language: node_js +cache: + directories: + - node_modules +notifications: + email: false node_js: - - '6' - - 'node' + - '4' before_install: - - npm i -g npm@latest + - npm i -g npm@^2.0.0 +before_script: + - npm prune script: - - standard + - npm test +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index 522232d..709313f 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "math-toolbox", - "version": "1.0.0", "description": "Lightweight and modular math toolbox", "main": "src/math-toolbox.js", + "version": "0.0.0-semantically-released", "scripts": { "build": "NODE_ENV=build rollup -c", "build:uglify": "npm run build && uglifyjs dist/math-toolbox.js -cm --preamble \"// math-toolbox.js - https://github.com/terkelg/math-toolbox\" > dist/math-toolbox.min.js", @@ -10,7 +10,8 @@ "test": "jest", "test:watch": "npm test -- --watch", "test:coverage": "jest --coverage", - "docs": "documentation build src/math-toolbox.js -f html -o docs" + "docs": "documentation build src/math-toolbox.js -f html -o docs", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "repository": { "type": "git", @@ -58,10 +59,17 @@ "rollup": "^0.36.1", "rollup-plugin-babel": "^2.6.1", "standard": "^8.2.0", - "uglify-js": "^2.7.3" + "uglify-js": "^2.7.3", + "semantic-release": "^4.3.5" }, "standard": { - "globals": ["expect", "it", "test", "describe"] + "ignore": ["/docs"], + "globals": [ + "expect", + "it", + "test", + "describe" + ] }, "config": { "ghooks": {