Skip to content

Commit

Permalink
feat(publish): add cleanup rollup plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Mar 25, 2019
1 parent 87cc645 commit 0c707e6
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 7 deletions.
2 changes: 2 additions & 0 deletions conf/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { camelCase, upperFirst } from 'lodash'
import babel from 'rollup-plugin-babel'
import resolve from 'rollup-plugin-node-resolve'
import stripBanner from 'rollup-plugin-strip-banner'
import cleanup from 'rollup-plugin-cleanup'

const pkg = process.env.PACKAGE
const isWatching = process.env.ROLLUP_WATCH === 'TRUE'
Expand Down Expand Up @@ -49,6 +50,7 @@ const commonPlugins = [
'@nivo/babel-preset'
]
}),
cleanup()
]

const configs = [
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"react-test-renderer": "^16.8.4",
"rollup": "^1.7.0",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-cleanup": "^3.1.1",
"rollup-plugin-node-resolve": "^4.0.1",
"rollup-plugin-prettier": "^0.6.0",
"rollup-plugin-strip-banner": "^0.2.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/waffle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"dependencies": {
"@nivo/core": "0.54.0",
"@nivo/legends": "0.54.0",
"lodash": "^4.17.4",
"lodash.range": "^3.2.0",
"lodash.partial": "^4.2.1",
"react-motion": "^0.5.2",
"recompose": "^0.30.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/waffle/src/Waffle.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/
import React, { Component, Fragment } from 'react'
import partial from 'lodash/partial'
import partial from 'lodash.partial'
import { TransitionMotion, spring } from 'react-motion'
import setDisplayName from 'recompose/setDisplayName'
import { Container, SvgWrapper } from '@nivo/core'
Expand Down
2 changes: 1 addition & 1 deletion packages/waffle/src/WaffleCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/
import React, { Component } from 'react'
import range from 'lodash/range'
import range from 'lodash.range'
import setDisplayName from 'recompose/setDisplayName'
import { isCursorInRect, getRelativeCursor, Container } from '@nivo/core'
import { renderLegendToCanvas } from '@nivo/legends'
Expand Down
2 changes: 1 addition & 1 deletion packages/waffle/src/WaffleHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* file that was distributed with this source code.
*/
import React, { Component, Fragment } from 'react'
import partial from 'lodash/partial'
import partial from 'lodash.partial'
import setDisplayName from 'recompose/setDisplayName'
import { TransitionMotion, spring } from 'react-motion'
import { Container } from '@nivo/core'
Expand Down
2 changes: 1 addition & 1 deletion packages/waffle/src/compute.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import { range } from 'lodash'
import range from 'lodash.range'

/**
* Computes optimal cell size according to dimensions/layout/padding.
Expand Down
43 changes: 41 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8163,6 +8163,15 @@ js-beautify@^1.8.9:
mkdirp "~0.5.0"
nopt "~4.0.1"

js-cleanup@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/js-cleanup/-/js-cleanup-1.0.1.tgz#1d38080c7ee92e1d2d2b94054d0a33c48951e0df"
integrity sha512-wyHeWKqbcQV78/tiMJ6pgJrkG7p2u3b2xX9IJFvvurpJL9/++89dHfkUebhWvSMS84LG0uQ7BnG5GGyAzY21Ag==
dependencies:
magic-string "^0.25.1"
perf-regexes "^1.0.1"
skip-regex "^1.0.2"

js-levenshtein@^1.1.3:
version "1.1.6"
resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"
Expand Down Expand Up @@ -8643,6 +8652,11 @@ lodash.omitby@4.6.0:
resolved "https://registry.yarnpkg.com/lodash.omitby/-/lodash.omitby-4.6.0.tgz#5c15ff4754ad555016b53c041311e8f079204791"
integrity sha1-XBX/R1StVVAWtTwEExHo8HkgR5E=

lodash.partial@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/lodash.partial/-/lodash.partial-4.2.1.tgz#49f3d8cfdaa3bff8b3a91d127e923245418961d4"
integrity sha1-SfPYz9qjv/izqR0SfpIyRUGJYdQ=

lodash.pick@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
Expand Down Expand Up @@ -8765,6 +8779,13 @@ magic-string@0.25.1:
dependencies:
sourcemap-codec "^1.4.1"

magic-string@^0.25.1:
version "0.25.2"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.2.tgz#139c3a729515ec55e96e69e82a11fe890a293ad9"
integrity sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==
dependencies:
sourcemap-codec "^1.4.4"

make-dir@^1.0.0, make-dir@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
Expand Down Expand Up @@ -10204,6 +10225,11 @@ pend@~1.2.0:
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=

perf-regexes@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/perf-regexes/-/perf-regexes-1.0.1.tgz#6da1d62f5a94bf9353a0451bccacf69068b75d0b"
integrity sha512-L7MXxUDtqr4PUaLFCDCXBfGV/6KLIuSEccizDI7JxT+c9x1G1v04BQ4+4oag84SHaCdrBgQAIs/Cqn+flwFPng==

performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
Expand Down Expand Up @@ -11566,6 +11592,14 @@ rollup-plugin-babel@^4.3.2:
"@babel/helper-module-imports" "^7.0.0"
rollup-pluginutils "^2.3.0"

rollup-plugin-cleanup@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-cleanup/-/rollup-plugin-cleanup-3.1.1.tgz#d012faab5e212b1c4bfa8144ace70fc6ac7b3315"
integrity sha512-wMS9JQm4ShvlMqno1pOfqvh0yYgNLO2ZgmzDsVvKuDt4XCn+9DcMoUwRQ5t9p9b113dR5FhPFFUHnvvQ/yuEtA==
dependencies:
js-cleanup "^1.0.1"
rollup-pluginutils "^2.3.3"

rollup-plugin-node-resolve@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-4.0.1.tgz#f95765d174e5daeef9ea6268566141f53aa9d422"
Expand Down Expand Up @@ -11623,7 +11657,7 @@ rollup-pluginutils@2.4.1:
estree-walker "^0.6.0"
micromatch "^3.1.10"

rollup-pluginutils@^2.3.0:
rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.3:
version "2.5.0"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.5.0.tgz#23be0f05ac3972ea7b08fc7870cb91fde5b23a09"
integrity sha512-9Muh1H+XB5f5ONmKMayUoTYR1EZwHbwJJ9oZLrKT5yuTf/RLIQ5mYIGsrERquVucJmjmaAW0Y7+6Qo1Ep+5w3Q==
Expand Down Expand Up @@ -11958,6 +11992,11 @@ sisteransi@^1.0.0:
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.0.tgz#77d9622ff909080f1c19e5f4a1df0c1b0a27b88c"
integrity sha512-N+z4pHB4AmUv0SjveWRd6q1Nj5w62m5jodv+GD8lvmbY/83T/rpbJGZOnK5T149OldDj4Db07BSv9xY4K6NTPQ==

skip-regex@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/skip-regex/-/skip-regex-1.0.2.tgz#ac655d77e7c771ac2b9f37585fea37bff56ad65b"
integrity sha512-pEjMUbwJ5Pl/6Vn6FsamXHXItJXSRftcibixDmNCWbWhic0hzHrwkMZo0IZ7fMRH9KxcWDFSkzhccB4285PutA==

slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
Expand Down Expand Up @@ -12103,7 +12142,7 @@ source-map@^0.7.2:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==

sourcemap-codec@^1.4.1:
sourcemap-codec@^1.4.1, sourcemap-codec@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz#c63ea927c029dd6bd9a2b7fa03b3fec02ad56e9f"
integrity sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==
Expand Down

0 comments on commit 0c707e6

Please sign in to comment.