Last change
on this file since 431 was
431,
checked in by hendrikvanantwerpen, 12 years ago
|
Added basic HTML linting.
Added htmllint as grunt task.
Moved jshint and htrmllint options to separate rc files.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[426] | 1 | var fs = require('fs'); |
---|
| 2 | var path = require('path'); |
---|
| 3 | |
---|
| 4 | module.exports = function(grunt) { |
---|
| 5 | |
---|
| 6 | grunt.initConfig({ |
---|
| 7 | pkg: grunt.file.readJSON('package.json'), |
---|
| 8 | less: { |
---|
| 9 | options: { |
---|
| 10 | strictImports: true |
---|
| 11 | }, |
---|
| 12 | all: { |
---|
| 13 | files: { |
---|
| 14 | 'css/main.css': 'css/main.less' |
---|
| 15 | } |
---|
| 16 | } |
---|
| 17 | }, |
---|
| 18 | jshint: { |
---|
| 19 | options: { |
---|
[431] | 20 | jshintrc: ".jshintrc" |
---|
[426] | 21 | }, |
---|
| 22 | all: { |
---|
| 23 | files: { |
---|
| 24 | src: ['**/*.js', '!node_modules/**'] |
---|
| 25 | } |
---|
| 26 | } |
---|
[431] | 27 | }, |
---|
| 28 | htmlhint: { |
---|
| 29 | options: { |
---|
| 30 | htmlhintrc: ".htmlhintrc" |
---|
| 31 | }, |
---|
| 32 | all: { |
---|
| 33 | files: { |
---|
| 34 | src: ['**/*.html', '!node_modules/**'] |
---|
| 35 | } |
---|
| 36 | } |
---|
[426] | 37 | } |
---|
| 38 | }); |
---|
| 39 | |
---|
| 40 | grunt.loadNpmTasks('grunt-contrib-less'); |
---|
| 41 | grunt.loadNpmTasks('grunt-contrib-jshint'); |
---|
[431] | 42 | grunt.loadNpmTasks('grunt-htmlhint'); |
---|
[426] | 43 | |
---|
[431] | 44 | grunt.registerTask('default', ['less', 'jshint', 'htmlhint']); |
---|
[426] | 45 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.