aboutsummaryrefslogtreecommitdiffstats
path: root/dcae_dmaapbc_webapp/src/main/webapp/app/fusion/ase/scripts/bower_components/Snap.svg/Gruntfile.js
blob: 415c624b26ab9402e3a5a2e093ede57efe5221d9 (plain)
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
module.exports = function(grunt) {

    var pkg = grunt.file.readJSON("package.json");

    // Project configuration.
    grunt.initConfig({
        // Metadata.
        pkg: pkg,
        banner: grunt.file.read("./src/copy.js")
            .replace(/@VERSION/, pkg.version)
            .replace(/@DATE/, grunt.template.today("yyyy-mm-dd")) + "\n",
        // Task configuration.
        uglify: {
            options: {
                banner: "<%= banner %>",
                report: "min"
            },
            dist: {
                src: "<%= concat.target.dest %>",
                dest: "dist/snap.svg-min.js"
            }
        },
        concat: {
            options: {
                banner: "<%= banner %>"
            },
            target: {
                dest: "dist/snap.svg.js",
                src: [
                    "./node_modules/eve/eve.js",
                    "./src/amd-banner.js",
                    "./src/mina.js",
                    "./src/svg.js",
                    "./src/element.js",
                    "./src/matrix.js",
                    "./src/attr.js",
                    "./src/class.js",
                    "./src/attradd.js",
                    "./src/paper.js",
                    "./src/path.js",
                    "./src/set.js",
                    "./src/equal.js",
                    "./src/mouse.js",
                    "./src/filter.js",
                    "./src/align.js",
                    "./src/amd-footer.js"
                ]
            }
        },
        exec: {
            dr: {
              command: "node node_modules/dr.js/dr dr.json"
            }
        }
    });

    grunt.loadNpmTasks("grunt-contrib-concat");
    grunt.loadNpmTasks("grunt-contrib-uglify");
    grunt.loadNpmTasks("grunt-exec");

    grunt.registerTask("default", ["concat", "uglify", "exec"]);
};