Proper way to use enque versions

I’m trying to get into the habit of adding version numbers to my scripts. Can anyone give me some pointers on how to properly do this?

Here’s a sample of what I’m working with:

wp_enqueue_style('roots_app', get_template_directory_uri() . '/assets/app.css', false, '1.0');

Thanks!

First off, why are you not using the one minified CSS file generated by Grunt that is automatically versioned?

I usually work with a few other developers and we all use Codekit so we can share our config file to keep settings consistent across all environments.

I haven’t flexed my grunt muscles yet but I’ve been reading some promising things here. Mostly I’m trying to see how it would fit into a teams workflow.

If that’s the route to go, I’d be willing to try it out!

Grunt is definitely better than CodeKit - especially when working with teams

@benword, touché. After doing my research I’m going Grunt and not looking back. I’m loving all these plugins.

Back to my original question. Does Grunt add new version numbers to the enqued scripts?

For example the latest version is wp_enqueue_style('roots_main', get_template_directory_uri() . '/assets/css/main.min.css', false, '4ca341b72772dd7778b9f967320e728d');

Does that “4ca341…” etc… get updated via grunt?

Yes, via the Grunt plugin wp-version: https://npmjs.org/package/grunt-wp-version