Skip to content

Commit

Permalink
lodash modularized for smaller builds
Browse files Browse the repository at this point in the history
  • Loading branch information
will-wow committed Sep 10, 2019
1 parent 4161f1d commit 9c62fad
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.1.0]

### Changed

- Used rollup and lodash-modularized packages for smaller builds


## [0.0.0]

### Added
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ Once done, run `bundle` to install the gem.

Then you need to update your `package.json` file to include the `webpacker-svelte` NPM module:

`./bin/yarn add webpacker-svelte`
```bash
npm i webpacker-svelte --save-dev
yarn add webpacker-svelte --dev
```

You are now all set!

Expand Down
5 changes: 4 additions & 1 deletion javascript/webpacker_svelte-npm-module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"svelte": ">= 3"
},
"dependencies": {
"lodash": "^4.0.0"
"lodash.assign": "^4.2.0",
"lodash.intersection": "^4.4.0",
"lodash.keys": "^4.2.0",
"lodash.omit": "^4.5.0"
}
}
8 changes: 4 additions & 4 deletions javascript/webpacker_svelte-npm-module/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import intersection from 'lodash/intersection'
import keys from 'lodash/keys'
import assign from 'lodash/assign'
import omit from 'lodash/omit'
import intersection from 'lodash.intersection'
import keys from 'lodash.keys'
import assign from 'lodash.assign'
import omit from 'lodash.omit'
import ujs from './ujs'

const CLASS_ATTRIBUTE_NAME = 'data-svelte-component'
Expand Down
22 changes: 21 additions & 1 deletion javascript/webpacker_svelte-npm-module/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,27 @@ locate-path@^2.0.0:
p-locate "^2.0.0"
path-exists "^3.0.0"

lodash@^4.0.0, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.4:
lodash.assign@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=

lodash.intersection@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.intersection/-/lodash.intersection-4.4.0.tgz#0a11ba631d0e95c23c7f2f4cbb9a692ed178e705"
integrity sha1-ChG6Yx0OlcI8fy9Mu5ppLtF45wU=

lodash.keys@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205"
integrity sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=

lodash.omit@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60"
integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=

lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.4:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
Expand Down

0 comments on commit 9c62fad

Please sign in to comment.