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