source: Dev/trunk/node_modules/grunt-curl/test/grunt.js @ 531

Last change on this file since 531 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 1.8 KB
Line 
1module.exports = function (grunt) {
2
3  // Project configuration.
4  grunt.initConfig({
5    clean: {
6      test: 'actual/'
7    },
8    curl: {
9      js: {
10        src: 'http://cdnjs.cloudflare.com/ajax/libs/labjs/2.0.3/LAB.min.js',
11        dest: 'actual/file.js'
12      },
13      zip: {
14        src: 'https://github.com/twitter/bootstrap/blob/91b92f9dd09c1794d02c6157daba5405d8f09e39/assets/bootstrap.zip?raw=true',
15        dest: 'actual/file.zip'
16      },
17      nonExistingDomain: {
18        src: 'http://nonexistent--foo--domain',
19        dest: 'actual/nonexistent-domain'
20      },
21      nonExistingFile: {
22        src: 'https://github.com/nonexistent--foo--file',
23        dest: 'actual/nonexistent-file'
24      }
25    },
26    'curl-dir': {
27      multi: {
28        src: [
29          'http://cdnjs.cloudflare.com/ajax/libs/labjs/2.0.3/LAB.min.js',
30          'http://cdnjs.cloudflare.com/ajax/libs/cookiejar/0.5/cookiejar.js'
31        ],
32        dest: 'actual/multi'
33      },
34      braceExpansion: {
35        src: [
36          'http://cdnjs.cloudflare.com/ajax/libs/{labjs/2.0.3/LAB.min,cookiejar/0.5/cookiejar}.js'
37        ],
38        dest: 'actual/braceExpansion'
39      },
40      router: {
41        src: [
42          'http://cdnjs.cloudflare.com/ajax/libs/labjs/2.0.3/LAB.min.js',
43          'http://cdnjs.cloudflare.com/ajax/libs/cookiejar/0.5/cookiejar.js'
44        ],
45        router: function curlDirRouter (url) {
46          return url.replace('http://cdnjs.cloudflare.com/', '');
47        },
48        dest: 'actual/router'
49      }
50    }
51  });
52
53  // Load local tasks.
54  grunt.loadTasks('../tasks');
55
56  // Load grunt contrib clean (chdir for 0.4)
57  process.chdir('..');
58  grunt.loadNpmTasks('grunt-contrib-clean');
59  process.chdir(__dirname);
60
61  // Run project tasks
62  grunt.registerTask('default', 'clean curl curl-dir');
63};
Note: See TracBrowser for help on using the repository browser.