kraftvaerk / generator-rammevaerk

Scaffold a web project in kraftvaerk style
MIT License
5 stars 4 forks source link

Update gulp #28

Closed kristoforsalmin closed 6 years ago

kristoforsalmin commented 6 years ago

Hi, gulp 4 has just been released, perhaps we should start looking into it and see if we can update rammevaerk 😄

Also it makes sense to do #22 alongside with this one.

mi2oon commented 6 years ago

Ohh, it's been a long time coming... finally. I might have a go with it.

sidenote: I found this little thing a little while back. CSS TRICKS

mi2oon commented 6 years ago

Gulp 4 is still published under the next tag npm install gulp@next, I guess it's better to wait for them to move to the latest tag

mi2oon commented 6 years ago

Alright, I've made the initial commit for gulp 4@next just waiting for it to come to npm, check out the branch. I have a thing I would like to discuss the take on.

Well, I had to restructure few tasks as splitting tasks between files works a little bit differently in the new version of gulp. Plus the official recipe requires an extra plugin(gulp-hub).

So, for now I've just moved all the task definitions into the main gulpfile but I don't like the fact that the task definitions are now disconnected from the task logic.

Anyway, let me know what you think or perhaps I am going all wrong about it. 😄

kristoforsalmin commented 6 years ago

Hi, cool 😄

So, for now I've just moved all the task definitions into the main gulpfile but I don't like the fact that the task definitions are now disconnected from the task logic.

I totally agree and I currently see that you've used this proposed by Gulp registry approach. I dug a bit deeper into how this whole new (is it even new?) concept works and to me from one hand it seem like an overhead, from the other hang code is clean and you can implement this registry on your own in order to fully control things. All in all it looks great right now 👍

We still have few general tasks defined in the gulpfile.js and in ideal world they would be in the tasks folder, but since they depend on each other and I don't know if it makes sense or possible? What do you think?

mi2oon commented 6 years ago

@racse1 I also looked into making a custom registry to avoid the extra plugin but to maintain readability I just went with the gulp-hub plugin at the end. As for the tasks inside the gulpfile I had to keep them there as they depend on each other and couldn't get them to work otherwise. Will spend a little more time on it and see if it's even possible.

The next thing is.. I read rumors about not needing the plumber plugin.. will explore that one :D. Other then that I think we are almost there... just waiting for the NPM tag to change.. perhaps we can just go ahead.. what do you think?

kristoforsalmin commented 6 years ago

Will spend a little more time on it and see if it's even possible.

@mi2oon Thanks, but please keep in mind, it's just an idea that comes from Blendid and maybe it's not relevant. I just liked that any tasks/*.js file describes a task, so you have one place to go if you're looking for something.

The next thing is.. I read rumors about not needing the plumber plugin.. will explore that one :D.

Wow, but I saw yet another thing here, please have a look 😄

mi2oon commented 6 years ago

Thanks, but please keep in mind, it's just an idea that comes from Blendid and maybe it's not relevant. I just liked that any tasks/*.js file describes a task, so you have one place to go if you're looking for something.

True, I also just liked the fact that all tasks could be located in one place.

Wow, but I saw yet another thing here, please have a look.

Seems like the rumor was just a rumor for now but this Pump seems to do just that.. so we just need to wrap our pipes with pumps and kill the plumber. 😀