Skip to content

Commit

Permalink
fix: use lodash es imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pimlie committed Jan 15, 2019
1 parent b613dfc commit 4f5a664
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 28 deletions.
6 changes: 3 additions & 3 deletions lib/form-slider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Slider from 'bootstrap-slider'
import camelCase from 'lodash.camelcase'
import snakeCase from 'lodash.snakecase'
import throttle from 'lodash.throttle'
import camelCase from 'lodash/camelCase'
import snakeCase from 'lodash/snakeCase'
import throttle from 'lodash/throttle'
import props from './properties'
import watch from './watchers'

Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
],
"dependencies": {
"bootstrap-slider": "^10.6.0",
"lodash.camelcase": "^4.3.0",
"lodash.snakecase": "^4.1.1",
"lodash.throttle": "^4.1.1"
"lodash": "^4.17.11"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
Expand Down
12 changes: 5 additions & 7 deletions scripts/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ import commonJS from 'rollup-plugin-commonjs'
import nodeResolve from 'rollup-plugin-node-resolve'
import buble from 'rollup-plugin-buble'
import { terser } from 'rollup-plugin-terser'
import camelCase from 'lodash.camelcase'
import camelCase from 'lodash/camelCase'
import { name, dependencies } from '../package.json'

const base = path.resolve(__dirname, '..')
const lib = path.resolve(base, 'lib')
const dist = path.resolve(base, 'dist')

const externalExcludes = [
'lodash.camelcase',
'lodash.snakecase',
'lodash.throttle'
'lodash/camelCase',
'lodash/snakeCase',
'lodash/throttle',
]

const baseConfig = {
Expand Down Expand Up @@ -43,9 +43,7 @@ export default [{
file: path.resolve(dist, name + '.js'),
sourcemap: true
},
external: Object.keys(dependencies).filter(
dep => !externalExcludes.includes(dep)
)
external: Object.keys(dependencies)
}, {
...baseConfig,
output: {
Expand Down
15 changes: 0 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4360,21 +4360,11 @@ lodash._reinterpolate@~3.0.0:
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=

lodash.camelcase@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=

lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=

lodash.snakecase@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=

lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
Expand All @@ -4395,11 +4385,6 @@ lodash.templatesettings@^4.0.0:
dependencies:
lodash._reinterpolate "~3.0.0"

lodash.throttle@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=

[email protected], lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
Expand Down

0 comments on commit 4f5a664

Please sign in to comment.