SAP-archive / grunt-openui5

Grunt tasks around OpenUI5
Apache License 2.0
90 stars 34 forks source link

Possibility of splitting out core preload functionality #20

Closed r-murphy closed 6 years ago

r-murphy commented 8 years ago

Hi SAP UI5 Team, On our team, we're not using grunt. We're using some gulp and mostly just vanilla node. We still want to generate preload files. So I did a successful PoC of splitting up the grunt-preload functionality into a separate module, and removed the grunt dependency. Since it's 95% the same, it can easily be used by this grunt plugin. And can potentially be used by a gulp plugin, so they share the same core. It's the same modular approach used by many popular tools, include UglifyJS, Babel, and I see connect-openui5 as well.

I'd be happy to contribute my changes back, and agree to the Apache Contributor agreement (I already have for OpenUI5), if it's an approach you're interested in. I was something I had to do anyways for our build process, which is why I didn't gauge interest first.

Here is the core module. https://github.com/r-murphy/openui5-preload And a fork of this project using it. https://github.com/r-murphy/grunt-openui5/tree/feature/openui5-preload-core

All tests pass. The core module uses the same unit tests, with some changes to actually make the preload from the tests, rather than from grunt.

I also tried it out in the openui5-worklist-app.

Thanks Ryan

matz3 commented 8 years ago

Hi Ryan,

when we initially wrote this and also the other node modules around OpenUI5 we wanted to reduce the number of modules as we didn't really know where we end up or how it will evolve over the time. And as our grunt plugin was the only place where this code was needed we didn't make the effort to pull it out.

But as you've already put your efforts into this I would really take the chance to do the split between logic and plugin.

I will have to clarify how we proceed and will get back to you. I guess the best solution would be to move the module to the SAP org so that it is kept at one place (if this is okay for you).

Thank you very much :+1:

Matthias

matz3 commented 6 years ago

We've released a new Builder as part of our UI5 Build and Development Tooling which is capable of creating preload files via Node.js API.