##// END OF EJS Templates
grunt: do not use crisper...
ergo -
r3156:6bd054a4 default
parent child Browse files
Show More
@@ -1,15 +1,15 b''
1 1 var gruntConfig = require('./grunt_config.json');
2 2
3 3 module.exports = function(grunt) {
4 4 grunt.initConfig(gruntConfig);
5 5
6 6 grunt.loadNpmTasks('grunt-contrib-less');
7 7 grunt.loadNpmTasks('grunt-contrib-concat');
8 8 grunt.loadNpmTasks('grunt-contrib-watch');
9 9 grunt.loadNpmTasks('grunt-contrib-jshint');
10 10 grunt.loadNpmTasks('grunt-vulcanize');
11 11 grunt.loadNpmTasks('grunt-crisper');
12 12 grunt.loadNpmTasks('grunt-contrib-copy');
13 13
14 grunt.registerTask('default', ['less:production', 'less:components', 'concat:polymercss', 'copy', 'concat:dist', 'vulcanize', 'crisper']);
14 grunt.registerTask('default', ['less:production', 'less:components', 'concat:polymercss', 'copy', 'concat:dist', 'vulcanize']);
15 15 };
@@ -1,200 +1,200 b''
1 1 {
2 2 "dirs": {
3 3 "css": {
4 4 "src":"rhodecode/public/css",
5 5 "dest":"rhodecode/public/css"
6 6 },
7 7 "js": {
8 8 "src": "rhodecode/public/js/src",
9 9 "src_rc": "rhodecode/public/js/rhodecode",
10 10 "dest": "rhodecode/public/js",
11 11 "bower": "bower_components",
12 12 "node_modules": "node_modules"
13 13 }
14 14 },
15 15 "copy": {
16 16 "main": {
17 17 "expand": true,
18 18 "cwd": "bower_components",
19 "src": "webcomponentsjs/webcomponents-lite.js",
19 "src": "webcomponentsjs/webcomponents*.*",
20 20 "dest": "<%= dirs.js.dest %>/vendors"
21 21 }
22 22 },
23 23 "concat": {
24 24 "polymercss": {
25 25 "src": [
26 26 "<%= dirs.js.src %>/components/root-styles-prefix.html",
27 27 "<%= dirs.css.src %>/style-polymer.css",
28 28 "<%= dirs.js.src %>/components/root-styles-suffix.html"
29 29 ],
30 30 "dest": "<%= dirs.js.dest %>/src/components/root-styles.gen.html",
31 31 "nonull": true
32 32 },
33 33 "dist": {
34 34 "src": [
35 35 "<%= dirs.js.node_modules %>/jquery/dist/jquery.min.js",
36 36 "<%= dirs.js.node_modules %>/mousetrap/mousetrap.min.js",
37 37 "<%= dirs.js.node_modules %>/moment/min/moment.min.js",
38 38 "<%= dirs.js.node_modules %>/clipboard/dist/clipboard.min.js",
39 39 "<%= dirs.js.node_modules %>/favico.js/favico-0.3.10.min.js",
40 40 "<%= dirs.js.node_modules %>/sticky-sidebar/dist/sticky-sidebar.min.js",
41 41 "<%= dirs.js.node_modules %>/sticky-sidebar/dist/jquery.sticky-sidebar.min.js",
42 42 "<%= dirs.js.node_modules %>/waypoints/lib/noframework.waypoints.min.js",
43 43 "<%= dirs.js.node_modules %>/waypoints/lib/jquery.waypoints.min.js",
44 44 "<%= dirs.js.node_modules %>/appenlight-client/appenlight-client.min.js",
45 45 "<%= dirs.js.src %>/logging.js",
46 46 "<%= dirs.js.src %>/bootstrap.js",
47 47 "<%= dirs.js.src %>/i18n_utils.js",
48 48 "<%= dirs.js.src %>/deform.js",
49 49 "<%= dirs.js.src %>/ejs.js",
50 50 "<%= dirs.js.src %>/ejs_templates/utils.js",
51 51 "<%= dirs.js.src %>/plugins/jquery.pjax.js",
52 52 "<%= dirs.js.src %>/plugins/jquery.dataTables.js",
53 53 "<%= dirs.js.src %>/plugins/flavoured_checkbox.js",
54 54 "<%= dirs.js.src %>/plugins/jquery.auto-grow-input.js",
55 55 "<%= dirs.js.src %>/plugins/jquery.autocomplete.js",
56 56 "<%= dirs.js.src %>/plugins/jquery.debounce.js",
57 57 "<%= dirs.js.src %>/plugins/jquery.mark.js",
58 58 "<%= dirs.js.src %>/plugins/jquery.timeago.js",
59 59 "<%= dirs.js.src %>/plugins/jquery.timeago-extension.js",
60 60 "<%= dirs.js.src %>/select2/select2.js",
61 61 "<%= dirs.js.src %>/codemirror/codemirror.js",
62 62 "<%= dirs.js.src %>/codemirror/codemirror_loadmode.js",
63 63 "<%= dirs.js.src %>/codemirror/codemirror_hint.js",
64 64 "<%= dirs.js.src %>/codemirror/codemirror_overlay.js",
65 65 "<%= dirs.js.src %>/codemirror/codemirror_placeholder.js",
66 66 "<%= dirs.js.src %>/codemirror/codemirror_simplemode.js",
67 67 "<%= dirs.js.dest %>/mode/meta.js",
68 68 "<%= dirs.js.dest %>/mode/meta_ext.js",
69 69 "<%= dirs.js.src_rc %>/i18n/select2/translations.js",
70 70 "<%= dirs.js.src %>/rhodecode/utils/array.js",
71 71 "<%= dirs.js.src %>/rhodecode/utils/string.js",
72 72 "<%= dirs.js.src %>/rhodecode/utils/pyroutes.js",
73 73 "<%= dirs.js.src %>/rhodecode/utils/ajax.js",
74 74 "<%= dirs.js.src %>/rhodecode/utils/autocomplete.js",
75 75 "<%= dirs.js.src %>/rhodecode/utils/colorgenerator.js",
76 76 "<%= dirs.js.src %>/rhodecode/utils/ie.js",
77 77 "<%= dirs.js.src %>/rhodecode/utils/os.js",
78 78 "<%= dirs.js.src %>/rhodecode/utils/topics.js",
79 79 "<%= dirs.js.src %>/rhodecode/init.js",
80 80 "<%= dirs.js.src %>/rhodecode/changelog.js",
81 81 "<%= dirs.js.src %>/rhodecode/codemirror.js",
82 82 "<%= dirs.js.src %>/rhodecode/comments.js",
83 83 "<%= dirs.js.src %>/rhodecode/constants.js",
84 84 "<%= dirs.js.src %>/rhodecode/files.js",
85 85 "<%= dirs.js.src %>/rhodecode/followers.js",
86 86 "<%= dirs.js.src %>/rhodecode/menus.js",
87 87 "<%= dirs.js.src %>/rhodecode/notifications.js",
88 88 "<%= dirs.js.src %>/rhodecode/permissions.js",
89 89 "<%= dirs.js.src %>/rhodecode/pjax.js",
90 90 "<%= dirs.js.src %>/rhodecode/pullrequests.js",
91 91 "<%= dirs.js.src %>/rhodecode/settings.js",
92 92 "<%= dirs.js.src %>/rhodecode/select2_widgets.js",
93 93 "<%= dirs.js.src %>/rhodecode/tooltips.js",
94 94 "<%= dirs.js.src %>/rhodecode/users.js",
95 95 "<%= dirs.js.src %>/rhodecode/appenlight.js",
96 96 "<%= dirs.js.src %>/rhodecode.js"
97 97 ],
98 98 "dest": "<%= dirs.js.dest %>/scripts.js",
99 99 "nonull": true
100 100 }
101 101 },
102 102 "crisper": {
103 103 "dist": {
104 104 "options": {
105 105 "cleanup": false,
106 106 "onlySplit": true
107 107 },
108 108 "src": "<%= dirs.js.dest %>/rhodecode-components.html",
109 109 "dest": "<%= dirs.js.dest %>/rhodecode-components.js"
110 110 }
111 111 },
112 112 "less": {
113 113 "development": {
114 114 "options": {
115 115 "compress": false,
116 116 "yuicompress": false,
117 117 "optimization": 0
118 118 },
119 119 "files": {
120 120 "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
121 121 "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less"
122 122 }
123 123 },
124 124 "production": {
125 125 "options": {
126 126 "compress": true,
127 127 "yuicompress": true,
128 128 "optimization": 2
129 129 },
130 130 "files": {
131 131 "<%= dirs.css.dest %>/style.css": "<%= dirs.css.src %>/main.less",
132 132 "<%= dirs.css.dest %>/style-polymer.css": "<%= dirs.css.src %>/polymer.less"
133 133 }
134 134 },
135 135 "components": {
136 136 "files": [
137 137 {
138 138 "cwd": "<%= dirs.js.src %>/components/",
139 139 "dest": "<%= dirs.js.src %>/components/",
140 140 "src": [
141 141 "**/*.less"
142 142 ],
143 143 "expand": true,
144 144 "ext": ".css"
145 145 }
146 146 ]
147 147 }
148 148 },
149 149 "watch": {
150 150 "less": {
151 151 "files": [
152 152 "<%= dirs.css.src %>/**/*.less",
153 153 "<%= dirs.js.src %>/components/**/*.less"
154 154 ],
155 155 "tasks": [
156 156 "less:development",
157 157 "less:components",
158 158 "concat:polymercss",
159 159 "vulcanize",
160 160 "crisper",
161 161 "concat:dist"
162 162 ]
163 163 },
164 164 "js": {
165 165 "files": [
166 166 "!<%= dirs.js.src %>/components/root-styles.gen.html",
167 167 "<%= dirs.js.src %>/**/*.js",
168 168 "<%= dirs.js.src %>/components/**/*.html"
169 169 ],
170 170 "tasks": [
171 171 "less:components",
172 172 "concat:polymercss",
173 173 "vulcanize",
174 174 "crisper",
175 175 "concat:dist"
176 176 ]
177 177 }
178 178 },
179 179 "jshint": {
180 180 "rhodecode": {
181 181 "src": "<%= dirs.js.src %>/rhodecode/**/*.js",
182 182 "options": {
183 183 "jshintrc": ".jshintrc"
184 184 }
185 185 }
186 186 },
187 187 "vulcanize": {
188 188 "default": {
189 189 "options": {
190 190 "abspath": "",
191 191 "inlineScripts": true,
192 192 "inlineCss": true,
193 193 "stripComments": true
194 194 },
195 195 "files": {
196 196 "<%= dirs.js.dest %>/rhodecode-components.html": "<%= dirs.js.src %>/components/shared-components.html"
197 197 }
198 198 }
199 199 }
200 200 }
@@ -1,9 +1,8 b''
1 1 <!-- required for stamped out templates that might use common elements -->
2 <link rel="import" href="rhodecode-legacy-js/rhodecode-legacy-js.html">
3 2 <link rel="import" href="../../../../../bower_components/iron-ajax/iron-ajax.html">
4 3 <link rel="import" href="shared-styles.html">
5 4 <link rel="import" href="channelstream-connection/channelstream-connection.html">
6 5 <link rel="import" href="rhodecode-toast/rhodecode-toast.html">
7 6 <link rel="import" href="rhodecode-toggle/rhodecode-toggle.html">
8 7 <link rel="import" href="rhodecode-unsafe-html/rhodecode-unsafe-html.html">
9 8 <link rel="import" href="rhodecode-app/rhodecode-app.html">
@@ -1,162 +1,162 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <!DOCTYPE html>
3 3
4 4 <%
5 5 c.template_context['repo_name'] = getattr(c, 'repo_name', '')
6 6 go_import_header = ''
7 7 if hasattr(c, 'rhodecode_db_repo'):
8 8 c.template_context['repo_type'] = c.rhodecode_db_repo.repo_type
9 9 c.template_context['repo_landing_commit'] = c.rhodecode_db_repo.landing_rev[1]
10 10
11 11 if getattr(c, 'repo_group', None):
12 12 c.template_context['repo_group_id'] = c.repo_group.group_id
13 13
14 14 if getattr(c, 'rhodecode_user', None) and c.rhodecode_user.user_id:
15 15 c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username
16 16 c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email
17 17 c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True)
18 18 c.template_context['rhodecode_user']['first_name'] = c.rhodecode_user.first_name
19 19 c.template_context['rhodecode_user']['last_name'] = c.rhodecode_user.last_name
20 20
21 21 c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer')
22 22 c.template_context['default_user'] = {
23 23 'username': h.DEFAULT_USER,
24 24 'user_id': 1
25 25 }
26 26
27 27 %>
28 28 <html xmlns="http://www.w3.org/1999/xhtml">
29 29 <head>
30 30 <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-lite.js', ver=c.rhodecode_version_hash)}"></script>
31 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}">
32 31 <title>${self.title()}</title>
33 32 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
34 33
35 34 ${h.go_import_header(request, getattr(c, 'rhodecode_db_repo', None))}
36 35
37 36 % if 'safari' in (request.user_agent or '').lower():
38 37 <meta name="referrer" content="origin">
39 38 % else:
40 39 <meta name="referrer" content="origin-when-cross-origin">
41 40 % endif
42 41
43 42 <%def name="robots()">
44 43 <meta name="robots" content="index, nofollow"/>
45 44 </%def>
46 45 ${self.robots()}
47 46 <link rel="icon" href="${h.asset('images/favicon.ico', ver=c.rhodecode_version_hash)}" sizes="16x16 32x32" type="image/png" />
48 47
49 48 ## CSS definitions
50 49 <%def name="css()">
51 50 <link rel="stylesheet" type="text/css" href="${h.asset('css/style.css', ver=c.rhodecode_version_hash)}" media="screen"/>
52 51 <!--[if lt IE 9]>
53 52 <link rel="stylesheet" type="text/css" href="${h.asset('css/ie.css', ver=c.rhodecode_version_hash)}" media="screen"/>
54 53 <![endif]-->
55 54 ## EXTRA FOR CSS
56 55 ${self.css_extra()}
57 56 </%def>
58 57 ## CSS EXTRA - optionally inject some extra CSS stuff needed for specific websites
59 58 <%def name="css_extra()">
60 59 </%def>
61 60
62 61 ${self.css()}
63 62
64 63 ## JAVASCRIPT
65 64 <%def name="js()">
66 65
67 66 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
68 67 <script type="text/javascript">
69 68 // register templateContext to pass template variables to JS
70 69 var templateContext = ${h.json.dumps(c.template_context)|n};
71 70
72 71 var APPLICATION_URL = "${h.route_path('home').rstrip('/')}";
73 72 var APPLICATION_PLUGINS = [];
74 73 var ASSET_URL = "${h.asset('')}";
75 74 var DEFAULT_RENDERER = "${h.get_visual_attr(c, 'default_renderer')}";
76 75 var CSRF_TOKEN = "${getattr(c, 'csrf_token', '')}";
77 76
78 77 var APPENLIGHT = {
79 78 enabled: ${'true' if getattr(c, 'appenlight_enabled', False) else 'false'},
80 79 key: '${getattr(c, "appenlight_api_public_key", "")}',
81 80 % if getattr(c, 'appenlight_server_url', None):
82 81 serverUrl: '${getattr(c, "appenlight_server_url", "")}',
83 82 % endif
84 83 requestInfo: {
85 84 % if getattr(c, 'rhodecode_user', None):
86 85 ip: '${c.rhodecode_user.ip_addr}',
87 86 username: '${c.rhodecode_user.username}'
88 87 % endif
89 88 },
90 89 tags: {
91 90 rhodecode_version: '${c.rhodecode_version}',
92 91 rhodecode_edition: '${c.rhodecode_edition}'
93 92 }
94 93 };
95 94
96 95 </script>
97 96 <%include file="/base/plugins_base.mako"/>
98 97 <!--[if lt IE 9]>
99 98 <script language="javascript" type="text/javascript" src="${h.asset('js/src/excanvas.min.js')}"></script>
100 99 <![endif]-->
101 100 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
102 101 <script> var alertMessagePayloads = ${h.flash.json_alerts(request=request)|n}; </script>
103 102 ## avoide escaping the %N
104 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode-components.js', ver=c.rhodecode_version_hash)}"></script>
103 <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
104 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}">
105 105 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
106 106
107 107
108 108 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
109 109 ${self.js_extra()}
110 110
111 111 <script type="text/javascript">
112 112 Rhodecode = (function() {
113 113 function _Rhodecode() {
114 114 this.comments = new CommentsController();
115 115 }
116 116 return new _Rhodecode();
117 117 })();
118 118
119 119 $(document).ready(function(){
120 120 show_more_event();
121 121 timeagoActivate();
122 122 clipboardActivate();
123 123 })
124 124 </script>
125 125
126 126 </%def>
127 127
128 128 ## JAVASCRIPT EXTRA - optionally inject some extra JS for specificed templates
129 129 <%def name="js_extra()"></%def>
130 130 ${self.js()}
131 131
132 132 <%def name="head_extra()"></%def>
133 133 ${self.head_extra()}
134 134 ## extra stuff
135 135 %if c.pre_code:
136 136 ${c.pre_code|n}
137 137 %endif
138 138 </head>
139 139 <body id="body">
140 140 <noscript>
141 141 <div class="noscript-error">
142 142 ${_('Please enable JavaScript to use RhodeCode Enterprise')}
143 143 </div>
144 144 </noscript>
145 145 ## IE hacks
146 146 <!--[if IE 7]>
147 147 <script>$(document.body).addClass('ie7')</script>
148 148 <![endif]-->
149 149 <!--[if IE 8]>
150 150 <script>$(document.body).addClass('ie8')</script>
151 151 <![endif]-->
152 152 <!--[if IE 9]>
153 153 <script>$(document.body).addClass('ie9')</script>
154 154 <![endif]-->
155 155
156 156 ${next.body()}
157 157 %if c.post_code:
158 158 ${c.post_code|n}
159 159 %endif
160 160 <rhodecode-app></rhodecode-app>
161 161 </body>
162 162 </html>
General Comments 0
You need to be logged in to leave comments. Login now