This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #17 from jmreidy/master

Make compatible with grunt 0.4
  • Loading branch information...
sindresorhus committed Jan 6, 2013
2 parents e652c3a + 318fa9a commit 5151fe20364eb792b5c4e00bf91f5ae149cfa3a8
Showing with 16 additions and 13 deletions.
  1. +7 −8 grunt.js → Gruntfile.js
  2. +5 −3 package.json
  3. +4 −2 tasks/recess.js
View
@@ -15,17 +15,15 @@ module.exports = function( grunt ) {
]
}
},
- lint: {
- files: [
- 'grunt.js',
- 'tasks/**/*.js'
- ]
- },
watch: {
files: '<config:lint.files>',
tasks: 'default'
},
jshint: {
+ lint: [
+ 'grunt.js',
+ 'tests/**/*.js'
+ ],
options: {
es5: true,
esnext: true,
@@ -47,7 +45,8 @@ module.exports = function( grunt ) {
});
grunt.loadTasks('tasks');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.registerTask( 'default', 'lint recess:pass recess:fail' );
+ grunt.registerTask( 'default', ['jshint', 'recess:pass', 'recess:fail'] );
-};
+};
View
@@ -1,6 +1,6 @@
{
"name": "grunt-recess",
- "version": "0.1.4",
+ "version": "0.1.5",
"description": "Lint and minify CSS and LESS",
"keywords": [
"gruntplugin",
@@ -24,10 +24,12 @@
"url": "git://github.com/sindresorhus/grunt-recess.git"
},
"dependencies": {
- "recess": "~1.1.6"
+ "recess": "~1.1.6",
+ "grunt-lib-legacyhelpers": "~0.1.x"
},
"devDependencies": {
- "grunt": "~0.3.17"
+ "grunt": "~0.4.0",
+ "grunt-contrib-jshint": "~0.1.x"
},
"engines": {
"node": ">=0.8.0"
View
@@ -1,9 +1,11 @@
+
module.exports = function( grunt ) {
'use strict';
grunt.registerMultiTask('recess', 'Lint and minify CSS and LESS', function() {
var recess = require('recess');
- var lf = grunt.utils.linefeed;
+ var helpers = require('grunt-lib-legacyhelpers').init(grunt);
+ var lf = grunt.util.linefeed;
var cb = this.async();
var files = grunt.file.expandFiles( this.file.src );
var dest = this.file.dest;
@@ -47,7 +49,7 @@ module.exports = function( grunt ) {
grunt.log.writeln( 'File "' + dest + '" created.' );
if ( compress ) {
- grunt.helper( 'min_max_info', min.join( separator ), max.join( separator ) );
+ helpers.min_max_info(min.join( separator ), max.join( separator ) );
}
} else {
grunt.fail.fatal('No destination specified. Required when options.compile is enabled.');

0 comments on commit 5151fe2

Please sign in to comment.