comunicationLeap/node_modules/utf8/Gruntfile.js
node_modules/utf8/Gruntfile.jsRaw
1module.exports = function(grunt) {
2
3 grunt.initConfig({
4 'shell': {
5 'options': {
6 'stdout': true,
7 'stderr': true,
8 'failOnError': true
9 },
10 'generate-test-data': { // Only when needed
11 'command': 'if [ ! -f data.json ]; then echo python generate-test-data.py; fi',
12 'options': {
13 'execOptions': {
14 'cwd': 'tests'
15 }
16 }
17 },
18 'cover': {
19 'command': 'istanbul cover --report "html" --verbose --dir "coverage" "tests/tests.js"; istanbul report --root "coverage" --format "html"'
20 },
21 'test-narwhal': {
22 'command': 'echo "Testing in Narwhal..."; export NARWHAL_OPTIMIZATION=-1; narwhal "tests/tests.js"'
23 },
24 'test-phantomjs': {
25 'command': 'echo "Testing in PhantomJS..."; phantomjs "tests/tests.js"'
26 },
27 // Rhino 1.7R4 has a bug that makes it impossible to test in.
28 // https://bugzilla.mozilla.org/show_bug.cgi?id=775566
29 // To test, use Rhino 1.7R3, or wait (heh) for the 1.7R5 release.
30 'test-rhino': {
31 'command': 'echo "Testing in Rhino..."; rhino -opt -1 "tests.js"',
32 'options': {
33 'execOptions': {
34 'cwd': 'tests'
35 }
36 }
37 },
38 'test-ringo': {
39 'command': 'echo "Testing in Ringo..."; ringo -o -1 "tests/tests.js"'
40 },
41 'test-node': {
42 'command': 'echo "Testing in Node..."; node "tests/tests.js" --extended'
43 },
44 'test-browser': {
45 'command': 'echo "Testing in a browser..."; open "tests/index.html"'
46 }
47 }
48 });
49
50 grunt.loadNpmTasks('grunt-shell');
51
52 grunt.registerTask('cover', 'shell:cover');
53 grunt.registerTask('ci', [
54 'shell:generate-test-data',
55 'shell:test-narwhal',
56 'shell:test-phantomjs',
57 'shell:test-rhino',
58 'shell:test-ringo',
59 'shell:test-node',
60 ]);
61 grunt.registerTask('test', [
62 'shell:generate-test-data',
63 'ci',
64 'shell:test-browser'
65 ]);
66
67 grunt.registerTask('default', [
68 'shell:test-node',
69 'cover'
70 ]);
71
72};