Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Piping A Grunt task output to another task input?

I want to minify my Handlebars HTML templates before compiling them. I was wondering is it possible to pipe the output of grunt-contrib-htmlmin as input to grunt-contrib-handlebars without making an intermediate file.

like image 810
bozhidarc Avatar asked Jun 06 '14 10:06

bozhidarc


People also ask

When a task is run grunt looks for its configuration under a?

When a task is run, Grunt looks for its configuration under a property of the same name. Multi-tasks can have multiple configurations, defined using arbitrarily named "targets." In the example below, the concat task has foo and bar targets, while the uglify task only has a bar target.

What is grunt config?

config. Access project-specific configuration data defined in the Gruntfile . Note that any method marked with a ☃ (unicode snowman) is also available directly on the grunt object, and any method marked with a ☆ (white star) is also available inside tasks on the this object.

Which grunt plugin is used to run predefined tasks when the watched file changes?

grunt-este-watchby Daniel SteigerwaldRun predefined tasks whenever watched file changes.

What does grunt serve do?

The point of the server task is to have quick and dirty access to static files for testing. grunt server IS NOT a production server environment. It really should only be used during the grunt lifecycle to get static testing assets to the testing environment.


1 Answers

Grunt by design does not support piping. Take a look at gulp, where piping is the main concept.

like image 134
raidendev Avatar answered Sep 23 '22 17:09

raidendev