File: Gruntfile.js

package info (click to toggle)
node-headjs 1.0.3+dfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,884 kB
  • sloc: xml: 33; sh: 14; makefile: 2
file content (121 lines) | stat: -rw-r--r-- 4,255 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
module.exports = function (grunt) {
    //#region Saucelabs Browsers
    // https://saucelabs.com/docs/platforms
    var browsers = [
                    // sauce says ff25 is availiable, but times out systematically...
                    {
                        browserName: "firefox",
                        platform   : "Windows 8",
                        version    : "22"
                    },
                    {
                        browserName         : "iphone",
                        platform            : "OS X 10.8",
                        version             : "6.1",
                        "device-orientation": "portrait"
                    },
                    {
                        browserName         : "ipad",
                        platform            : "OS X 10.8",
                        version             : "6.1",
                        "device-orientation": "portrait"
                    },
                    {
                        browserName         : "android",
                        platform            : "Linux",
                        version             : "4.0",
                        "device-orientation": "portrait"
                    },
                    {
                        browserName: "safari",
                        platform: "OS X 10.6",
                        version: "5"
                    },
                    {
                        browserName: "safari",
                        platform   : "OS X 10.8",
                        version    : "6"
                    },
                    {
                        browserName: "chrome",
                        platform   : "Windows 7",
                        version    : "31"
                    },
                    {
                        browserName: "internet explorer",
                        platform   : "Windows XP",
                        version    : "7"
                    },
                    {
                        browserName: "internet explorer",
                        platform   : "Windows XP",
                        version    : "8"
                    },
                    {
                        browserName: "internet explorer",
                        platform   : "Windows 7",
                        version    : "9"
                    },
                    {
                        browserName: "internet explorer",
                        platform   : "Windows 8",
                        version    : "10"
                    },   
                    {
                        browserName: "internet explorer",
                        platform   : "Windows 8.1",
                        version    : "11"
                    }                 
                ];
    //#endregion

    // Project configuration
    grunt.initConfig({
        //#region Saucelabs
        connect: {
            server: {
                options: {
                    base: "",
                    port: 9999
                }
            }
        },
        "saucelabs-qunit": {
            all: {
                options: {
                    urls         : ["http://127.0.0.1:9999/test/unit/1.0.0/index.html"],
                    tunnelTimeout: 10,
                    build        : process.env.TRAVIS_JOB_ID,
                    concurrency  : 3,
                    browsers     : browsers,
                    testname     : "qunit tests",
                    tags         : ["master"]
                }
            }
        },
        watch: {},
        //#endregion

        // load package information ..use later for building via grunt...
        //pkg: grunt.file.readJSON("package.json"),

        // task: local unit tests
        qunit: {
            files: ['test/unit/1.0.0/index.html']
        }
    });

    // Loading dependencies
    for (var key in grunt.file.readJSON("package.json").devDependencies) {
        if (key !== "grunt" && key.indexOf("grunt") === 0) {
            grunt.loadNpmTasks(key);
        }
    }

    // register: local unit tests
    grunt.registerTask("qtest", "qunit");

    // register sauce tasks
    grunt.registerTask("dev" , ["connect", "watch"]);
    grunt.registerTask("test", ["connect", "saucelabs-qunit"]);
};