Last active
August 29, 2015 13:56
-
-
Save kazu69/9014680 to your computer and use it in GitHub Desktop.
load-grunt-config sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: | |
| - 'jshint' | |
| - 'notify' | |
| - 'watch' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(grunt, options) { | |
| var path = require('path'); | |
| require('load-grunt-config')(grunt, { | |
| configPath: path.join(process.cwd(), 'grunt'), //path to task.js files, defaults to grunt dir | |
| init: true, //auto grunt.initConfig | |
| config: { //additional config vars | |
| test: false | |
| }, | |
| loadGruntTasks: { //can optionally pass options to load-grunt-tasks. If you set to false, it will disable auto loading tasks. | |
| config: require('./package.json'), | |
| scope: ['devDependencies', 'dependencies'], | |
| pattern: ['grunt-*'] | |
| } | |
| }); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (grunt) -> | |
| all: [ | |
| 'Gruntfile.js' | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| default: | |
| options: | |
| message: 'Default finished' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "load-grunt-config-example", | |
| "version": "0.0.0", | |
| "description": "", | |
| "main": "Gruntfile.js", | |
| "dependencies": { | |
| "grunt": "~0.4.2", | |
| "grunt-notify": "~0.2.17", | |
| "grunt-contrib-jshint": "~0.8.0", | |
| "grunt-contrib-watch": "~0.5.3", | |
| "grunt-notify": "~0.2.17", | |
| "load-grunt-config": "~0.7.1" | |
| }, | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grunt | |
| Direct yaml files load via require() is deprecated! Use safeLoad() instead. | |
| Running "jshint:all" (jshint) task | |
| >> 2 files lint free. | |
| Running "notify:default" (notify) task | |
| Running "watch" task | |
| Waiting... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| . | |
| ├── Gruntfile.js | |
| ├── grunt | |
| │ ├── aliases.yaml | |
| │ ├── jshint.coffee | |
| │ ├── notify.yaml | |
| │ └── watch.js | |
| ├── node_modules | |
| └── package.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| all: { | |
| files: [ | |
| '<%= jshint.all %>', | |
| 'grunt/*.yaml' | |
| ], | |
| tasks: [ | |
| 'default' | |
| ] | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment