Browse Source

grunt; fixed file name typo

develop
Robin Thoni 9 years ago
parent
commit
b92981df6b

+ 8
- 0
Gruntfile.js View File

@@ -0,0 +1,8 @@
1
+/**
2
+ * Created by robin on 11/10/15.
3
+ */
4
+
5
+module.exports = function(grunt) {
6
+
7
+
8
+};

+ 1
- 3
Gruntfile_admin.js View File

@@ -121,9 +121,7 @@ module.exports = function(grunt) {
121 121
                     {
122 122
                         expand: true,
123 123
                         cwd:'<%= globals.appFolder %>/../bower_components/flat-ui/dist/fonts/',
124
-                        src: [
125
-                            '**'
126
-                        ],
124
+                        src: ['**'],
127 125
                         dest: '<%= globals.releasePath %>/fonts/'
128 126
                     }
129 127
                 ]

+ 146
- 0
Gruntfile_camotion.js View File

@@ -0,0 +1,146 @@
1
+/**
2
+ * Created by robin on 11/10/15.
3
+ */
4
+
5
+module.exports = function(grunt) {
6
+
7
+    grunt.loadNpmTasks('grunt-contrib-clean');
8
+    grunt.loadNpmTasks('grunt-usemin');
9
+    grunt.loadNpmTasks('grunt-contrib-concat');
10
+    grunt.loadNpmTasks('grunt-contrib-uglify');
11
+    grunt.loadNpmTasks('grunt-contrib-copy');
12
+    grunt.loadNpmTasks('grunt-contrib-cssmin');
13
+    grunt.loadNpmTasks('grunt-contrib-less');
14
+
15
+    var path = require('path');
16
+
17
+    grunt.initConfig({
18
+        globals: {
19
+            releasePath: 'build/release/camotion',
20
+            appFolder: 'camotion',
21
+            staticFiles: [
22
+                'views/**/*.html',
23
+                'index.html',
24
+                'img/**',
25
+                'fonts/**'
26
+            ]
27
+        },
28
+        useminPrepare: {
29
+            release: '<%= globals.appFolder %>/index.html',
30
+            options: {
31
+                flow: {
32
+                    release: {
33
+                        steps: {
34
+                            'js': [
35
+                                'concat',
36
+                                {
37
+                                    name: 'uglify',
38
+                                    createConfig: function (context, block) {
39
+                                        var cfg = {files: []},
40
+                                            filesDef = {};
41
+
42
+
43
+                                        filesDef.dest = path.join('<%= globals.releasePath %>', block.dest);
44
+                                        filesDef.src = [];
45
+                                        context.inFiles.forEach(function (inFile) {
46
+                                            filesDef.src.push(path.join(context.inDir, inFile));
47
+                                        });
48
+
49
+                                        cfg.files.push(filesDef);
50
+                                        return cfg;
51
+                                    }
52
+                                }
53
+                            ],
54
+                            'css': ['concat',
55
+                                {
56
+                                    name: 'cssmin',
57
+                                    createConfig: function (context, block) {
58
+                                        var cfg = {files: []},
59
+                                            filesDef = {};
60
+
61
+
62
+                                        filesDef.dest = path.join('<%= globals.releasePath %>', block.dest);
63
+                                        filesDef.src = [];
64
+                                        context.inFiles.forEach(function (inFile) {
65
+                                            filesDef.src.push(path.join(context.inDir, inFile));
66
+                                        });
67
+
68
+                                        cfg.files.push(filesDef);
69
+                                        return cfg;
70
+                                    }
71
+                                }],
72
+                            'less': [
73
+                                {
74
+                                    name: 'less',
75
+                                    createConfig: function (context, block) {
76
+                                        var cfg = {files: []},
77
+                                            filesDef = {};
78
+
79
+                                        context.options.generated.options = {
80
+                                            cleancss: true
81
+                                        };
82
+
83
+                                        filesDef.dest = path.join('<%= globals.releasePath %>', block.dest);
84
+                                        filesDef.src = [];
85
+                                        context.inFiles.forEach(function (inFile) {
86
+                                            filesDef.src.push(path.join(context.inDir, inFile));
87
+                                        });
88
+
89
+                                        cfg.files.push(filesDef);
90
+                                        return cfg;
91
+                                    }
92
+                                }
93
+                            ]
94
+                        },
95
+                        post: {
96
+
97
+                        }
98
+                    }
99
+                }
100
+            }
101
+        },
102
+        usemin: {
103
+            html: '<%= globals.releasePath %>/index.html',
104
+            options: {
105
+                blockReplacements: {
106
+                    less: function (block) {
107
+                        return '<link rel=\"stylesheet\" href=\"' + block.dest + '\"/>';
108
+                    }
109
+                }
110
+            }
111
+        },
112
+        copy: {
113
+            release: {
114
+                files: [
115
+                    {
116
+                        expand: true,
117
+                        cwd:'<%= globals.appFolder %>/',
118
+                        src: ['<%= globals.staticFiles %>'],
119
+                        dest: '<%= globals.releasePath %>'
120
+                    },
121
+                    {
122
+                        expand: true,
123
+                        cwd:'<%= globals.appFolder %>/../bower_components/flat-ui/dist/fonts/',
124
+                        src: ['**'],
125
+                        dest: '<%= globals.releasePath %>/fonts/'
126
+                    }
127
+                ]
128
+            }
129
+        },
130
+        clean: {
131
+            release: ['<%= globals.releasePath %>/*']
132
+        }
133
+    });
134
+    grunt.registerTask('release', [
135
+        'clean:release',
136
+        'useminPrepare:release',
137
+        'concat:generated',
138
+        'uglify:generated',
139
+        'copy:release',
140
+        'cssmin:generated',
141
+        'less:generated',
142
+        'usemin'
143
+    ]);
144
+
145
+
146
+};

+ 38
- 0
Gruntfile_global.js View File

@@ -0,0 +1,38 @@
1
+/**
2
+ * Created by robin on 11/10/15.
3
+ */
4
+
5
+module.exports = function(grunt) {
6
+
7
+    grunt.loadNpmTasks('grunt-contrib-copy');
8
+
9
+    var path = require('path');
10
+
11
+    grunt.initConfig({
12
+        globals: {
13
+            releasePath: 'build/release',
14
+            appFolder: '.',
15
+            staticFiles: [
16
+                'favicon.ico',
17
+                'index.html'
18
+            ]
19
+        },
20
+        copy: {
21
+            release: {
22
+                files: [
23
+                    {
24
+                        expand: true,
25
+                        cwd:'<%= globals.appFolder %>/',
26
+                        src: ['<%= globals.staticFiles %>'],
27
+                        dest: '<%= globals.releasePath %>'
28
+                    }
29
+                ]
30
+            }
31
+        }
32
+    });
33
+    grunt.registerTask('release', [
34
+        'copy:release'
35
+    ]);
36
+
37
+
38
+};

+ 37
- 0
Gruntfile_luticate.js View File

@@ -0,0 +1,37 @@
1
+/**
2
+ * Created by robin on 11/10/15.
3
+ */
4
+
5
+module.exports = function(grunt) {
6
+
7
+    grunt.loadNpmTasks('grunt-contrib-copy');
8
+
9
+    var path = require('path');
10
+
11
+    grunt.initConfig({
12
+        globals: {
13
+            releasePath: 'build/release/luticate',
14
+            appFolder: 'luticate',
15
+            staticFiles: [
16
+                '**'
17
+            ]
18
+        },
19
+        copy: {
20
+            release: {
21
+                files: [
22
+                    {
23
+                        expand: true,
24
+                        cwd:'<%= globals.appFolder %>/',
25
+                        src: ['<%= globals.staticFiles %>'],
26
+                        dest: '<%= globals.releasePath %>'
27
+                    }
28
+                ]
29
+            }
30
+        }
31
+    });
32
+    grunt.registerTask('release', [
33
+        'copy:release'
34
+    ]);
35
+
36
+
37
+};

camotion/controllers/modals/camandexec.controller.js → camotion/controllers/modals/commandexec.controller.js View File


+ 1
- 1
camotion/index.html View File

@@ -52,7 +52,7 @@
52 52
     <script src="controllers/commands.controller.js"></script>
53 53
 
54 54
     <!-- Modal Controller -->
55
-    <script src="controllers/modals/camandexec.controller.js"></script>
55
+    <script src="controllers/modals/commandexec.controller.js"></script>
56 56
 
57 57
     <!-- SDK -->
58 58
     <script src="../sdk/sdk.js"></script>

+ 3
- 3
package.json View File

@@ -7,12 +7,12 @@
7 7
   "devDependencies": {
8 8
     "grunt": "~0.4.5",
9 9
     "grunt-contrib-clean": "~0.6.0",
10
-    "grunt-usemin": "~3.1.1",
11 10
     "grunt-contrib-concat": "~0.5.1",
12
-    "grunt-contrib-uglify": "~0.10.0",
13 11
     "grunt-contrib-copy": "~0.8.2",
14 12
     "grunt-contrib-cssmin": "~0.14.0",
15
-    "grunt-contrib-less": "~1.1.0"
13
+    "grunt-contrib-less": "~1.1.0",
14
+    "grunt-contrib-uglify": "~0.10.0",
15
+    "grunt-usemin": "~3.1.1"
16 16
   },
17 17
   "scripts": {
18 18
     "test": "echo \"Error: no test specified\" && exit 1"

Loading…
Cancel
Save