source: Dev/trunk/node_modules/grunt-exec/Gruntfile.js @ 532

Last change on this file since 532 was 516, checked in by hendrikvanantwerpen, 11 years ago

Enable deployment with Grunt.

File size: 1.6 KB
RevLine 
[484]1module.exports = function(grunt) {
2  grunt.initConfig({
3    exec: {
4      remove_logs: {
5        command: 'rm -f *.log'
6      , stdout: false
7      , stderr: false
8      }
9    , list_files: {
10        cmd: 'ls -l **'
11      }
[516]12    , list_all_files: 'ls -la'
[484]13    , echo_grunt_version: {
14        cmd: function() { return 'echo ' + this.version; }
15      }
16    , print_name: {
17        cmd: function(firstName, lastName) {
18          var formattedName = [
19                lastName.toUpperCase()
20              , firstName.toUpperCase()
21              ].join(', ');
22
23          return 'echo ' + formattedName;
24        }
25      }
26    , test_callback: {
27        cmd : 'ls -h',
28        callback : function(error, stdout, stderr){
29          var cp = require('child_process');
30          var util = require('util');
31          console.log(util.inspect(cp));
32          console.log('callback is ok, you can use error,stdout,stderr as arguments');
33        }
34      }
35    }
36
37  , jshint: {
38      options: {
39      // enforcing options
40        curly: true
41      , forin: true
42      , newcap: true
43      , noarg: true
44      , noempty: true
45      , nonew: true
46      , quotmark: true
47      , undef: true
48      , unused: true
49      , trailing: true
50      , maxlen: 80
51
52      // relaxing options
53      , boss: true
54      , es5: true
55      , expr: true
56      , laxcomma: true
57
58      // environments
59      , node: true
60      }
61    , tasks: ['tasks/*.js']
62    , tests: ['test/*.js']
63    , gruntfile: ['Gruntfile.js']
64    }
65  });
66
67  grunt.loadTasks('tasks');
68  grunt.loadNpmTasks('grunt-contrib-jshint');
69
70  grunt.registerTask('lint', 'jshint');
71};
Note: See TracBrowser for help on using the repository browser.