0

GravCMS has it's own asset manager: https://learn.getgrav.org/themes/asset-manager

It can minify, concatenate js/scss files.

Is it better to do such tasks via gulp (gulp-sass, gulp-concat, gulp-uglify), rather than using built-in asset manager in Grav?

Alexander Kim
  • 17,304
  • 23
  • 100
  • 157

1 Answers1

2

Well I don't have any experience with the grav asset manager. But since you want to do grav-related tasks, I'd recommend to use the built in manager, as long as it can cover all your needs.

I don't see any benefit of using and adding an extra dependency in gulp/grunt or any other build tool.

The only time I'd consider using gulp is, if you already have an existing project with a gulp configuration and you can re-use it and have complex logic.

However probably you just want to minify/concatenate files. So the built in asset manager is the way to go

Nicolas Gehlert
  • 2,626
  • 18
  • 39
  • Asset manager can all kind of these tasks, except scss to css compilation :( – Alexander Kim Mar 30 '18 at 10:34
  • @AlexanderKim you can do the css compilation also in the terminal if you want. Maybe you can call/run a script from the asset manager? – Nicolas Gehlert Mar 30 '18 at 10:47
  • Well, running it every time i make a change to scss is annoying, so looks, like there's no way to omit gulp at all if i work with scss. – Alexander Kim Mar 30 '18 at 10:49
  • @AlexanderKim you don’t need to run it every time. There is a watch mode. Gulp ist just a wrapper. If you don’t need anything else there is no benefit in using gulp – Nicolas Gehlert Mar 30 '18 at 10:59