Comments (10)
This isn't laziness, just earliness. It's currently in proof-of-concept phase (see status in the docs). I'm open to adding dist builds, with the caveat that the documentation should mention that we use generators, and that the Babel generator runtime will be required for ES5 environments.
from redux-dsm.
Laziness is when the user refuses to complete the final 1% of the task :)
If it would be only really just 1%... As I said the main problem is that when you are bundling, you assume that all modules are ready for ES5 environment. This is true for most of the modules. Then one of those modules suddenly decides not to do it it which results in some strange syntax error messages to consumer. No hint or clue what to do about it.
Besides the Babel doesn't make it any easier to selectively transpile node_modules. You have to fiddle with some regular expressions. Because of that I am fairly certain, that I wont be using this module. It just makes things messy.
If @ericelliott really wants this to go through, then I think it should be at least mentioned in docs ideally with explanation how to configure babel to transpile this module.
from redux-dsm.
Yes node does. And tape should be fine (mocha probably won't). But anyone who wants to run the tests has to be on node 6.x.x.
- I'll remove Babel stuff
- update the readme
- would you like me to echo some pretest message for users on 4.x? Please let me now
from redux-dsm.
Hm, doesn't removing Babel means ditching environments that are missing those features? For example whole Internet Explorer brand till IE11 doesn't have these. The android and ios are the same.
from redux-dsm.
@FredyC You'll import and transpile to ES5 on your end so you get full browser & device support. We not shipping an already built package. Babel is for our tests, and it looks like not needed when on Latest stable (or any > 6.0.0)
from redux-dsm.
@zouhir From my experience it's generally very problematic to actually transpile code from node_modules
. You generally don't enable babel on that whole folder. If there is some module that is not transpiled, you have to add ugly exceptions to your configuration.
Not even mentioning that some people are rather picky on what babel plugins they use instead of whole presets and just because some module has not transpiled their code, they must add extra plugin because of that.
I must say that this would probably kept me from using library, I like my configs smooth.
In my opinion providing transpiled code is just necessary transitioning step till those other environments are more ready or abandoned.
from redux-dsm.
@FredyC I get what you saying 👍. Correct usually most packages are being shipped ES5 and you get the 'dist' ready built version.
in our case, this package is for redux, Where users in big percentage using React or similar libraries and have a bundler (browserify or webpack) and a babel-loader or or the browserify equivalent (probably called bablify) so and your module's internal (written by you) or external requirements (from node_modules) will be imported and injected in ES5.
Please let me know or reference me to an example where that didn't work for you so I can manage to prevent doing someone else's mistake.
@ericelliott would appreciate looking at this so I don't give misleading info :)
from redux-dsm.
@zouhir I do not understand much what are you saying. It's just pure fact, that transpiling something from node_modules folder is PITA
cloverfield-tools/universal-react-boilerplate#41 (comment)
from redux-dsm.
Yes there are some comments as well promoting other way around and transpiling on consumer side, but frankly that's total annoyance, especially since you cannot really know which packages need it.
Question is, do you write a module for people or yourself? Removing babel feels more like laziness from author of the package who doesn't care about broad number of consumers. Given that Redux is used universally server/client side, it's clear that it should support more than just Node 6+.
from redux-dsm.
Thanks for sending this link across, clearly the author of this module @ericelliott is aware of that conversation as he was involved in that discussion.
The author has mentioned in #4
No build step needed! Compiling for the intended targets is a job for the module users, not for us. We don't know the intended targets, so we don't know the right options to build for. If we give them the raw source, it gives users the flexibility and freedom they need to decide things like whether or not they need to bundle a generator runtime, etc...
Answering your question, Question is, do you write a module for people or yourself?
I didn't write this module, I can't answer on behalf of the author. But I usually write them for myself to serve my purpose, then push them to help people having a similar problem to mine. Removing Babel now will make things bit cleaner, but that might not be final decision. The author was thoughtful not lazy. He shipped a 99% working solution. Laziness is when the user refuses to complete the final 1% of the task :)
I think we need to find a solution all together, I'll wait for @ericelliott to see if he'd consider a compiled version of the code with multiple variations so users can use out of the box.
from redux-dsm.
Related Issues (12)
- Fix imports HOT 5
- Restrict state transitions according to graph HOT 7
- Port to ES5? HOT 22
- Accessing actions from custom middleware HOT 6
- Create middleware to assure actions dispatched in right order HOT 1
- Initial status is ignored.. 'idle' is always used. HOT 1
- Should provide selector
- Export statuses
- Can't use the same action type in more than one graph state
- Add snyk
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-dsm.