Closed andytango closed 7 years ago
@andytango Have you seen https://wzrd.in before? https://wzrd.in/standalone/es7-shim@latest
It's 2017. Nothing should be used without npm, and you should be using browserify or webpack in your own projects.
wzrd.in is a fine workaround if there's some mysterious reason why you can't use these tools that all modern web dev require.
Hi guys, yes I did get to that eventually, thanks.
@ljharb I've noticed this has been your response to other requests of this nature. Like many JS devs, I absolutely agree that webpack/browserify is the way forward, and I almost exclusively use them on new projects. I'm in the process of migrating my older projects over to this as well, but this can take time.
In this particular case, 'the mysterious reason' is that I was helping out on another team's Rails project that is still using sprockets (so no NPM) and it just isn't ready to integrate webpack yet (think budgets, feature requests, the backlog etc).
They're not full time JS devs, and had been using some ES7 features without realising that browser support isn't universal, and so I wanted to include the shim for this (I'd already added ES5 and ES6), to save them having to check compatibility tables etc.
So yes, the year is 2017, and what an fantastic year it is to be writing JS too! But not everyone's there yet, and for some teams, learning and integrating new tools its a luxury that they can't afford right now.
If this is a project for the community's benefit, would it really be so unreasonable to include a link to the browserified modules on wzrd.in for people who need to include it as a static asset? Surely you'd agree that this is a better alternative than copying and pasting polyfills from MDN or hamstringing ourselves with ES5?
Well said. I'll think about how I want to word the readme section for it.
I still don't believe it's doing them any favors - any time spent not adding npm + browserify or webpack to their Rails app is wasted time - but in this kind of project (shims/polyfills) I think it's worth a link.
Not everyone has node or npm installed, but they might want to use the browserified files in their projects.
I can see three solutions to that I'd be happy to contribute with:
<script>
tag or download it directlyDo you have any thoughts/preferences on this?
Cheers :smile: