diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..5323d30 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,28 @@ +version: 2.0 + +dep_cache: &dep_cache + key: 'main-{{.Environment.NODE_VERSION}}-{{checksum "yarn.lock"}}' + +workflows: + version: 2 + build: + jobs: + - build + +jobs: + build: + docker: + - image: circleci/node:10-browsers + + steps: + - checkout + - restore_cache: + <<: *dep_cache + - run: yarn install + - save_cache: + <<: *dep_cache + paths: + - ~/.yarn + - ~/.cache/yarn + - node_modules + - run: yarn test diff --git a/.node-version b/.node-version index db24ab9..f9fb144 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -10.13.0 +10.15.0 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 413d6fd..0000000 --- a/circle.yml +++ /dev/null @@ -1,29 +0,0 @@ -machine: - node: - version: 6.9.2 - environment: - YARN_VERSION: 0.19.1 - PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" - -dependencies: - pre: - - | - if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then - echo "Download and install Yarn." - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION - else - echo "The correct version of Yarn is already installed." - fi - override: - - yarn install - cache_directories: - - ~/.yarn - - ~/.cache/yarn - -test: - override: - - yarn test - -general: - artifacts: - - "./coverage" \ No newline at end of file diff --git a/package.json b/package.json index 36550a1..d53a306 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,12 @@ ], "typings": "./release/index.d.ts", "scripts": { + "prebuild": "npm run clean", + "build": "tsc --build tsconfig.dist.json", + "clean": "rimraf release", "test": "karma start --single-run", - "prepare": "npm run build", - "build": "npm run build:js", - "build:js": "tsc --build tsconfig.dist.json", - "prebuild": "npm run test && npm run clean:pre", - "clean:pre": "rimraf release", - "postversion": "npm run build" + "prepublishOnly": "npm run test && npm run build", + "postversion": "npm run test && npm run build" }, "repository": "git+https://github.com/angular-redux/redux-observable-decorator.git", "author": "Evan Schultz",