Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 434540

Summary: [terminal] Add grunt support
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: DockerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: mamacdon
Version: 6.0   
Target Milestone: 6.0 M2   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Anthony Hunter CLA 2014-05-09 15:48:17 EDT
The terminal should provide automation support using using gruntjs ( http://gruntjs.com/ ).
Comment 1 Anthony Hunter CLA 2014-05-09 16:02:41 EDT
Grunt has been a part of the Docker configuration for some time, the detail that was missing is confirmation the feature works.

One hurdle to overcome was where node modules get installed. From what I have read, the consensus is that it expected that a user checks the node_modules folder into their git project.

So to run grunt in the terminal, the user would run in the project folder:

% npm install dependency

which creates the node_modules folder which is added to git.

Then builds / automation is run by executing:

% grunt
Comment 2 Mark Macdonald CLA 2014-05-09 16:43:49 EDT
The typical grunt usage pattern I've seen is to install the 'grunt' dependency locally in a project (as you said), but install the 'grunt-cli' library globally. grunt-cli is just a launcher that can run any grunt version, so this allows different local versions of grunt to coexist among different projects or something.

I checked the Docker file and I see both grunt and grunt-cli are being installed globally:
> # install grunt
> RUN npm install -g grunt
> RUN npm install -g grunt-cli

I think we need to remove the grunt line here, as only grunt-cli should be part of the global install. Otherwise we are forcing a particular version on users.
Comment 3 Mark Macdonald CLA 2014-05-09 16:44:52 EDT
Made only 'grunt-cli' installed globally
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=0b538f6