Skip to content

Commit

Permalink
Merge pull request #24 from lzear/update-rollup
Browse files Browse the repository at this point in the history
Update rollup
  • Loading branch information
lzear authored Oct 21, 2020
2 parents 84dea94 + 095e726 commit 706810a
Show file tree
Hide file tree
Showing 4 changed files with 179 additions and 1,416 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ node_js:
script:
- npm run test:prod && npm run build
after_success:
- npm run travis-deploy-once "npm run report-coverage"
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run travis-deploy-once "npm run deploy-docs"; fi
branches:
except:
Expand Down
32 changes: 8 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"sideEffects": false,
"main": "dist/votes.umd.js",
"module": "dist/votes.es5.js",
"typings": "dist/types/src/votes.d.ts",
"types": "dist/votes.d.ts",
"files": [
"dist"
],
Expand All @@ -24,18 +24,14 @@
"prebuild": "rimraf dist",
"build": "tsc --module commonjs && rollup -c rollup.config.js && typedoc --exclude \"**/*.test.ts\" --out docs --target es6 --theme minimal --mode file src",
"build:watch": "tsc --module commonjs && rollup -c rollup.config.js -w",
"start": "rollup -c rollup.config.js -w",
"test": "jest --coverage",
"test:watch": "jest --coverage --watch",
"test:prod": "npm run eslint && npm run test -- --no-cache",
"test:prod": "yarn run eslint && yarn run test -- --no-cache",
"deploy-docs": "ts-node tools/gh-pages-publish",
"report-coverage": "cat ./coverage/lcov.info | coveralls",
"commit": "git-cz",
"semantic-release": "semantic-release",
"precommit": "lint-staged",
"travis-deploy-once": "travis-deploy-once",
"prepush": "npm run test:prod && npm run build",
"commitmsg": "commitlint -E HUSKY_GIT_PARAMS"
"travis-deploy-once": "travis-deploy-once"
},
"lint-staged": {
"{src,test}/**/*.ts": [
Expand All @@ -55,41 +51,29 @@
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@semantic-release/exec": "^5.0.0",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@types/jest": "^26.0.14",
"@types/lodash": "^4.14.162",
"@types/node": "^14.11.10",
"@types/rollup-plugin-json": "^3.0.2",
"@types/rollup-plugin-node-resolve": "^4.1.0",
"@types/rollup-plugin-sourcemaps": "^0.4.2",
"@typescript-eslint/eslint-plugin": "^4.5.0",
"@typescript-eslint/parser": "^4.5.0",
"colors": "^1.4.0",
"commitizen": "^4.2.1",
"coveralls": "^3.1.0",
"cross-env": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
"dotenv-cli": "^4.0.0",
"dotenv": "^8.2.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.13.0",
"eslint-plugin-prettier": "^3.1.4",
"husky": "^4.3.0",
"jest": "^26.5.3",
"jest-config": "^26.5.3",
"lint-staged": "^10.4.2",
"prettier": "^2.1.2",
"prompt": "^1.0.0",
"replace-in-file": "^6.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.32.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sizes": "^1.0.3",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.28.0",
"semantic-release": "^17.2.1",
"semantic-release-cli": "^5.4.0",
"shelljs": "^0.8.4",
"travis-deploy-once": "^5.0.11",
"ts-jest": "^26.4.1",
Expand Down
23 changes: 5 additions & 18 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import sourceMaps from 'rollup-plugin-sourcemaps'
import typescript from 'rollup-plugin-typescript2'
import json from 'rollup-plugin-json'
import json from '@rollup/plugin-json'
import sizes from 'rollup-plugin-sizes'

import pkg from './package.json'

Expand Down Expand Up @@ -35,19 +36,5 @@ export default {
watch: {
include: 'src/**',
},
plugins: [
// Allow json resolution
json(),
// Compile TypeScript files
typescript({ useTsconfigDeclarationDir: true }),
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
commonjs(),
// Allow node_modules resolution, so you can use 'external' to control
// which external modules to include in the bundle
// https://github.com/rollup/rollup-plugin-node-resolve#usage
resolve({}),

// Resolve source maps to the original source
sourceMaps(),
],
plugins: [json(), typescript(), commonjs(), resolve(), sourceMaps(), sizes()],
}
Loading

0 comments on commit 706810a

Please sign in to comment.