-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add es2015 modules export, build umd with rollup and remove generated…
… code (#359) * Remove generated code in lib and dist Remove src out of the npm package. * Add es2015 modules export Remove babel-plugin-transform-runtime from the build as it is not necessary and increases the output size for nothing. * Use rollup instead of webpack for umd builds Lightens the umd builds quite a bit: $ ll dist old dist: total 504 -rw-r--r-- 1 tusbar staff 192K Aug 16 21:16 react-leaflet.js -rw-r--r-- 1 tusbar staff 50K Aug 16 21:16 react-leaflet.min.js old: total 600 -rw-r--r-- 1 tusbar staff 263K Aug 16 21:11 react-leaflet.js -rw-r--r-- 1 tusbar staff 77K Aug 16 21:11 react-leaflet.min.js * Use lodash-es for es and rollup builds This was taken from react-redux. :)
- Loading branch information
Showing
46 changed files
with
225 additions
and
13,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,37 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"react", | ||
"stage-1" | ||
], | ||
"plugins": [ | ||
"dev-expression", | ||
"lodash", | ||
"transform-proto-to-assign", | ||
"transform-runtime" | ||
] | ||
"transform-proto-to-assign" | ||
], | ||
"env": { | ||
"development": { | ||
"presets": [ | ||
["es2015", { "modules": "commonjs", "loose": true }], | ||
"react", | ||
"stage-1" | ||
] | ||
}, | ||
"rollup": { | ||
"presets": [ | ||
["es2015", { "modules": false, "loose": true }], | ||
"react", | ||
"stage-1" | ||
], | ||
"plugins": [ | ||
"external-helpers", | ||
"./build/use-lodash-es" | ||
] | ||
}, | ||
"jsnext": { | ||
"presets": [ | ||
["es2015", { "modules": false, "loose": true }], | ||
"react", | ||
"stage-1" | ||
], | ||
"plugins": [ | ||
"./build/use-lodash-es" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
node_modules | ||
bower_components | ||
coverage | ||
|
||
dist | ||
es | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ __tests__ | |
coverage | ||
docs | ||
example | ||
src | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = function() { | ||
return { | ||
visitor: { | ||
ImportDeclaration(path) { | ||
var source = path.node.source | ||
source.value = source.value.replace(/^lodash($|\/)/, 'lodash-es$1') | ||
}, | ||
}, | ||
} | ||
} |
Oops, something went wrong.