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