Skip to content

Commit

Permalink
Add indentation checker
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeno Rocha committed Nov 8, 2013
1 parent a3f394b commit 558d85a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
28 changes: 22 additions & 6 deletions Gruntfile.js
Expand Up @@ -24,6 +24,20 @@ module.exports = function(grunt) {
}
},

lintspaces: {
all: {
src: [
'*', 'src/*', 'spec/*', 'demo/*', 'assets/base.css'
],
options: {
newline: true,
trailingspaces: true,
indentation: 'tabs',
spaces: 2
}
}
},

jasmine: {
src: 'src/jquery.github.js',
options: {
Expand All @@ -33,15 +47,13 @@ module.exports = function(grunt) {
}
},

// Lint definitions
jshint: {
files: ['src/jquery.github.js'],
options: {
jshintrc: ".jshintrc"
}
},

// Minify definitions
uglify: {
options: {
banner: '<%= meta.banner %>'
Expand All @@ -61,10 +73,14 @@ module.exports = function(grunt) {

});

// Load all Grunt tasks installed from NPM
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-lintspaces');

grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('default', ['lintspaces', 'jshint', 'concat', 'uglify']);
grunt.registerTask('test', ['lintspaces', 'jshint', 'jasmine']);

};
6 changes: 3 additions & 3 deletions assets/base.css
Expand Up @@ -198,9 +198,9 @@
font-family: 'EntypoRegular';
src: url('Entypo-webfont.eot');
src: url('Entypo-webfont.eot?#iefix') format('embedded-opentype'),
url('Entypo-webfont.woff') format('woff'),
url('Entypo-webfont.ttf') format('truetype'),
url('Entypo-webfont.svg#EntypoRegular') format('svg');
url('Entypo-webfont.woff') format('woff'),
url('Entypo-webfont.ttf') format('truetype'),
url('Entypo-webfont.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
}
6 changes: 5 additions & 1 deletion package.json
Expand Up @@ -5,6 +5,10 @@
"author": "Zeno Rocha",
"homepage": "https://github.com/zenorocha/jquery-github/",
"version": "0.3.2",
"repository": {
"type": "git",
"url": "https://github.com/zenorocha/jquery-github.git"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.7",
Expand All @@ -13,7 +17,7 @@
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.4.2",
"matchdep": "~0.3.0"
"grunt-lintspaces": "0.2.203"
},
"scripts": {
"test": "grunt test --verbose"
Expand Down

0 comments on commit 558d85a

Please sign in to comment.