diff --git a/.circleci/config.yml b/.circleci/config.yml index a92912f90a..8ef4281278 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,11 @@ executors: docker: - image: circleci/node:12.7 working_directory: ~/repo + environment: + GIT_AUTHOR_EMAIL: visjsbot@gmail.com + GIT_AUTHOR_NAME: vis-bot + GIT_COMMITTER_EMAIL: visjsbot@gmail.com + GIT_COMMITTER_NAME: vis-bot jobs: prepare: @@ -50,14 +55,23 @@ jobs: paths: - 'dist' - lint: + lint_js: executor: node steps: - attach_workspace: at: . - - run: npm run lint + - run: npm run lint:js + + lint_ts: + executor: node + + steps: + - attach_workspace: + at: . + + - run: npm run lint:ts test: executor: node @@ -80,12 +94,6 @@ jobs: command: | npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN - - run: - name: Prepare Git - command: | - git config user.email "tom.vycital@gmail.com" - git config user.name "Tomáš Vyčítal" - - run: name: Release command: | @@ -102,10 +110,14 @@ workflows: requires: - prepare - # - lint: + # - lint_js: # requires: # - prepare + - lint_ts: + requires: + - prepare + - test: requires: - prepare @@ -114,5 +126,10 @@ workflows: requires: - prepare - build - # - lint + # - lint_js + - lint_ts - test + filters: + branches: + only: + - master diff --git a/package.json b/package.json index fc6ee2fa7f..aefa880516 100644 --- a/package.json +++ b/package.json @@ -34,10 +34,13 @@ "css:network": "concat-glob-cli -f 'lib/{network,shared}/**/*.css' -o dist/vis-network.css", "uglify:css:network": "uglifycss dist/vis-network.css > dist/vis-network.min.css", "images:network": "cpy lib/network/img/* dist/img/network/", + "prepublishOnly": "npm run build", "build": "npm run types:network && npm run js:network && npm run css:network && npm run uglify:css:network && npm run images:network", "watch": "npm run css:network && npm run uglify:css:network && npm run images:network && rollup --watch --config rollup.config.js", "watch-dev": "npm run watch-dev", - "lint": "eslint '{lib,test}/**/*.{m,}{j,t}s{x,}'", + "lint": "npm run lint:js && npm run lint:ts", + "lint:js": "eslint '{lib,test}/**/*.js'", + "lint:ts": "eslint '{lib,test}/**/*.ts'", "clean": "rimraf 'dist/*'", "postinstall": "opencollective postinstall || exit 0" },