From a321a9b8cc62bc6b9e449d89b0a9b97e046bb577 Mon Sep 17 00:00:00 2001 From: Stuart Colville Date: Mon, 29 Jun 2015 11:38:33 +0100 Subject: [PATCH] Move grunt tasks dir config -> tasks --- Gruntfile.js | 7 ++++++- {config => tasks}/.eslintrc | 0 {config => tasks}/abideCompile.js | 0 {config => tasks}/abideCreate.js | 0 {config => tasks}/abideExtract.js | 0 {config => tasks}/abideMerge.js | 0 {config => tasks}/clean.js | 0 {config => tasks}/cog.js | 0 {config => tasks}/copy.js | 0 {config => tasks}/devserver.js | 0 {config => tasks}/eslint.js | 0 {config => tasks}/gh-pages.js | 0 {config => tasks}/karma.js | 0 {config => tasks}/react.js | 0 {config => tasks}/sass.js | 0 {config => tasks}/svg_sprite.js | 0 {config => tasks}/watch.js | 0 {config => tasks}/webpack-dev-server.js | 0 {config => tasks}/webpack.js | 0 tests/test.gh-pages-config.js | 2 +- 20 files changed, 7 insertions(+), 2 deletions(-) rename {config => tasks}/.eslintrc (100%) rename {config => tasks}/abideCompile.js (100%) rename {config => tasks}/abideCreate.js (100%) rename {config => tasks}/abideExtract.js (100%) rename {config => tasks}/abideMerge.js (100%) rename {config => tasks}/clean.js (100%) rename {config => tasks}/cog.js (100%) rename {config => tasks}/copy.js (100%) rename {config => tasks}/devserver.js (100%) rename {config => tasks}/eslint.js (100%) rename {config => tasks}/gh-pages.js (100%) rename {config => tasks}/karma.js (100%) rename {config => tasks}/react.js (100%) rename {config => tasks}/sass.js (100%) rename {config => tasks}/svg_sprite.js (100%) rename {config => tasks}/watch.js (100%) rename {config => tasks}/webpack-dev-server.js (100%) rename {config => tasks}/webpack.js (100%) diff --git a/Gruntfile.js b/Gruntfile.js index 841e700..4c74843 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,12 @@ module.exports = function(grunt) { // load all grunt tasks matching the ['grunt-*', '@*/grunt-*'] patterns require('load-grunt-tasks')(grunt); - var configs = require('load-grunt-configs')(grunt); + var configs = require('load-grunt-configs')(grunt, { + config: { + src: 'tasks/*.js', + }, + }); + grunt.initConfig(configs); diff --git a/config/.eslintrc b/tasks/.eslintrc similarity index 100% rename from config/.eslintrc rename to tasks/.eslintrc diff --git a/config/abideCompile.js b/tasks/abideCompile.js similarity index 100% rename from config/abideCompile.js rename to tasks/abideCompile.js diff --git a/config/abideCreate.js b/tasks/abideCreate.js similarity index 100% rename from config/abideCreate.js rename to tasks/abideCreate.js diff --git a/config/abideExtract.js b/tasks/abideExtract.js similarity index 100% rename from config/abideExtract.js rename to tasks/abideExtract.js diff --git a/config/abideMerge.js b/tasks/abideMerge.js similarity index 100% rename from config/abideMerge.js rename to tasks/abideMerge.js diff --git a/config/clean.js b/tasks/clean.js similarity index 100% rename from config/clean.js rename to tasks/clean.js diff --git a/config/cog.js b/tasks/cog.js similarity index 100% rename from config/cog.js rename to tasks/cog.js diff --git a/config/copy.js b/tasks/copy.js similarity index 100% rename from config/copy.js rename to tasks/copy.js diff --git a/config/devserver.js b/tasks/devserver.js similarity index 100% rename from config/devserver.js rename to tasks/devserver.js diff --git a/config/eslint.js b/tasks/eslint.js similarity index 100% rename from config/eslint.js rename to tasks/eslint.js diff --git a/config/gh-pages.js b/tasks/gh-pages.js similarity index 100% rename from config/gh-pages.js rename to tasks/gh-pages.js diff --git a/config/karma.js b/tasks/karma.js similarity index 100% rename from config/karma.js rename to tasks/karma.js diff --git a/config/react.js b/tasks/react.js similarity index 100% rename from config/react.js rename to tasks/react.js diff --git a/config/sass.js b/tasks/sass.js similarity index 100% rename from config/sass.js rename to tasks/sass.js diff --git a/config/svg_sprite.js b/tasks/svg_sprite.js similarity index 100% rename from config/svg_sprite.js rename to tasks/svg_sprite.js diff --git a/config/watch.js b/tasks/watch.js similarity index 100% rename from config/watch.js rename to tasks/watch.js diff --git a/config/webpack-dev-server.js b/tasks/webpack-dev-server.js similarity index 100% rename from config/webpack-dev-server.js rename to tasks/webpack-dev-server.js diff --git a/config/webpack.js b/tasks/webpack.js similarity index 100% rename from config/webpack.js rename to tasks/webpack.js diff --git a/tests/test.gh-pages-config.js b/tests/test.gh-pages-config.js index 5b71291..315b454 100644 --- a/tests/test.gh-pages-config.js +++ b/tests/test.gh-pages-config.js @@ -1,6 +1,6 @@ 'use strict'; -var ghPagesConfig = require('../config/gh-pages'); +var ghPagesConfig = require('../tasks/gh-pages'); describe('grunt-gh-pages config', function() { it('Docker builds should be silent=true', function() {