From d2b57f6392740ab812b0f6bf5bc29f9550e31d26 Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Wed, 30 Oct 2019 09:10:03 +0300 Subject: [PATCH] ci: handle node_js v6 --- .gitignore | 3 +++ .travis.yml | 15 ++++++++++++++- package.json | 6 +++--- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 08161e2..2b73834 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ npm-debug.log .DS_Store .esm-cache +# Bundle +target + # Typescript *.tsbuildinfo .tsbuildinfo diff --git a/.travis.yml b/.travis.yml index 3b571ee..8ea7d27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,23 @@ language: node_js +sudo: false + node_js: + - "6" - "8" - "10" - "12" - "13" -sudo: false + cache: directories: + - target - node_modules + +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "6" ] ; then nvm use 8 ; fi ;' + - yarn install + - yarn build + - 'if [ "${TRAVIS_NODE_VERSION}" = "6" ] ; then nvm use "${TRAVIS_NODE_VERSION}" && node --version ; fi ;' + +script: + - yarn test diff --git a/package.json b/package.json index 8e5b522..8efbee8 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ ], "license": "MIT", "version": "2.1.0", - "source": "src/main/ts/index.ts", + "source": "jsonrpc.ts", "main": "jsonrpc.js", "module": "jsonrpc.mjs", "unpkg": "jsonrpc.umd.js", @@ -42,10 +42,10 @@ }, "scripts": { "build:tsc": "tsc -p tsconfig.build.json", - "build:microbundle": "microbundle jsonrpc.ts --name jsonrpc --strict", + "build:microbundle": "microbundle build jsonrpc.ts --name jsonrpc --strict", "build": "yarn build:microbundle", "lint": "tslint -p tsconfig.json -t stylish jsonrpc.ts", - "test": "npm run lint && tman" + "test": "yarn lint && tman" }, "files": [ "README.md",