Pārlūkot izejas kodu

grunt tasks

develop
Robin Thoni 9 gadus atpakaļ
vecāks
revīzija
fbb878dc93
45 mainītis faili ar 277 papildinājumiem un 74 dzēšanām
  1. 2
    1
      .gitignore
  2. 175
    0
      Gruntfile.js
  3. 0
    0
      app.js
  4. 1
    1
      bower.json
  5. 0
    0
      controllers/groups.controller.js
  6. 0
    0
      controllers/home.controller.js
  7. 0
    0
      controllers/login.controller.js
  8. 0
    0
      controllers/modals/groupedit.controller.js
  9. 0
    0
      controllers/modals/grouppermissions.controller.js
  10. 0
    0
      controllers/modals/groupusers.controller.js
  11. 0
    0
      controllers/modals/groupusersadd.controller.js
  12. 0
    0
      controllers/modals/permissionedit.controller.js
  13. 0
    0
      controllers/modals/useredit.controller.js
  14. 0
    0
      controllers/modals/usereffectivepermissions.controller.js
  15. 0
    0
      controllers/modals/userpermissions.controller.js
  16. 0
    0
      controllers/navbar.controller.js
  17. 0
    0
      controllers/permissions.controller.js
  18. 0
    0
      controllers/test.controller.js
  19. 0
    0
      controllers/users.controller.js
  20. 0
    0
      css/app.less
  21. 0
    0
      fonts/glyphicons-halflings-regular.eot
  22. 0
    0
      fonts/glyphicons-halflings-regular.svg
  23. 0
    0
      fonts/glyphicons-halflings-regular.ttf
  24. 0
    0
      fonts/glyphicons-halflings-regular.woff
  25. 0
    0
      fonts/glyphicons-halflings-regular.woff2
  26. 67
    6
      index.html
  27. 0
    66
      luticate/index.html
  28. 32
    0
      package.json
  29. 0
    0
      views/footer.html
  30. 0
    0
      views/groups.html
  31. 0
    0
      views/home.html
  32. 0
    0
      views/login.html
  33. 0
    0
      views/lupickertable.html
  34. 0
    0
      views/modals/groupedit.html
  35. 0
    0
      views/modals/grouppermissions.html
  36. 0
    0
      views/modals/groupusers.html
  37. 0
    0
      views/modals/groupusersadd.html
  38. 0
    0
      views/modals/permissionedit.html
  39. 0
    0
      views/modals/useredit.html
  40. 0
    0
      views/modals/usereffectivepermissions.html
  41. 0
    0
      views/modals/userpermissions.html
  42. 0
    0
      views/navbar.html
  43. 0
    0
      views/permissions.html
  44. 0
    0
      views/test.html
  45. 0
    0
      views/users.html

+ 2
- 1
.gitignore Parādīt failu

@@ -2,4 +2,5 @@ bower_components
2 2
 node_modules
3 3
 .tmp
4 4
 .idea
5
-.DS_Store
5
+.DS_Store
6
+build

+ 175
- 0
Gruntfile.js Parādīt failu

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

luticate/app.js → app.js Parādīt failu


+ 1
- 1
bower.json Parādīt failu

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "name": "luticate",
3
-  "description": "luticate",
3
+  "description": "Luticate front",
4 4
   "version": "0.1.0",
5 5
   "homepage": "",
6 6
   "license": "",

luticate/controllers/groups.controller.js → controllers/groups.controller.js Parādīt failu


luticate/controllers/home.controller.js → controllers/home.controller.js Parādīt failu


luticate/controllers/login.controller.js → controllers/login.controller.js Parādīt failu


luticate/controllers/modals/groupedit.controller.js → controllers/modals/groupedit.controller.js Parādīt failu


luticate/controllers/modals/grouppermissions.controller.js → controllers/modals/grouppermissions.controller.js Parādīt failu


luticate/controllers/modals/groupusers.controller.js → controllers/modals/groupusers.controller.js Parādīt failu


luticate/controllers/modals/groupusersadd.controller.js → controllers/modals/groupusersadd.controller.js Parādīt failu


luticate/controllers/modals/permissionedit.controller.js → controllers/modals/permissionedit.controller.js Parādīt failu


luticate/controllers/modals/useredit.controller.js → controllers/modals/useredit.controller.js Parādīt failu


luticate/controllers/modals/usereffectivepermissions.controller.js → controllers/modals/usereffectivepermissions.controller.js Parādīt failu


luticate/controllers/modals/userpermissions.controller.js → controllers/modals/userpermissions.controller.js Parādīt failu


luticate/controllers/navbar.controller.js → controllers/navbar.controller.js Parādīt failu


luticate/controllers/permissions.controller.js → controllers/permissions.controller.js Parādīt failu


luticate/controllers/test.controller.js → controllers/test.controller.js Parādīt failu


luticate/controllers/users.controller.js → controllers/users.controller.js Parādīt failu


luticate/css/app.less → css/app.less Parādīt failu


luticate/fonts/glyphicons-halflings-regular.eot → fonts/glyphicons-halflings-regular.eot Parādīt failu


luticate/fonts/glyphicons-halflings-regular.svg → fonts/glyphicons-halflings-regular.svg Parādīt failu


luticate/fonts/glyphicons-halflings-regular.ttf → fonts/glyphicons-halflings-regular.ttf Parādīt failu


luticate/fonts/glyphicons-halflings-regular.woff → fonts/glyphicons-halflings-regular.woff Parādīt failu


luticate/fonts/glyphicons-halflings-regular.woff2 → fonts/glyphicons-halflings-regular.woff2 Parādīt failu


+ 67
- 6
index.html Parādīt failu

@@ -1,10 +1,71 @@
1
-<html>
1
+<!doctype html>
2
+<html lang="en" ng-app="luticate">
2 3
 <head>
3
-    <title>Redirection en htm</title>
4
-    <meta http-equiv="refresh" content="0; URL=luticate/">
4
+    <base href="/luticate/">
5
+    <meta charset="utf-8">
6
+    <title>Luticate Back Office</title>
7
+
8
+    <!-- build:css css/css.css -->
9
+    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
10
+    <link rel="stylesheet" href="bower_components/luticate-utils/src/lubusy.css">
11
+    <link rel="stylesheet" href="bower_components/luticate-utils/src/lubasictable.css">
12
+    <link rel="stylesheet" href="bower_components/luticate-utils/src/lupickertable.css">
13
+    <link rel="stylesheet/less" href="css/app.less">
14
+    <!-- endbuild -->
15
+
16
+    <!-- build:js app.js -->
17
+    <!-- bower component -->
18
+    <script src="bower_components/jquery/dist/jquery.js"></script>
19
+    <script src="bower_components/angular/angular.js"></script>
20
+    <script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
21
+    <script src="bower_components/angular-bootstrap/ui-bootstrap.js"></script>
22
+    <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
23
+    <script src="bower_components/angular-local-storage/dist/angular-local-storage.js"></script>
24
+    <script src="bower_components/angular-ui-validate/dist/validate.js"></script>
25
+    <script src="bower_components/bootstrap/js/collapse.js"></script>
26
+    <script src="bower_components/bootstrap/js/transition.js"></script>
27
+    <script src="bower_components/bootstrap/js/dropdown.js"></script>
28
+    <script src="bower_components/less/dist/less-1.7.4.js"></script>
29
+    <script src="bower_components/angular-dialog-service/dist/dialogs.js"></script>
30
+    <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
31
+    <script src="bower_components/luticate-utils/dist/luticate-utils.min.js"></script>
32
+    <script src="bower_components/luticate-auth/dist/luticate-auth.min.js"></script>
33
+
34
+    <!-- scripts -->
35
+    <script src="app.js"></script>
36
+
37
+    <!-- Controller -->
38
+    <script src="controllers/navbar.controller.js"></script>
39
+    <script src="controllers/login.controller.js"></script>
40
+    <script src="controllers/home.controller.js"></script>
41
+    <script src="controllers/users.controller.js"></script>
42
+    <script src="controllers/groups.controller.js"></script>
43
+    <script src="controllers/permissions.controller.js"></script>
44
+    <script src="controllers/test.controller.js"></script>
45
+
46
+    <!-- Modal Controller -->
47
+    <script src="controllers/modals/useredit.controller.js"></script>
48
+    <script src="controllers/modals/groupedit.controller.js"></script>
49
+    <script src="controllers/modals/permissionedit.controller.js"></script>
50
+    <script src="controllers/modals/userpermissions.controller.js"></script>
51
+    <script src="controllers/modals/usereffectivepermissions.controller.js"></script>
52
+    <script src="controllers/modals/groupusersadd.controller.js"></script>
53
+    <script src="controllers/modals/grouppermissions.controller.js"></script>
54
+    <script src="controllers/modals/groupusers.controller.js"></script>
55
+
56
+    <!-- SDK -->
57
+    <script src="sdk/cache.js"></script>
58
+
59
+    <!-- Directives -->
60
+
61
+
62
+    <!-- endbuild -->
5 63
 </head>
64
+<body lu-busy="body">
6 65
 
7
-<body>
8
-</body>
66
+<ng-include src="'views/navbar.html'"></ng-include>
67
+<div ui-view></div>
68
+<ng-include src="'views/footer.html'"></ng-include>
9 69
 
10
-</html>
70
+</body>
71
+</html>

+ 0
- 66
luticate/index.html Parādīt failu

@@ -1,66 +0,0 @@
1
-<!doctype html>
2
-<html lang="en" ng-app="luticate">
3
-<head>
4
-    <base href="/luticate/">
5
-    <meta charset="utf-8">
6
-    <title>Luticate Back Office</title>
7
-
8
-    <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css">
9
-    <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
10
-    <link rel="stylesheet" href="../bower_components/luticate-utils/src/lubusy.css">
11
-    <link rel="stylesheet" href="../bower_components/luticate-utils/src/lubasictable.css">
12
-    <link rel="stylesheet" href="../bower_components/luticate-utils/src/lupickertable.css">
13
-    <link rel="stylesheet/less" href="css/app.less">
14
-    <!-- bower component -->
15
-    <script src="../bower_components/jquery/dist/jquery.js"></script>
16
-    <script src="../bower_components/angular/angular.js"></script>
17
-    <script src="../bower_components/angular-ui-router/release/angular-ui-router.js"></script>
18
-    <script src="../bower_components/angular-bootstrap/ui-bootstrap.js"></script>
19
-    <script src="../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
20
-    <script src="../bower_components/angular-local-storage/dist/angular-local-storage.js"></script>
21
-    <script src="../bower_components/angular-ui-validate/dist/validate.js"></script>
22
-    <script src="../bower_components/bootstrap/js/collapse.js"></script>
23
-    <script src="../bower_components/bootstrap/js/transition.js"></script>
24
-    <script src="../bower_components/bootstrap/js/dropdown.js"></script>
25
-    <script src="../bower_components/less/dist/less-1.7.4.js"></script>
26
-    <script src="../bower_components/angular-dialog-service/dist/dialogs.js"></script>
27
-    <script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>
28
-    <script src="../bower_components/luticate-utils/dist/luticate-utils.min.js"></script>
29
-    <script src="../bower_components/luticate-auth/dist/luticate-auth.min.js"></script>
30
-
31
-    <!-- scripts -->
32
-    <script src="app.js"></script>
33
-
34
-    <!-- Controller -->
35
-    <script src="controllers/navbar.controller.js"></script>
36
-    <script src="controllers/login.controller.js"></script>
37
-    <script src="controllers/home.controller.js"></script>
38
-    <script src="controllers/users.controller.js"></script>
39
-    <script src="controllers/groups.controller.js"></script>
40
-    <script src="controllers/permissions.controller.js"></script>
41
-    <script src="controllers/test.controller.js"></script>
42
-
43
-    <!-- Modal Controller -->
44
-    <script src="controllers/modals/useredit.controller.js"></script>
45
-    <script src="controllers/modals/groupedit.controller.js"></script>
46
-    <script src="controllers/modals/permissionedit.controller.js"></script>
47
-    <script src="controllers/modals/userpermissions.controller.js"></script>
48
-    <script src="controllers/modals/usereffectivepermissions.controller.js"></script>
49
-    <script src="controllers/modals/groupusersadd.controller.js"></script>
50
-    <script src="controllers/modals/grouppermissions.controller.js"></script>
51
-    <script src="controllers/modals/groupusers.controller.js"></script>
52
-
53
-    <!-- SDK -->
54
-    <script src="../sdk/cache.js"></script>
55
-
56
-    <!-- Directives -->
57
-
58
-</head>
59
-<body lu-busy="body">
60
-
61
-<ng-include src="'views/navbar.html'"></ng-include>
62
-<div ui-view></div>
63
-<ng-include src="'views/footer.html'"></ng-include>
64
-
65
-</body>
66
-</html>

+ 32
- 0
package.json Parādīt failu

@@ -0,0 +1,32 @@
1
+{
2
+  "name": "utils",
3
+  "version": "0.1.0",
4
+  "description": "Luticate front",
5
+  "main": "app.js",
6
+  "dependencies": {},
7
+  "devDependencies": {
8
+    "grunt": "~0.4.5",
9
+    "grunt-contrib-uglify": "~0.10.0",
10
+    "grunt-ngmin": "0.0.3",
11
+    "grunt-usemin": "~3.1.1",
12
+    "grunt-filerev": "~2.3.1",
13
+    "grunt-contrib-concat": "~0.5.1",
14
+    "grunt-contrib-cssmin": "~0.14.0",
15
+    "grunt-contrib-clean": "~0.6.0",
16
+    "grunt-ngdocs": "~0.2.9",
17
+    "grunt-contrib-copy": "~0.8.2",
18
+    "grunt-html-build": "~0.5.2",
19
+    "grunt-istanbul-coverage": "~0.1.1",
20
+    "grunt-contrib-jshint": "~0.11.3",
21
+    "grunt-contrib-less": "~1.1.0"
22
+  },
23
+  "scripts": {
24
+    "test": "echo \"Error: no test specified\" && exit 1"
25
+  },
26
+  "repository": {
27
+    "type": "git",
28
+    "url": "git:luticate-front/front"
29
+  },
30
+  "author": "",
31
+  "license": "MIT"
32
+}

luticate/views/footer.html → views/footer.html Parādīt failu


luticate/views/groups.html → views/groups.html Parādīt failu


luticate/views/home.html → views/home.html Parādīt failu


luticate/views/login.html → views/login.html Parādīt failu


luticate/views/lupickertable.html → views/lupickertable.html Parādīt failu


luticate/views/modals/groupedit.html → views/modals/groupedit.html Parādīt failu


luticate/views/modals/grouppermissions.html → views/modals/grouppermissions.html Parādīt failu


luticate/views/modals/groupusers.html → views/modals/groupusers.html Parādīt failu


luticate/views/modals/groupusersadd.html → views/modals/groupusersadd.html Parādīt failu


luticate/views/modals/permissionedit.html → views/modals/permissionedit.html Parādīt failu


luticate/views/modals/useredit.html → views/modals/useredit.html Parādīt failu


luticate/views/modals/usereffectivepermissions.html → views/modals/usereffectivepermissions.html Parādīt failu


luticate/views/modals/userpermissions.html → views/modals/userpermissions.html Parādīt failu


luticate/views/navbar.html → views/navbar.html Parādīt failu


luticate/views/permissions.html → views/permissions.html Parādīt failu


luticate/views/test.html → views/test.html Parādīt failu


luticate/views/users.html → views/users.html Parādīt failu


Notiek ielāde…
Atcelt
Saglabāt