Use grunt-wp-assets for version task
* default use filename version revving instead of querystring * versioning file will be ignore
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,3 +3,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
assets/vendor/*
|
assets/vendor/*
|
||||||
assets/css/main.min.css.map
|
assets/css/main.min.css.map
|
||||||
|
assets/css/*main.*.min.css
|
||||||
|
assets/js/*scripts.*.min.js
|
||||||
|
|||||||
11
Gruntfile.js
11
Gruntfile.js
@@ -57,12 +57,9 @@ module.exports = function(grunt) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
version: {
|
version: {
|
||||||
options: {
|
assets: {
|
||||||
file: 'lib/scripts.php',
|
src: ['assets/css/main.min.css', 'assets/js/scripts.min.js'],
|
||||||
css: 'assets/css/main.min.css',
|
dest: 'lib/scripts.php'
|
||||||
cssHandle: 'roots_main',
|
|
||||||
js: 'assets/js/scripts.min.js',
|
|
||||||
jsHandle: 'roots_scripts'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modernizr: {
|
modernizr: {
|
||||||
@@ -119,7 +116,7 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-contrib-less');
|
grunt.loadNpmTasks('grunt-contrib-less');
|
||||||
grunt.loadNpmTasks('grunt-wp-version');
|
grunt.loadNpmTasks('grunt-wp-assets');
|
||||||
grunt.loadNpmTasks('grunt-modernizr');
|
grunt.loadNpmTasks('grunt-modernizr');
|
||||||
|
|
||||||
// Register tasks
|
// Register tasks
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
"grunt-contrib-uglify": "~0.2.4",
|
"grunt-contrib-uglify": "~0.2.4",
|
||||||
"grunt-contrib-watch": "~0.5.3",
|
"grunt-contrib-watch": "~0.5.3",
|
||||||
"grunt-contrib-less": "~0.8.1",
|
"grunt-contrib-less": "~0.8.1",
|
||||||
"grunt-wp-version": "~0.1.0",
|
"grunt-wp-assets": "~0.2.1",
|
||||||
"grunt-modernizr": "~0.5.1"
|
"grunt-modernizr": "~0.5.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user