##// END OF EJS Templates
frontend: remuve unused js file
ergo -
r4:e3fa0670
parent child Browse files
Show More
@@ -1,151 +1,150 b''
1 var fs = require('fs');
1 var fs = require('fs');
2 var ini = require('ini');
2 var ini = require('ini');
3 var config = ini.parse(fs.readFileSync('./locations.ini', 'utf-8'))
3 var config = ini.parse(fs.readFileSync('./locations.ini', 'utf-8'))
4 module.exports = function (grunt) {
4 module.exports = function (grunt) {
5
5
6 var grunt_conf_obj = {
6 var grunt_conf_obj = {
7 pkg: grunt.file.readJSON('package.json'),
7 pkg: grunt.file.readJSON('package.json'),
8
8
9 ngtemplates: {
9 ngtemplates: {
10 app: {
10 app: {
11 options: {
11 options: {
12 module: 'appenlight.templates'
12 module: 'appenlight.templates'
13 },
13 },
14 cwd: "src",
14 cwd: "src",
15 src: '**/*.html',
15 src: '**/*.html',
16 dest: 'build/templates.js'
16 dest: 'build/templates.js'
17 }
17 }
18 },
18 },
19
19
20 concat: {
20 concat: {
21 options: {
21 options: {
22 // define a string to put between each file in the concatenated output
22 // define a string to put between each file in the concatenated output
23 separator: '\n;'
23 separator: '\n;'
24 },
24 },
25 base: {
25 base: {
26 src: [
26 src: [
27 "bower_components/underscore/underscore.js",
27 "bower_components/underscore/underscore.js",
28 "bower_components/angular/angular.min.js",
28 "bower_components/angular/angular.min.js",
29 "bower_components/angular-cookies/angular-cookies.min.js",
29 "bower_components/angular-cookies/angular-cookies.min.js",
30 "bower_components/angular-route/angular-route.min.js",
30 "bower_components/angular-route/angular-route.min.js",
31 "bower_components/angular-resource/angular-resource.min.js",
31 "bower_components/angular-resource/angular-resource.min.js",
32 "bower_components/angular-animate/angular-animate.min.js",
32 "bower_components/angular-animate/angular-animate.min.js",
33 "bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js",
33 "bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js",
34 "bower_components/angular-ui-router/release/angular-ui-router.min.js",
34 "bower_components/angular-ui-router/release/angular-ui-router.min.js",
35 "bower_components/angular-toArrayFilter/toArrayFilter.js",
35 "bower_components/angular-toArrayFilter/toArrayFilter.js",
36 "vendors/crel.js",
36 "vendors/crel.js",
37 "bower_components/json-human/src/json.human.js",
37 "bower_components/json-human/src/json.human.js",
38 "bower_components/moment/min/moment.min.js",
38 "bower_components/moment/min/moment.min.js",
39 "bower_components/d3/d3.min.js",
39 "bower_components/d3/d3.min.js",
40 "bower_components/c3/c3.min.js",
40 "bower_components/c3/c3.min.js",
41 "bower_components/angular-smart-table/dist/smart-table.min.js",
41 "bower_components/angular-smart-table/dist/smart-table.min.js",
42 "bower_components/ment.io/dist/mentio.min.js",
42 "bower_components/ment.io/dist/mentio.min.js",
43 "vendors/simple_moment_utc.js",
43 "vendors/simple_moment_utc.js",
44 "vendors/reconnecting-websocket.js",
44 "vendors/reconnecting-websocket.js",
45 ],
45 ],
46 dest: "build/base.js",
46 dest: "build/base.js",
47 nonull: true
47 nonull: true
48 }
48 }
49 ,
49 ,
50 dev: {
50 dev: {
51 src: [
51 src: [
52 "src/utils.js",
52 "src/utils.js",
53 "src/app.js",
53 "src/app.js",
54 "build/templates.js",
54 "build/templates.js",
55 "src/**/*.js",
55 "src/**/*.js",
56 "!src/**/*_test.js"
56 "!src/**/*_test.js"
57 ],
57 ],
58 dest: 'build/app.js',
58 dest: 'build/app.js',
59 nonull: true
59 nonull: true
60 },
60 },
61 dist: {
61 dist: {
62 src: [
62 src: [
63 'build/base.js',
63 'build/base.js',
64 'build/app.js'
64 'build/app.js'
65 ],
65 ],
66 dest: "build/release/js/appenlight.js",
66 dest: "build/release/js/appenlight.js",
67 nonull: true
67 nonull: true
68 },
68 },
69 },
69 },
70 removelogging: {
70 removelogging: {
71 dist: {
71 dist: {
72 src: "build/app.js"
72 src: "build/app.js"
73 }
73 }
74 },
74 },
75 copy: {
75 copy: {
76 css: {
76 css: {
77 files: [
77 files: [
78 // includes files within path and its sub-directories
78 // includes files within path and its sub-directories
79 {
79 {
80 expand: true,
80 expand: true,
81 cwd: 'build/release/css',
81 cwd: 'build/release/css',
82 src: ['front.css'],
82 src: ['front.css'],
83 dest: config.ae_statics_location + '/css'
83 dest: config.ae_statics_location + '/css'
84 },
84 },
85 {
85 {
86 expand: true,
86 expand: true,
87 cwd: 'build/release/css',
87 cwd: 'build/release/css',
88 src: ['front.css'],
88 src: ['front.css'],
89 dest: config.ae_webassets_location + '/appenlight/css'
89 dest: config.ae_webassets_location + '/appenlight/css'
90 }
90 }
91 ]
91 ]
92 },
92 },
93 js: {
93 js: {
94 files: [
94 files: [
95 // includes files within path and its sub-directories
95 // includes files within path and its sub-directories
96 {
96 {
97 expand: true,
97 expand: true,
98 cwd: 'build/release/js',
98 cwd: 'build/release/js',
99 src: ['**'],
99 src: ['**'],
100 dest: config.ae_statics_location + '/js'
100 dest: config.ae_statics_location + '/js'
101 },
101 },
102 {
102 {
103 expand: true,
103 expand: true,
104 cwd: 'build/release/js',
104 cwd: 'build/release/js',
105 src: ['**'],
105 src: ['**'],
106 dest: config.ae_webassets_location + '/appenlight/js'
106 dest: config.ae_webassets_location + '/appenlight/js'
107 }
107 }
108 ]
108 ]
109 }
109 }
110 },
110 },
111 watch: {
111 watch: {
112 dev: {
112 dev: {
113 files: ['<%= concat.dev.src %>', 'src/**/*.html', '!build/*.js'],
113 files: ['<%= concat.dev.src %>', 'src/**/*.html', '!build/*.js'],
114 tasks: ['ngtemplates', 'concat:dev', 'concat:dist', 'copy:js']
114 tasks: ['ngtemplates', 'concat:dev', 'concat:dist', 'copy:js']
115 },
115 },
116 css: {
116 css: {
117 files: ['css/**/*.less', 'css/**/*.css'],
117 files: ['css/**/*.less', 'css/**/*.css'],
118 tasks: ['less', 'copy:css']
118 tasks: ['less', 'copy:css']
119 }
119 }
120 },
120 },
121
121
122 less: {
122 less: {
123 dev: {
123 dev: {
124 files: {
124 files: {
125 "build/release/css/front.css": "css/front_app.less",
125 "build/release/css/front.css": "css/front_app.less"
126 "build/release/css/front_landing.css": "css/front_landing.less"
127 }
126 }
128 }
127 }
129 }
128 }
130
129
131 };
130 };
132
131
133 grunt.initConfig(grunt_conf_obj);
132 grunt.initConfig(grunt_conf_obj);
134
133
135 grunt.loadNpmTasks('grunt-contrib-uglify');
134 grunt.loadNpmTasks('grunt-contrib-uglify');
136 grunt.loadNpmTasks('grunt-contrib-watch');
135 grunt.loadNpmTasks('grunt-contrib-watch');
137 grunt.loadNpmTasks('grunt-contrib-concat');
136 grunt.loadNpmTasks('grunt-contrib-concat');
138 grunt.loadNpmTasks('grunt-bower-concat');
137 grunt.loadNpmTasks('grunt-bower-concat');
139 grunt.loadNpmTasks('grunt-contrib-requirejs');
138 grunt.loadNpmTasks('grunt-contrib-requirejs');
140 grunt.loadNpmTasks('grunt-contrib-copy');
139 grunt.loadNpmTasks('grunt-contrib-copy');
141 grunt.loadNpmTasks("grunt-remove-logging");
140 grunt.loadNpmTasks("grunt-remove-logging");
142 grunt.loadNpmTasks('grunt-angular-templates');
141 grunt.loadNpmTasks('grunt-angular-templates');
143 grunt.loadNpmTasks('grunt-contrib-less');
142 grunt.loadNpmTasks('grunt-contrib-less');
144
143
145
144
146 grunt.registerTask('styles', ['less']);
145 grunt.registerTask('styles', ['less']);
147 grunt.registerTask('test', ['jshint', 'qunit']);
146 grunt.registerTask('test', ['jshint', 'qunit']);
148
147
149 grunt.registerTask('default', ['ngtemplates', 'concat:base', 'concat:dev', 'removelogging', 'concat:dist', 'less', 'copy:js', 'copy:css']);
148 grunt.registerTask('default', ['ngtemplates', 'concat:base', 'concat:dev', 'removelogging', 'concat:dist', 'less', 'copy:js', 'copy:css']);
150
149
151 };
150 };
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now