Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Create flat bundles & ship module entry #78

Merged
merged 1 commit into from
Feb 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@
"bug",
"doc"
]
},
{
"login": "Andarist",
"name": "Mateusz Burzyński",
"avatar_url": "https://avatars2.githubusercontent.com/u/9800850?v=4",
"profile": "https://github.com/Andarist",
"contributions": [
"tool"
]
}
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ coverage
.vscode
.idea
lib/
_book/
es/
_book/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Thanks goes to these wonderful people ([emojis](https://github.com/kentcdodds/al
<!-- prettier-ignore -->
| [<img src="https://avatars0.githubusercontent.com/u/23029903?v=4" width="100px;"/><br /><sub><b>Michael Peyper</b></sub>](https://github.com/mpeyper)<br />[💬](#question-mpeyper "Answering Questions") [🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3Ampeyper "Bug reports") [💻](https://github.com/ioof-holdings/redux-subspace/commits?author=mpeyper "Code") [📖](https://github.com/ioof-holdings/redux-subspace/commits?author=mpeyper "Documentation") [💡](#example-mpeyper "Examples") [🤔](#ideas-mpeyper "Ideas, Planning, & Feedback") [🚇](#infra-mpeyper "Infrastructure (Hosting, Build-Tools, etc)") [👀](#review-mpeyper "Reviewed Pull Requests") [📦](#platform-mpeyper "Packaging/porting to new platform") [📢](#talk-mpeyper "Talks") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=mpeyper "Tests") | [<img src="https://avatars2.githubusercontent.com/u/6560018?v=4" width="100px;"/><br /><sub><b>Jonathan Peyper</b></sub>](https://github.com/jpeyper)<br />[💬](#question-jpeyper "Answering Questions") [💻](https://github.com/ioof-holdings/redux-subspace/commits?author=jpeyper "Code") [🤔](#ideas-jpeyper "Ideas, Planning, & Feedback") [👀](#review-jpeyper "Reviewed Pull Requests") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=jpeyper "Tests") | [<img src="https://avatars3.githubusercontent.com/u/1409738?v=4" width="100px;"/><br /><sub><b>Vivian Farrell</b></sub>](https://github.com/vivian-farrell)<br />[🤔](#ideas-vivian-farrell "Ideas, Planning, & Feedback") [📦](#platform-vivian-farrell "Packaging/porting to new platform") [👀](#review-vivian-farrell "Reviewed Pull Requests") [📢](#talk-vivian-farrell "Talks") | [<img src="https://avatars1.githubusercontent.com/u/121742?v=4" width="100px;"/><br /><sub><b>Morgan Larosa</b></sub>](https://github.com/chaos95)<br />[🚇](#infra-chaos95 "Infrastructure (Hosting, Build-Tools, etc)") | [<img src="https://avatars2.githubusercontent.com/u/656565?v=4" width="100px;"/><br /><sub><b>Amit Kothari</b></sub>](http://amitkothari.com)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=amitkothari "Code") [💡](#example-amitkothari "Examples") | [<img src="https://avatars3.githubusercontent.com/u/1206987?v=4" width="100px;"/><br /><sub><b>Riku Rouvila</b></sub>](http://rikurouvila.fi)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=rikukissa "Code") [📖](https://github.com/ioof-holdings/redux-subspace/commits?author=rikukissa "Documentation") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=rikukissa "Tests") | [<img src="https://avatars2.githubusercontent.com/u/2007370?v=4" width="100px;"/><br /><sub><b>Michael</b></sub>](https://github.com/mradionov)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=mradionov "Code") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars0.githubusercontent.com/u/9067274?v=4" width="100px;"/><br /><sub><b>James Adams</b></sub>](https://medium.com/@jamesadams0)<br />[📖](https://github.com/ioof-holdings/redux-subspace/commits?author=James-E-Adams "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/21031458?v=4" width="100px;"/><br /><sub><b>Lee Kyles</b></sub>](https://github.com/lkyles1991)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=lkyles1991 "Code") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=lkyles1991 "Tests") | [<img src="https://avatars1.githubusercontent.com/u/6398211?v=4" width="100px;"/><br /><sub><b>Evert Bouw</b></sub>](https://github.com/evertbouw)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=evertbouw "Code") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=evertbouw "Tests") | [<img src="https://avatars0.githubusercontent.com/u/4831814?v=4" width="100px;"/><br /><sub><b>Paweł Bród</b></sub>](https://github.com/Crazy-Ivan)<br />[🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3ACrazy-Ivan "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/2294352?v=4" width="100px;"/><br /><sub><b>majo44</b></sub>](https://github.com/majo44)<br />[🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3Amajo44 "Bug reports") [💻](https://github.com/ioof-holdings/redux-subspace/commits?author=majo44 "Code") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=majo44 "Tests") | [<img src="https://avatars1.githubusercontent.com/u/26989071?v=4" width="100px;"/><br /><sub><b>Garth Newton</b></sub>](https://github.com/garth-newton)<br />[🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3Agarth-newton "Bug reports") [📖](https://github.com/ioof-holdings/redux-subspace/commits?author=garth-newton "Documentation") |
| [<img src="https://avatars0.githubusercontent.com/u/9067274?v=4" width="100px;"/><br /><sub><b>James Adams</b></sub>](https://medium.com/@jamesadams0)<br />[📖](https://github.com/ioof-holdings/redux-subspace/commits?author=James-E-Adams "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/21031458?v=4" width="100px;"/><br /><sub><b>Lee Kyles</b></sub>](https://github.com/lkyles1991)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=lkyles1991 "Code") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=lkyles1991 "Tests") | [<img src="https://avatars1.githubusercontent.com/u/6398211?v=4" width="100px;"/><br /><sub><b>Evert Bouw</b></sub>](https://github.com/evertbouw)<br />[💻](https://github.com/ioof-holdings/redux-subspace/commits?author=evertbouw "Code") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=evertbouw "Tests") | [<img src="https://avatars0.githubusercontent.com/u/4831814?v=4" width="100px;"/><br /><sub><b>Paweł Bród</b></sub>](https://github.com/Crazy-Ivan)<br />[🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3ACrazy-Ivan "Bug reports") | [<img src="https://avatars0.githubusercontent.com/u/2294352?v=4" width="100px;"/><br /><sub><b>majo44</b></sub>](https://github.com/majo44)<br />[🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3Amajo44 "Bug reports") [💻](https://github.com/ioof-holdings/redux-subspace/commits?author=majo44 "Code") [⚠️](https://github.com/ioof-holdings/redux-subspace/commits?author=majo44 "Tests") | [<img src="https://avatars1.githubusercontent.com/u/26989071?v=4" width="100px;"/><br /><sub><b>Garth Newton</b></sub>](https://github.com/garth-newton)<br />[🐛](https://github.com/ioof-holdings/redux-subspace/issues?q=author%3Agarth-newton "Bug reports") [📖](https://github.com/ioof-holdings/redux-subspace/commits?author=garth-newton "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/9800850?v=4" width="100px;"/><br /><sub><b>Mateusz Burzyński</b></sub>](https://github.com/Andarist)<br />[🔧](#tool-Andarist "Tools") |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
Expand Down
4 changes: 1 addition & 3 deletions packages/react-redux-subspace/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"presets": ["env", "react", "stage-3"]
}
{ "presets": ["./.babelrc.js"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a common approach? I haven't seen many projects with anything other than a babelrc file and an env node for variations (although they do require multiple build scripts to seperate them).

Are there any benefits one way or the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an useful hack to construct ur configs with javascript instead of plain JSON. Upcoming babel@7 will have support for .babelrc.js by default so you will be able to remove this "proxy" .babelrc file

I was always a little bit confused about how merging is done when specifying env in .babelrc - and this had to memorized and checked each time, when with .babelrc.js I just know instantly what's the output config based on javascript conditions, without anything being automated (sometimes unintuitively for me) by babel itself

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

14 changes: 14 additions & 0 deletions packages/react-redux-subspace/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { BABEL_ENV, NODE_ENV } = process.env

const cjs = BABEL_ENV === 'cjs' || NODE_ENV === 'test'

module.exports = {
presets: [
['env', { loose: true, modules: false }],
'react',
'stage-3',
],
plugins: [
cjs && 'transform-es2015-modules-commonjs',
].filter(Boolean),
}
11 changes: 0 additions & 11 deletions packages/react-redux-subspace/.npmignore

This file was deleted.

Loading