Last change
on this file since 426 was
426,
checked in by hendrikvanantwerpen, 12 years ago
|
Added grunt tasks and code cleanup.
Added grunt for less and jshint procesing.
Cleanup of code to pass jshint (one bug found :).
|
File size:
1.4 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: { |
---|
| 20 | /* enforcing options */ |
---|
| 21 | bitwise: true, |
---|
| 22 | curly: true, |
---|
| 23 | eqeqeq: true, |
---|
| 24 | immed: true, |
---|
| 25 | indent: 4, |
---|
| 26 | latedef: true, |
---|
| 27 | newcap: true, |
---|
| 28 | noarg: true, |
---|
| 29 | undef: true, |
---|
| 30 | unused: false, |
---|
| 31 | strict: false, |
---|
| 32 | /* relaxing options */ |
---|
| 33 | loopfunc: true, |
---|
| 34 | /* enverinments */ |
---|
| 35 | devel: true, |
---|
| 36 | node: true, |
---|
| 37 | /* globals */ |
---|
| 38 | globals: { |
---|
| 39 | require: true, |
---|
| 40 | define: true |
---|
| 41 | } |
---|
| 42 | }, |
---|
| 43 | all: { |
---|
| 44 | files: { |
---|
| 45 | src: ['**/*.js', '!node_modules/**'] |
---|
| 46 | } |
---|
| 47 | } |
---|
| 48 | } |
---|
| 49 | }); |
---|
| 50 | |
---|
| 51 | grunt.loadNpmTasks('grunt-contrib-less'); |
---|
| 52 | grunt.loadNpmTasks('grunt-contrib-jshint'); |
---|
| 53 | |
---|
| 54 | grunt.registerTask('default', ['less', 'jshint']); |
---|
| 55 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.