Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
minify umd, remove browser target in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
vdg committed Dec 22, 2019
1 parent e6b7655 commit a53c43e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"description": "Javascript library for interacting with the Rouge protocol",
"main": "dist/rouge.cjs.js",
"module": "dist/rouge.esm.js",
"browser": "dist/rouge.umd.js",
"files": [
"dist",
"src"
Expand Down Expand Up @@ -90,6 +89,7 @@
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.1.3",
"web3": "^1.2.4"
},
"peerDependencies": {
Expand Down
9 changes: 5 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@ import commonjs from 'rollup-plugin-commonjs';
import pkg from './package.json';
import json from 'rollup-plugin-json';
import size from 'rollup-plugin-bundle-size';
import { terser } from 'rollup-plugin-terser';

export default [
// browser-friendly UMD build
{
input: 'src/index.js',
output: {
name: 'rouge.js',
file: pkg.browser,
format: 'umd'
name: 'rouge.js',
file: 'dist/rouge.umd.min.js',
format: 'umd'
},
plugins: [
json(),
resolve(),
commonjs(),
size()
terser()
]
},

Expand Down
32 changes: 26 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2855,6 +2855,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"

commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==

commander@^2.8.1, commander@~2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
Expand Down Expand Up @@ -8586,11 +8591,6 @@ rollup-plugin-commonjs@^10.1.0:
resolve "^1.11.0"
rollup-pluginutils "^2.8.1"

rollup-plugin-ignore@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/rollup-plugin-ignore/-/rollup-plugin-ignore-1.0.5.tgz#fc16b321b29d054d728dafde808a8a52ec39f024"
integrity sha512-fGDl4eRMpEeSNqZ9WFR3piK47rrFgVzAIFRsJhTc9/P5t1qsScuFeEBfbXbHDnv6yh5OUth8dti+f+dswebV+Q==

rollup-plugin-json@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e"
Expand All @@ -8609,6 +8609,17 @@ rollup-plugin-node-resolve@^5.2.0:
resolve "^1.11.1"
rollup-pluginutils "^2.8.1"

rollup-plugin-terser@^5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-5.1.3.tgz#5f4c4603b12b4f8d093f4b6f31c9aa5eba98a223"
integrity sha512-FuFuXE5QUJ7snyxHLPp/0LFXJhdomKlIx/aK7Tg88Yubsx/UU/lmInoJafXJ4jwVVNcORJ1wRUC5T9cy5yk0wA==
dependencies:
"@babel/code-frame" "^7.0.0"
jest-worker "^24.6.0"
rollup-pluginutils "^2.8.1"
serialize-javascript "^2.1.2"
terser "^4.1.0"

rollup-plugin-uglify@^6.0.4:
version "6.0.4"
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.4.tgz#65a0959d91586627f1e46a7db966fd504ec6c4e6"
Expand Down Expand Up @@ -9054,7 +9065,7 @@ source-map-support@^0.4.15:
dependencies:
source-map "^0.5.6"

source-map-support@^0.5.16:
source-map-support@^0.5.16, source-map-support@~0.5.12:
version "0.5.16"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042"
integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==
Expand Down Expand Up @@ -9417,6 +9428,15 @@ term-size@^1.2.0:
dependencies:
execa "^0.7.0"

terser@^4.1.0:
version "4.4.3"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.3.tgz#401abc52b88869cf904412503b1eb7da093ae2f0"
integrity sha512-0ikKraVtRDKGzHrzkCv5rUNDzqlhmhowOBqC0XqUHFpW+vJ45+20/IFBcebwKfiS2Z9fJin6Eo+F1zLZsxi8RA==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.12"

test-exclude@^5.2.3:
version "5.2.3"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0"
Expand Down

0 comments on commit a53c43e

Please sign in to comment.