ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.66k stars 3.23k forks source link

Pre-build, minified file in npm package or git repo #303

Open PeterDaveHello opened 10 years ago

PeterDaveHello commented 10 years ago

Hi there, I'm Peter from cdnjs.com, we hope to transfer all the libs to use auto-update, I found that there is no pre-build, minified file in npm package or git repo, which we can support for auto-update now, if it possible to provide it in the future? thanks!

matthew-andrews commented 10 years ago

Hi @PeterDaveHello,

We've put in a lot of time and thought into our Open Source libraries - to simplify our build and release processes. The goals of this were so that:-

Therefore committing a pre-built*, minified file is something I think we would prefer to avoid if at all possible. It's probably possible to automate our releases to NPM in such a way with Travis so that we could publish minified files along with them but setting that up across all our repositories feels daunting and only doing it for FastClick seems wrong.

I wonder if there's an option C that could be considered:-

We have built a build service (see here) which is able to resolve dependences, build and minify (with Google Closure compiler) any of our front end open source projects (as well as any other open source projects on the NPM registry).

For FastClick this is available here:- https://build.origami.ft.com/bundles/js?modules=fastclick

Would you be able to read the minified source code from there? Or perhaps simply proxy the requests from it?

I'd actually love to work together with you folks (if you'd be up for it) to find ways to simplify the way we distribute open source libraries - because it's just so complicated for package authors right now with all the different registries, package managers and CDNs.

Thanks,

Matt

* Actually as FastClick has no dependencies it doesn't need to be built - but I'm talking in the general case.

PeterDaveHello commented 10 years ago

Hi @matthew-andrews,

Thanks for your reply, I got your thought now. I can access the files from the service you provided, but the real problem on cdnjs is that we only support auto-update via git repo and npm package, I was wondering how can we do with this project, maybe should leave it for manually update for a while ...

Regards, Peter

matthew-andrews commented 10 years ago

Hi @PeterDaveHello,

I don't want to create work for you - and it would be a real shame to miss out of auto-updates. I'd love to work together on a solution that works for all packages - if I could help you set it up could there be any other way we could integrate with cdnjs?

Thanks!

Matt

PeterDaveHello commented 10 years ago

Hi Matt,

I don't want to create work for you either, thanks for your reply, we would like to accept other mechanisms for auto-update, but we also hope it can be used for other projects, not only one or few libs, maybe we'll support bower in the future, is there any common mechanism that fastclick supports?

Sorry for the pool grammar and words, I'm not native speaker.

Regards, Peter