Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Supporting Gulp? #79

Open
mtraynham opened this issue May 12, 2015 · 6 comments
Open

Supporting Gulp? #79

mtraynham opened this issue May 12, 2015 · 6 comments

Comments

@mtraynham
Copy link

Gulp has quite a few benefits over Grunt, specifically that it's built on a streaming concept which is often faster because you don't have to create intermediate files/steps. Any chance that this may get added?

@adamdubiel
Copy link
Collaborator

Core concepts would be the same, so simply adding it should be quite simple. I don't know about some extended support. Never used Gulp (yet), so i'm not so familiar with this tool. Let me think about it, i need to assess how much time would it take to make it right.

@mtraynham
Copy link
Author

Sure thing. I suspect that the grunt-maven npm package would not be reusable, but the grunt-maven.json file would be.

@adamdubiel
Copy link
Collaborator

Exactly. I'm not convinced i want to go though writing custom gulp plugin (or maybe it's easier than in grunt?). One step at a time.

@mtraynham
Copy link
Author

I imagine just triggering Gulp through Maven instead of Grunt is probably enough. In terms of the grunt-maven npm module, it has the tasks:

  • mavenPrepare - copies resources from src to target-grunt
  • mavenDist - copies resources from target-grunt -> target-grunt/dist -> target

mavenPrepare is very nice when using a watch task, but I'm under the assumption that the mavenDist task is not all particularly useful. I've superseded its use with the maven assembly plugin instead, as Grunt already builds the deliverables and I just tar/collect only the files I need.

So question; based on my usages of the npm package (which seems somewhat optional), could they not be replaced by something like grunt-sync or with gulp, which supports it out of the box?

Not trying to deter you from dropping support for the tasks, I'm just wondering if they are necessary for the end-to-end workflow. This still assumes you will write out the grunt-maven.json file as it can be read by either build system, and as a reference for copy/watch paths.

The frontend-maven-plugin seems pretty agnostic to the build itself, and instead focuses on providing only the tools for a build. In my opinion though, that tool ultimately does not follow Maven's best practices of providing a working directory for the build which is a copy of the source.

@adamdubiel
Copy link
Collaborator

I was just thinking of starting small - allowing to run Gulp. The rest will come if needed :)

I started out as grunt-only plugin, but now i see that pivoting to more agnostic plugin might be nice.

@mtraynham
Copy link
Author

Awesome. Alternatively, I was able to get this running gulp, by setting:

<!-- Using gulp instead -->
<gruntExecutable>gulp</gruntExecutable>

Bit hacky, but it works.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants