From a22666ede1df23509b2a69b7d938448f6215cd1c Mon Sep 17 00:00:00 2001 From: jspaine Date: Fri, 4 Aug 2017 10:42:14 +0200 Subject: [PATCH] feat(release): Initial release, add semantic-release --- .travis.yml | 19 +++++++++++++++++++ package.json | 17 +++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0f2cc7e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: node_js +cache: + directories: + - node_modules +notifications: + email: false +node_js: + - '8' + - '6' + - '4' +before_script: + - npm prune && npm run build +script: + - npm run lint && npm run test:once +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index 33f1ea8..2cb4da6 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,20 @@ { "name": "html-ast-transform", - "version": "0.1.0", + "version": "0.0.0-development", "description": "Flexible html transformations by mapping/reducing an AST", "main": "dist/html-ast-transform.js", "scripts": { + "commit": "git-cz", "lint": "tslint '{src,_test}/**/*.ts'", "prebuild": "rimraf dist", "build": "webpack", - "test": "mocha -r ts-node/register -r babel-register '_test/*.spec.ts' --watch --watch-extensions ts" + "test:once": "mocha -r ts-node/register -r babel-register '_test/*.spec.ts'", + "test": "npm run test:once -- -w --watch-extensions ts", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "repository": { "type": "git", - "url": "git+https://github.com/jspaine/html-ast-transform.git" + "url": "https://github.com/jspaine/html-ast-transform.git" }, "keywords": [ "html", @@ -33,10 +36,13 @@ "babel-preset-es2015": "^6.24.1", "babel-register": "^6.24.1", "chai": "^4.1.0", + "commitizen": "^2.9.6", + "cz-conventional-changelog": "^2.0.0", "lodash.trim": "^4.5.1", "mocha": "^3.4.2", "parse5": "^3.0.2", "rimraf": "^2.6.1", + "semantic-release": "^6.3.6", "ts-loader": "^2.3.1", "ts-node": "^3.3.0", "tslint": "^5.5.0", @@ -52,5 +58,8 @@ "LICENSE", "README.md" ], - "typings": "./dist/types/index.d.ts" + "typings": "./dist/types/index.d.ts", + "czConfig": { + "path": "node_modules/cz-conventional-changelog" + } }