From 77e2fdb4bda53d7f5b5d8ecda60fc00bdb5838c3 Mon Sep 17 00:00:00 2001 From: Hariadi Hinta Date: Thu, 20 Feb 2014 10:27:48 +0800 Subject: [PATCH] Use grunt-wp-assets for version task * default use filename version revving instead of querystring * versioning file will be ignore --- .gitignore | 2 ++ Gruntfile.js | 11 ++++------- package.json | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 5d0ce7a..7ee6d32 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ node_modules assets/vendor/* assets/css/main.min.css.map +assets/css/*main.*.min.css +assets/js/*scripts.*.min.js diff --git a/Gruntfile.js b/Gruntfile.js index d7eec92..c0b7a32 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -57,12 +57,9 @@ module.exports = function(grunt) { } }, version: { - options: { - file: 'lib/scripts.php', - css: 'assets/css/main.min.css', - cssHandle: 'roots_main', - js: 'assets/js/scripts.min.js', - jsHandle: 'roots_scripts' + assets: { + src: ['assets/css/main.min.css', 'assets/js/scripts.min.js'], + dest: 'lib/scripts.php' } }, modernizr: { @@ -119,7 +116,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-wp-version'); + grunt.loadNpmTasks('grunt-wp-assets'); grunt.loadNpmTasks('grunt-modernizr'); // Register tasks diff --git a/package.json b/package.json index b1fe28f..c52b9f4 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "grunt-contrib-uglify": "~0.2.4", "grunt-contrib-watch": "~0.5.3", "grunt-contrib-less": "~0.8.1", - "grunt-wp-version": "~0.1.0", + "grunt-wp-assets": "~0.2.1", "grunt-modernizr": "~0.5.1" } }