Last change
on this file since 484 was
484,
checked in by hendrikvanantwerpen, 11 years ago
|
Commit node_modules, to make checkouts and builds more deterministic.
|
File size:
1.0 KB
|
Line | |
---|
1 | module.exports = function(grunt) { |
---|
2 | grunt.initConfig({ |
---|
3 | exec: { |
---|
4 | test1: { |
---|
5 | cmd: 'echo "bruce willis was dead" > test1' |
---|
6 | } |
---|
7 | , test2: { |
---|
8 | cmd: function() { return 'echo "grunt@' + this.version + '" > test2'; } |
---|
9 | } |
---|
10 | , test3: { |
---|
11 | cmd: function(answerToLife, tacoThoughts) { |
---|
12 | var text = [ |
---|
13 | 'the answer to life is ' + answerToLife |
---|
14 | , 'thoughts on tacos? ' + tacoThoughts |
---|
15 | ].join('\n'); |
---|
16 | |
---|
17 | return 'echo "' + text + '" > test3'; |
---|
18 | } |
---|
19 | } |
---|
20 | , test4: { |
---|
21 | cmd: function(){ |
---|
22 | return 'echo "you can use callback, and error, stdout, stderr can be used as arguments"'; |
---|
23 | }, |
---|
24 | callback: function(error, stdout, stderr){ |
---|
25 | var fs = require('fs'); |
---|
26 | var path = require('path'); |
---|
27 | var outputPath = path.resolve(process.cwd(), 'test4'); |
---|
28 | console.log('outputPath : ' + outputPath); |
---|
29 | fs.writeFileSync(outputPath, stdout, 'utf-8'); |
---|
30 | } |
---|
31 | } |
---|
32 | } |
---|
33 | }); |
---|
34 | |
---|
35 | grunt.loadTasks('../tasks'); |
---|
36 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.