##// END OF EJS Templates
cleanup: remove duplicate js dependancy
dan -
r49:b29ec555 default
parent child Browse files
Show More
@@ -1,139 +1,138 b''
1 module.exports = function(grunt) {
1 module.exports = function(grunt) {
2 grunt.initConfig({
2 grunt.initConfig({
3
3
4 dirs: {
4 dirs: {
5 css: "rhodecode/public/css",
5 css: "rhodecode/public/css",
6 js: {
6 js: {
7 "src": "rhodecode/public/js/src",
7 "src": "rhodecode/public/js/src",
8 "dest": "rhodecode/public/js"
8 "dest": "rhodecode/public/js"
9 }
9 }
10 },
10 },
11
11
12 concat: {
12 concat: {
13 dist: {
13 dist: {
14 src: [
14 src: [
15 // Base libraries
15 // Base libraries
16 '<%= dirs.js.src %>/jquery-1.11.1.min.js',
16 '<%= dirs.js.src %>/jquery-1.11.1.min.js',
17 '<%= dirs.js.src %>/logging.js',
17 '<%= dirs.js.src %>/logging.js',
18 '<%= dirs.js.src %>/bootstrap.js',
18 '<%= dirs.js.src %>/bootstrap.js',
19 '<%= dirs.js.src %>/mousetrap.js',
19 '<%= dirs.js.src %>/mousetrap.js',
20 '<%= dirs.js.src %>/moment.js',
20 '<%= dirs.js.src %>/moment.js',
21 '<%= dirs.js.src %>/moment.js',
22 '<%= dirs.js.src %>/appenlight-client-0.4.1.min.js',
21 '<%= dirs.js.src %>/appenlight-client-0.4.1.min.js',
23
22
24 // Plugins
23 // Plugins
25 '<%= dirs.js.src %>/plugins/jquery.pjax.js',
24 '<%= dirs.js.src %>/plugins/jquery.pjax.js',
26 '<%= dirs.js.src %>/plugins/jquery.dataTables.js',
25 '<%= dirs.js.src %>/plugins/jquery.dataTables.js',
27 '<%= dirs.js.src %>/plugins/flavoured_checkbox.js',
26 '<%= dirs.js.src %>/plugins/flavoured_checkbox.js',
28 '<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js',
27 '<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js',
29 '<%= dirs.js.src %>/plugins/jquery.autocomplete.js',
28 '<%= dirs.js.src %>/plugins/jquery.autocomplete.js',
30 '<%= dirs.js.src %>/plugins/jquery.debounce.js',
29 '<%= dirs.js.src %>/plugins/jquery.debounce.js',
31 '<%= dirs.js.src %>/plugins/jquery.mark.js',
30 '<%= dirs.js.src %>/plugins/jquery.mark.js',
32 '<%= dirs.js.src %>/plugins/jquery.timeago.js',
31 '<%= dirs.js.src %>/plugins/jquery.timeago.js',
33 '<%= dirs.js.src %>/plugins/jquery.timeago-extension.js',
32 '<%= dirs.js.src %>/plugins/jquery.timeago-extension.js',
34
33
35 // Select2
34 // Select2
36 '<%= dirs.js.src %>/select2/select2.js',
35 '<%= dirs.js.src %>/select2/select2.js',
37
36
38 // Code-mirror
37 // Code-mirror
39 '<%= dirs.js.src %>/codemirror/codemirror.js',
38 '<%= dirs.js.src %>/codemirror/codemirror.js',
40 '<%= dirs.js.src %>/codemirror/codemirror_loadmode.js',
39 '<%= dirs.js.src %>/codemirror/codemirror_loadmode.js',
41 '<%= dirs.js.src %>/codemirror/codemirror_hint.js',
40 '<%= dirs.js.src %>/codemirror/codemirror_hint.js',
42 '<%= dirs.js.src %>/codemirror/codemirror_overlay.js',
41 '<%= dirs.js.src %>/codemirror/codemirror_overlay.js',
43 '<%= dirs.js.src %>/codemirror/codemirror_placeholder.js',
42 '<%= dirs.js.src %>/codemirror/codemirror_placeholder.js',
44 // TODO: mikhail: this is an exception. Since the code mirror modes
43 // TODO: mikhail: this is an exception. Since the code mirror modes
45 // are loaded "on the fly", we need to keep them in a public folder
44 // are loaded "on the fly", we need to keep them in a public folder
46 '<%= dirs.js.dest %>/mode/meta.js',
45 '<%= dirs.js.dest %>/mode/meta.js',
47 '<%= dirs.js.dest %>/mode/meta_ext.js',
46 '<%= dirs.js.dest %>/mode/meta_ext.js',
48 '<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js',
47 '<%= dirs.js.dest %>/rhodecode/i18n/select2/translations.js',
49
48
50 // Rhodecode utilities
49 // Rhodecode utilities
51 '<%= dirs.js.src %>/rhodecode/utils/array.js',
50 '<%= dirs.js.src %>/rhodecode/utils/array.js',
52 '<%= dirs.js.src %>/rhodecode/utils/string.js',
51 '<%= dirs.js.src %>/rhodecode/utils/string.js',
53 '<%= dirs.js.src %>/rhodecode/utils/pyroutes.js',
52 '<%= dirs.js.src %>/rhodecode/utils/pyroutes.js',
54 '<%= dirs.js.src %>/rhodecode/utils/ajax.js',
53 '<%= dirs.js.src %>/rhodecode/utils/ajax.js',
55 '<%= dirs.js.src %>/rhodecode/utils/autocomplete.js',
54 '<%= dirs.js.src %>/rhodecode/utils/autocomplete.js',
56 '<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js',
55 '<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js',
57 '<%= dirs.js.src %>/rhodecode/utils/ie.js',
56 '<%= dirs.js.src %>/rhodecode/utils/ie.js',
58 '<%= dirs.js.src %>/rhodecode/utils/os.js',
57 '<%= dirs.js.src %>/rhodecode/utils/os.js',
59
58
60 // Rhodecode widgets
59 // Rhodecode widgets
61 '<%= dirs.js.src %>/rhodecode/widgets/multiselect.js',
60 '<%= dirs.js.src %>/rhodecode/widgets/multiselect.js',
62
61
63 // Rhodecode components
62 // Rhodecode components
64 '<%= dirs.js.src %>/rhodecode/pyroutes.js',
63 '<%= dirs.js.src %>/rhodecode/pyroutes.js',
65 '<%= dirs.js.src %>/rhodecode/codemirror.js',
64 '<%= dirs.js.src %>/rhodecode/codemirror.js',
66 '<%= dirs.js.src %>/rhodecode/comments.js',
65 '<%= dirs.js.src %>/rhodecode/comments.js',
67 '<%= dirs.js.src %>/rhodecode/constants.js',
66 '<%= dirs.js.src %>/rhodecode/constants.js',
68 '<%= dirs.js.src %>/rhodecode/files.js',
67 '<%= dirs.js.src %>/rhodecode/files.js',
69 '<%= dirs.js.src %>/rhodecode/followers.js',
68 '<%= dirs.js.src %>/rhodecode/followers.js',
70 '<%= dirs.js.src %>/rhodecode/menus.js',
69 '<%= dirs.js.src %>/rhodecode/menus.js',
71 '<%= dirs.js.src %>/rhodecode/notifications.js',
70 '<%= dirs.js.src %>/rhodecode/notifications.js',
72 '<%= dirs.js.src %>/rhodecode/permissions.js',
71 '<%= dirs.js.src %>/rhodecode/permissions.js',
73 '<%= dirs.js.src %>/rhodecode/pjax.js',
72 '<%= dirs.js.src %>/rhodecode/pjax.js',
74 '<%= dirs.js.src %>/rhodecode/pullrequests.js',
73 '<%= dirs.js.src %>/rhodecode/pullrequests.js',
75 '<%= dirs.js.src %>/rhodecode/settings.js',
74 '<%= dirs.js.src %>/rhodecode/settings.js',
76 '<%= dirs.js.src %>/rhodecode/select2_widgets.js',
75 '<%= dirs.js.src %>/rhodecode/select2_widgets.js',
77 '<%= dirs.js.src %>/rhodecode/tooltips.js',
76 '<%= dirs.js.src %>/rhodecode/tooltips.js',
78 '<%= dirs.js.src %>/rhodecode/users.js',
77 '<%= dirs.js.src %>/rhodecode/users.js',
79 '<%= dirs.js.src %>/rhodecode/appenlight.js',
78 '<%= dirs.js.src %>/rhodecode/appenlight.js',
80
79
81 // Rhodecode main module
80 // Rhodecode main module
82 '<%= dirs.js.src %>/rhodecode.js'
81 '<%= dirs.js.src %>/rhodecode.js'
83 ],
82 ],
84 dest: '<%= dirs.js.dest %>/scripts.js',
83 dest: '<%= dirs.js.dest %>/scripts.js',
85 nonull: true
84 nonull: true
86 }
85 }
87 },
86 },
88
87
89 less: {
88 less: {
90 development: {
89 development: {
91 options: {
90 options: {
92 compress: false,
91 compress: false,
93 yuicompress: false,
92 yuicompress: false,
94 optimization: 0
93 optimization: 0
95 },
94 },
96 files: {
95 files: {
97 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
96 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
98 }
97 }
99 },
98 },
100 production: {
99 production: {
101 options: {
100 options: {
102 compress: true,
101 compress: true,
103 yuicompress: true,
102 yuicompress: true,
104 optimization: 2
103 optimization: 2
105 },
104 },
106 files: {
105 files: {
107 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
106 "<%= dirs.css %>/style.css": "<%= dirs.css %>/main.less"
108 }
107 }
109 }
108 }
110 },
109 },
111
110
112 watch: {
111 watch: {
113 less: {
112 less: {
114 files: ["<%= dirs.css %>/*.less"],
113 files: ["<%= dirs.css %>/*.less"],
115 tasks: ["less:production"]
114 tasks: ["less:production"]
116 },
115 },
117 js: {
116 js: {
118 files: ["<%= dirs.js.src %>/**/*.js"],
117 files: ["<%= dirs.js.src %>/**/*.js"],
119 tasks: ["concat:dist"]
118 tasks: ["concat:dist"]
120 }
119 }
121 },
120 },
122
121
123 jshint: {
122 jshint: {
124 rhodecode: {
123 rhodecode: {
125 src: '<%= dirs.js.src %>/rhodecode/**/*.js',
124 src: '<%= dirs.js.src %>/rhodecode/**/*.js',
126 options: {
125 options: {
127 jshintrc: '.jshintrc'
126 jshintrc: '.jshintrc'
128 }
127 }
129 }
128 }
130 }
129 }
131 });
130 });
132
131
133 grunt.loadNpmTasks('grunt-contrib-less');
132 grunt.loadNpmTasks('grunt-contrib-less');
134 grunt.loadNpmTasks('grunt-contrib-concat');
133 grunt.loadNpmTasks('grunt-contrib-concat');
135 grunt.loadNpmTasks('grunt-contrib-watch');
134 grunt.loadNpmTasks('grunt-contrib-watch');
136 grunt.loadNpmTasks('grunt-contrib-jshint');
135 grunt.loadNpmTasks('grunt-contrib-jshint');
137
136
138 grunt.registerTask('default', ['less:production', 'concat:dist']);
137 grunt.registerTask('default', ['less:production', 'concat:dist']);
139 };
138 };
General Comments 0
You need to be logged in to leave comments. Login now