Merge pull request #913 from roots/grunt-contrib-less
Switch to grunt-contrib-less, add LESS source maps support
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
### HEAD
|
||||||
|
* Replace `grunt-recess` with `grunt-contrib-less`, add LESS source maps support
|
||||||
|
|
||||||
### 6.5.1: November 5th, 2013
|
### 6.5.1: November 5th, 2013
|
||||||
* Move clean URLs to a [plugin](https://github.com/roots/roots-rewrites)
|
* Move clean URLs to a [plugin](https://github.com/roots/roots-rewrites)
|
||||||
* Update to Bootstrap 3.0.1
|
* Update to Bootstrap 3.0.1
|
||||||
|
|||||||
20
Gruntfile.js
20
Gruntfile.js
@@ -13,16 +13,20 @@ module.exports = function(grunt) {
|
|||||||
'!assets/js/scripts.min.js'
|
'!assets/js/scripts.min.js'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
recess: {
|
less: {
|
||||||
dist: {
|
dist: {
|
||||||
options: {
|
|
||||||
compile: true,
|
|
||||||
compress: true
|
|
||||||
},
|
|
||||||
files: {
|
files: {
|
||||||
'assets/css/main.min.css': [
|
'assets/css/main.min.css': [
|
||||||
'assets/less/app.less'
|
'assets/less/app.less'
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
compress: true,
|
||||||
|
// LESS source maps
|
||||||
|
// To enable, set sourceMap to true and update sourceMapRootpath based on your install
|
||||||
|
sourceMap: false,
|
||||||
|
sourceMapFilename: 'assets/css/main.min.css.map',
|
||||||
|
sourceMapRootpath: '/app/themes/roots/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -63,7 +67,7 @@ module.exports = function(grunt) {
|
|||||||
'assets/less/*.less',
|
'assets/less/*.less',
|
||||||
'assets/less/bootstrap/*.less'
|
'assets/less/bootstrap/*.less'
|
||||||
],
|
],
|
||||||
tasks: ['recess', 'version']
|
tasks: ['less', 'version']
|
||||||
},
|
},
|
||||||
js: {
|
js: {
|
||||||
files: [
|
files: [
|
||||||
@@ -98,13 +102,13 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-recess');
|
grunt.loadNpmTasks('grunt-contrib-less');
|
||||||
grunt.loadNpmTasks('grunt-wp-version');
|
grunt.loadNpmTasks('grunt-wp-version');
|
||||||
|
|
||||||
// Register tasks
|
// Register tasks
|
||||||
grunt.registerTask('default', [
|
grunt.registerTask('default', [
|
||||||
'clean',
|
'clean',
|
||||||
'recess',
|
'less',
|
||||||
'uglify',
|
'uglify',
|
||||||
'version'
|
'version'
|
||||||
]);
|
]);
|
||||||
|
|||||||
2
assets/css/main.min.css
vendored
2
assets/css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
|||||||
* 3. /theme/assets/js/main.min.js (in footer)
|
* 3. /theme/assets/js/main.min.js (in footer)
|
||||||
*/
|
*/
|
||||||
function roots_scripts() {
|
function roots_scripts() {
|
||||||
wp_enqueue_style('roots_main', get_template_directory_uri() . '/assets/css/main.min.css', false, 'eb6334a114ec5f4f5c96dff76170aade');
|
wp_enqueue_style('roots_main', get_template_directory_uri() . '/assets/css/main.min.css', false, 'a4c847d89df381990f5da6cc36bfb85a');
|
||||||
|
|
||||||
// jQuery is loaded using the same method from HTML5 Boilerplate:
|
// jQuery is loaded using the same method from HTML5 Boilerplate:
|
||||||
// Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
|
// Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
"grunt-contrib-jshint": "~0.6.4",
|
"grunt-contrib-jshint": "~0.6.4",
|
||||||
"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-recess": "~0.4.0",
|
"grunt-contrib-less": "~0.8.1",
|
||||||
"grunt-wp-version": "~0.1.0"
|
"grunt-wp-version": "~0.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user