Replace microbundle with plain rollup

This commit is contained in:
Christian Kaisermann 2019-06-12 00:04:34 -03:00
parent 2bac09f880
commit 0cad307df0
5 changed files with 738 additions and 7509 deletions

View File

@ -37,9 +37,9 @@
"dev": true
},
"@types/node": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
"version": "12.0.8",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.8.tgz",
"integrity": "sha512-b8bbUOTwzIY3V5vDTY1fIJ+ePKDUBqt2hC2woVGotdQQhG/2Sh62HOKHrT7ab+VerXAcPyAiTEipPu/FsreUtg==",
"dev": true
},
"@types/resolve": {
@ -578,9 +578,9 @@
"dev": true
},
"estree-walker": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz",
"integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw==",
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
"integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
"dev": true
},
"esutils": {
@ -1471,17 +1471,17 @@
"dev": true
},
"intl-messageformat": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-2.2.0.tgz",
"integrity": "sha1-NFvNRt5jC3aDMwwuUhd/9eq0hPw=",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-4.0.1.tgz",
"integrity": "sha512-xWPjRs3oyaSGp8dCzx1VAn/C4Fqy59eEvJq7m3RrEn6mzJ32/cR+jVLBlEWMNC31GSmkbtXfFMLYeMAXiV0oUg==",
"requires": {
"intl-messageformat-parser": "1.4.0"
"intl-messageformat-parser": "^1.6.6"
}
},
"intl-messageformat-parser": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.4.0.tgz",
"integrity": "sha1-tD1FqXRoytvkQzHXS7Ho3qRPwHU="
"version": "1.6.6",
"resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.6.6.tgz",
"integrity": "sha512-MfBWPyCUIrRM1rB6rVdvkv8LxOxo17sLF/XVyOKV0MypU1WL3NuDVC5Ng27Q9zUsikU9vJCzqCEzI8ZEccUsmA=="
},
"is-accessor-descriptor": {
"version": "0.1.6",
@ -1658,6 +1658,15 @@
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=",
"dev": true
},
"is-reference": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.2.tgz",
"integrity": "sha512-Kn5g8c7XHKejFOpTf2QN9YjiHHKl5xRj+2uAZf9iM2//nkBNi/NNeB5JMoun28nEaUVHyPUzqzhfRlfAirEjXg==",
"dev": true,
"requires": {
"@types/estree": "0.0.39"
}
},
"is-regex": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
@ -1826,9 +1835,9 @@
}
},
"micro-memoize": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/micro-memoize/-/micro-memoize-3.0.2.tgz",
"integrity": "sha512-XxZP0J6Koggwf1jfnYXuIAZVM7JouePEdgdL46MCo+9J/83KT1pSCsl2h65hHGViiP1N0qbVhtqmHM6El1RdEw=="
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/micro-memoize/-/micro-memoize-4.0.7.tgz",
"integrity": "sha512-ee79Aj0LZ2Vso1Idoc1R0yUhry80lJUHRQwoG4PRUWMmGn102/SvY8Y8+OXiOdZCTOoMhHw+/6yV+G1G+buCtA=="
},
"micromatch": {
"version": "3.1.10",
@ -1852,9 +1861,9 @@
}
},
"mime": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.3.tgz",
"integrity": "sha512-QgrPRJfE+riq5TPZMcHZOtm8c6K/yYrMbKIoRfapfiGLxS8OTeIfRhUGW5LU7MlRa52KOAGCfUNruqLrIBvWZw==",
"version": "2.4.4",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz",
"integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==",
"dev": true
},
"minimatch": {
@ -2257,26 +2266,27 @@
"dev": true
},
"rollup": {
"version": "1.12.2",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.12.2.tgz",
"integrity": "sha512-ePehZfVMIE4eO0/LV6VaMY8kp0D9sbziUabpBeJbHAHa2WJPxuS0lYLmiLamb02e098RIRyq1F2yjM4O08dQVA==",
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.15.1.tgz",
"integrity": "sha512-JErZxFKs0w7wpHZXWonAlom1Jezo0gJ7mf7JHTjOAjFGKAqNMEnlzEjMYhy6cqHgSfSPj/idVscuW+Lo6y6AoQ==",
"dev": true,
"requires": {
"@types/estree": "0.0.39",
"@types/node": "^12.0.2",
"@types/node": "^12.0.7",
"acorn": "^6.1.1"
}
},
"rollup-plugin-commonjs": {
"version": "9.3.4",
"resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.3.4.tgz",
"integrity": "sha512-DTZOvRoiVIHHLFBCL4pFxOaJt8pagxsVldEXBOn6wl3/V21wVaj17HFfyzTsQUuou3sZL3lEJZVWKPFblJfI6w==",
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.0.0.tgz",
"integrity": "sha512-B8MoX5GRpj3kW4+YaFO/di2JsZkBxNjVmZ9LWjUoTAjq8N9wc7HObMXPsrvolVV9JXVtYSscflXM14A19dXPNQ==",
"dev": true,
"requires": {
"estree-walker": "^0.6.0",
"is-reference": "^1.1.2",
"magic-string": "^0.25.2",
"resolve": "^1.10.0",
"rollup-pluginutils": "^2.6.0"
"resolve": "^1.10.1",
"rollup-pluginutils": "^2.7.0"
}
},
"rollup-plugin-livereload": {
@ -2289,21 +2299,22 @@
}
},
"rollup-plugin-node-resolve": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.2.4.tgz",
"integrity": "sha512-t/64I6l7fZ9BxqD3XlX4ZeO6+5RLKyfpwE2CiPNUKa+GocPlQhf/C208ou8y3AwtNsc6bjSk/8/6y/YAyxCIvw==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.0.1.tgz",
"integrity": "sha512-9s3dTu44SKQZM/Pwll42GpqXgT+WdvO0Ga01lF8cwZqJGqRUATtD+GrP3uIzZdpnbPonEJbVasfFt80VGPQqKw==",
"dev": true,
"requires": {
"@types/resolve": "0.0.8",
"builtin-modules": "^3.1.0",
"is-module": "^1.0.0",
"resolve": "^1.10.0"
"resolve": "^1.11.0",
"rollup-pluginutils": "^2.8.0"
}
},
"rollup-plugin-svelte": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.0.3.tgz",
"integrity": "sha512-3W/jbtBcsxohKQMI1Po2ZsUHRGUy3vEtgXLHvBin1+ms3wl2eomSyYBV7pwrkh6tWok9BVzdxGQgd7IqibG+Ew==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-svelte/-/rollup-plugin-svelte-5.1.0.tgz",
"integrity": "sha512-4MRZG29dAWDpoxEs5uIHzDnYafQEOLaKIJAuDYUtFIzEm1F1IGSTlFyjd8/qk4wltlHdu6V7YfZY53+CKryhMg==",
"dev": true,
"requires": {
"require-relative": "^0.8.7",
@ -2312,31 +2323,30 @@
}
},
"rollup-plugin-terser": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-4.0.4.tgz",
"integrity": "sha512-wPANT5XKVJJ8RDUN0+wIr7UPd0lIXBo4UdJ59VmlPCtlFsE20AM+14pe+tk7YunCsWEiuzkDBY3QIkSCjtrPXg==",
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.0.0.tgz",
"integrity": "sha512-W+jJ4opYnlmNyVW0vtRufs+EGf68BIJ7bnOazgz8mgz8pA9lUyrEifAhPs5y9M16wFeAyBGaRjKip4dnFBtXaw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"jest-worker": "^24.0.0",
"serialize-javascript": "^1.6.1",
"terser": "^3.14.1"
"jest-worker": "^24.6.0",
"serialize-javascript": "^1.7.0",
"terser": "^4.0.0"
}
},
"rollup-pluginutils": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.7.1.tgz",
"integrity": "sha512-3nRf3buQGR9qz/IsSzhZAJyoK663kzseps8itkYHr+Z7ESuaffEPfgRinxbCRA0pf0gzLqkNKkSb8aNVTq75NA==",
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz",
"integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==",
"dev": true,
"requires": {
"estree-walker": "^0.6.0",
"micromatch": "^3.1.10"
"estree-walker": "^0.6.1"
}
},
"sade": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/sade/-/sade-1.4.2.tgz",
"integrity": "sha512-MTrQm+Nhl4m1mbssYDgAculC/HbShjj08QtHnA2GTpzivfU5aUp8EoHlECmrIHEaa8hZRZSp2Gygv8VMlpXEBw==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/sade/-/sade-1.5.0.tgz",
"integrity": "sha512-d1BuDwSfXR3vKnV00YF09f5SgzZsexB0A3YR8c95KhiGlJwwepxPVEQZC17XOBxPeQZ5I7OZszsSHy0JloOcMA==",
"dev": true,
"requires": {
"mri": "^1.1.0"
@ -2430,9 +2440,9 @@
}
},
"sirv-cli": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-0.4.2.tgz",
"integrity": "sha512-fw1NUFOuuH1uxmZlPaGAnT9ax8g2vug6QbRibxtbNf58UygerYmlqAIN+CVSLmd4kcr+mat/BlNSwAc+gNyrKg==",
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/sirv-cli/-/sirv-cli-0.4.4.tgz",
"integrity": "sha512-7SsPrYWptRcOvS7/8VIxYDibLDRB4apZaU+y8lfuSnyjYFg0AVVU3J0qcQjWPxT9Ti/DtHnmbivJ+ZTh8L0ykg==",
"dev": true,
"requires": {
"console-clear": "^1.1.0",
@ -2698,25 +2708,25 @@
}
},
"svelte": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.4.1.tgz",
"integrity": "sha512-Ak8/k8fOhz6BBzGVgxfb4YHCWRDzOw7VYuWcDBtBpH7RaCodFXIEpdnRQXc4j9j5bHAlnRn4KXURXVvdZplkBg==",
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.5.1.tgz",
"integrity": "sha512-iMnuyteFGQ8Yl68G/DHTHY1sLwoAMya1eS0ZOHIm/dqn2etR8WEe8hUAoluLryde4Cft4gvMhtHV3NhE60nBmQ==",
"dev": true
},
"svelte-i18n": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-1.0.4.tgz",
"integrity": "sha512-akY8LY2weqDvuABCldpfgwJIbwv1wcCFYGJOQJ+Ku5xg6OEabBvfKexKNZ9nmDav27/9TgCmQV/IwnpSAN/nbQ==",
"version": "1.0.5-beta",
"resolved": "https://registry.npmjs.org/svelte-i18n/-/svelte-i18n-1.0.5-beta.tgz",
"integrity": "sha512-MtG1GB/ccTY/8WsqSUJr6Wv7NdseYLVhz9Zvr2xiIFA3R+ncVxYecQOet2W0MzuMPgZC9WjqVHdX3NNDpD0FPg==",
"requires": {
"intl-messageformat": "^2.2.0",
"micro-memoize": "^3.0.1",
"intl-messageformat": "^4.0.1",
"micro-memoize": "^4.0.7",
"object-resolve-path": "^1.1.1"
}
},
"terser": {
"version": "3.17.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz",
"integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-4.0.0.tgz",
"integrity": "sha512-dOapGTU0hETFl1tCo4t56FN+2jffoKyER9qBGoUFyZ6y7WLoKT0bF+lAYi6B6YsILcGF3q1C2FBh8QcKSCgkgA==",
"dev": true,
"requires": {
"commander": "^2.19.0",
@ -2733,9 +2743,9 @@
}
},
"tinydate": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.0.1.tgz",
"integrity": "sha512-Imqa6iv3Ig5FmC3ESwmqczusIn1h8D5RqNbpatGc1eLHeoytuhodbsAPpSJ8iKiLhxBtLuRsrywWHlJM1bA3Rg==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/tinydate/-/tinydate-1.1.0.tgz",
"integrity": "sha512-YF6YTOyBRHX4b3EtEI0W/mROcv82Gt6VccmVuSAkRV3FNORug2457wSGvT2cThbfuctQvVSmC5GobGheScxtIw==",
"dev": true
},
"to-object-path": {

View File

@ -10,16 +10,16 @@
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"rollup": "^1.10.1",
"rollup-plugin-commonjs": "^9.3.4",
"rollup": "^1.15.1",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-livereload": "^1.0.0",
"rollup-plugin-node-resolve": "^4.2.3",
"rollup-plugin-svelte": "^5.0.3",
"rollup-plugin-terser": "^4.0.4",
"sirv-cli": "^0.4.0",
"svelte": "^3.0.0"
"rollup-plugin-node-resolve": "^5.0.1",
"rollup-plugin-svelte": "^5.1.0",
"rollup-plugin-terser": "^5.0.0",
"sirv-cli": "^0.4.4",
"svelte": "^3.5.1"
},
"dependencies": {
"svelte-i18n": "^1.0.4"
"svelte-i18n": "^1.0.5-beta"
}
}

8043
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,8 @@
"version": "1.0.5-beta",
"main": "dist/i18n.js",
"module": "dist/i18n.mjs",
"browser": "dist/i18n.umd.js",
"types": "src/index.d.ts",
"source": "src/index.js",
"license": "MIT",
"description": "Internationalization library for Svelte",
"author": "Christian Kaisermann <christian@kaisermann.me>",
@ -17,8 +17,9 @@
"translation"
],
"scripts": {
"build": "microbundle --format=cjs,es",
"start": "microbundle watch --format=cjs,es",
"build": "rollup -c",
"dev": "rollup -c -w",
"pretest": "npm run build",
"test": "jest --no-cache --verbose",
"test:watch": "jest --no-cache --verbose --watchAll",
"lint": "eslint \"src/**/*.js\"",
@ -67,8 +68,12 @@
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^4.0.0",
"jest": "^24.8.0",
"microbundle": "^0.11.0",
"prettier": "^1.18.2",
"rollup": "^1.15.1",
"rollup-plugin-auto-external": "^2.0.0",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.1",
"rollup-plugin-terser": "^5.0.0",
"svelte": "^3.5.1"
},
"peerDependencies": {

33
rollup.config.js Normal file
View File

@ -0,0 +1,33 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { terser } from "rollup-plugin-terser";
import pkg from './package.json';
const plugins = [
resolve(),
commonjs(),
terser()
]
export default [
// browser-friendly UMD build
{
input: 'src/index.js',
output: {
name: 'svelteI18n',
file: pkg.browser,
format: 'umd'
},
plugins
},
{
input: 'src/index.js',
external: [...Object.keys(pkg.dependencies), 'svelte/store'],
output: [
{ file: pkg.main, format: 'cjs' },
{ file: pkg.module, format: 'es' }
],
plugins
}
];