liferay / liferay-theme-tasks

A set of tasks for building and deploying Liferay Portal themes.
18 stars 24 forks source link

Decide whether or not to keep using gulp #73

Closed izaera closed 6 years ago

izaera commented 6 years ago

Currently this tool is structured as gulp tasks which has some drawbacks like:

  1. Forces users of the tool to use gulp
  2. Makes tool's source code more difficult to structure
  3. Gulp is harder to test, reuse and support than plain code
  4. ...

On the other hand, it is already written using gulp and it's working, so we should see a clear benefit to stop using it. Also, if we stop using gulp, we need to:

  1. Change all the documentation
  2. Explain users why and how we changed the tool
  3. Provide a way to migrate custom builds
  4. ...

Which looks like a considerable effort.

So, I would like to use this issue to discuss pros and cons of:

  1. Letting the tool as it is (based on gulp)
  2. Making it an standalone CLI.
  3. Or perhaps we could have both: move all logic to plain javascript and expose it as a CLI and as gulp tasks, for the user to choose.
  4. ...

Any ideas?

/cc @Robert-Frampton @jbalsas

robframpton commented 6 years ago

If we dropped gulp as the CLI and task runner, does that mean we would also drop the use of streams and gulp plugins?

izaera commented 6 years ago

Probably, but not necessarily. It would be a matter of internal implementation that shouldn't be exposed to the users. I mean that users shouldn't care (or take advantage) of our internal implementations.

For example, as it is done now, there are a lot of internal tasks and subtasks which are difficult to understand (some are obvious, some don't) and they are -in fact- an API, because people can be defining custom builds and attaching to them, for example. I'm not against a gulp API, but definitely not one that exposes internal tasks that we may want to remove, rename or change.

However, take this with a pinch of salt, as I'm thinking aloud, not asserting what I think must be done.

Nevertheless, do you think gulp streams are so necessary? I used other similar tools for liferay-npm-bundler (like when copying files and things like that) and they look fast too 🤔 .

jbalsas commented 6 years ago

Closing here. We're for now still under gulp. We can rethink this inside liferay-themes-sdk if this ever becomes relevant again.