Open ricovitch opened 8 years ago
Making a new release with just the UMD syntax sugar could be a good starting point, prior to rewriting the lib from scratch maybe ?
the goal is not really rewrite the library from scratch per se, but between swfobject 2.3 beta and now a lot of things have moved in the JS world, the browser world etc.
so let's just do the basic homework as reviewing the different forks, how/where swfobject is used, see if we can learn from those forks, learn about use cases, learn about pain points, etc.
for example, the pull request you're mentioning https://github.com/Smarp/swfobject/commit/f60f72ceb5999aa5f89b6a5a2fa49a25e1d6d579
could be a valid point to port the code to typescript and use the --module
option to either export for different modules systems (AMD, CommonJS, etc.)
let's consider ourselves in "research phase" but also set a simple goal taking over SWFOvject is not for a w-e patch or a couple of weeks maintenance job but something that could and should last many years, eg. the long run
so if somehow we decide to rewrite it in typescript which is a big effort compared to just patching little bits this and there at least we know why we are making such effort
You're right, i went a bit fast assuming we are going to rewrite swfobject right now. What all thoses forks on npm tell is also the need to clarify which version is official latest on npm, and which will be the maintained one.
the "official" version will be the one that get the more update, maintenance etc. people using the lib will decide :)
but being considered "official" could allow to solve that other problem which is also to submit new updated version to CDN like https://cdnjs.com/
other CDN to take into account https://developers.google.com/speed/libraries/ serve SWFObject 2.1 and 2.2
There are some forks of the original available as npm bundles. Maybe review them and see what the people who forked the lib tried to achieve and how they did it ?
https://www.npmjs.com/search?q=swfobject
Seems the majority of the forks have been made for compatibilty reasons with amd or commonjs syntaxes. This pull request ultimately sums it up : https://github.com/Smarp/swfobject/commit/f60f72ceb5999aa5f89b6a5a2fa49a25e1d6d579