Move configs to individual files
This commit is contained in:
parent
20d10c9338
commit
c44ede722f
5 changed files with 44 additions and 22 deletions
24
Gruntfile.js
24
Gruntfile.js
|
@ -1,26 +1,6 @@
|
|||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
watch: {
|
||||
scripts: {
|
||||
files: ['/tmp/test/*'],
|
||||
tasks: 'fixwhitespace',
|
||||
options: {
|
||||
spawn: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
trimtrailingspaces: {
|
||||
main: {
|
||||
src: ['<%= cwd %>/**/*'],
|
||||
options: {
|
||||
filter: 'isFile',
|
||||
encoding: 'utf8',
|
||||
failIfTrimmed: false
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var configs = require('load-grunt-configs')(grunt);
|
||||
grunt.initConfig(configs);
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
|
|
18
config/pkg.json
Normal file
18
config/pkg.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "grunt-test",
|
||||
"version": "0.0.1",
|
||||
"description": "Grunt test global runners",
|
||||
"main": "Grunfile.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Andrew Tomaka",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-trimtrailingspaces": "^0.4.0",
|
||||
"load-grunt-configs": "^0.4.0",
|
||||
"load-grunt-tasks": "^0.6.0"
|
||||
}
|
||||
}
|
12
config/trimtrailingspaces.json
Normal file
12
config/trimtrailingspaces.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"main": {
|
||||
"src": [
|
||||
"<%= cwd %>/**/*"
|
||||
],
|
||||
"options": {
|
||||
"filter": "isFile",
|
||||
"encoding": "utf8",
|
||||
"failIfTrimmed": false
|
||||
}
|
||||
}
|
||||
}
|
11
config/watch.json
Normal file
11
config/watch.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"scripts": {
|
||||
"files": [
|
||||
"/tmp/test/*"
|
||||
],
|
||||
"tasks": "fixwhitespace",
|
||||
"options": {
|
||||
"spawn": false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
"grunt": "^0.4.5",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-trimtrailingspaces": "^0.4.0",
|
||||
"load-grunt-configs": "^0.4.0",
|
||||
"load-grunt-tasks": "^0.6.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue