1
0
Fork 0

Move configs to individual files

This commit is contained in:
Andrew Tomaka 2014-09-11 01:20:40 -04:00
parent 20d10c9338
commit c44ede722f
5 changed files with 44 additions and 22 deletions

View File

@ -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
View 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"
}
}

View File

@ -0,0 +1,12 @@
{
"main": {
"src": [
"<%= cwd %>/**/*"
],
"options": {
"filter": "isFile",
"encoding": "utf8",
"failIfTrimmed": false
}
}
}

11
config/watch.json Normal file
View File

@ -0,0 +1,11 @@
{
"scripts": {
"files": [
"/tmp/test/*"
],
"tasks": "fixwhitespace",
"options": {
"spawn": false
}
}
}

View File

@ -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"
}
}