##// END OF EJS Templates
polymer: slim out the styles and change the flow of initialization to avoid race conditions
ergo -
r714:822499e8 default
parent child Browse files
Show More
@@ -43,6 +43,7 b' syntax: regexp'
43 ^rhodecode/public/css/style-polymer.css$
43 ^rhodecode/public/css/style-polymer.css$
44 ^rhodecode/public/js/scripts.js$
44 ^rhodecode/public/js/scripts.js$
45 ^rhodecode/public/js/rhodecode-components.html$
45 ^rhodecode/public/js/rhodecode-components.html$
46 ^rhodecode/public/js/src/components/root-styles.gen.html$
46 ^rhodecode\.db$
47 ^rhodecode\.db$
47 ^rhodecode\.log$
48 ^rhodecode\.log$
48 ^rhodecode_dev\.log$
49 ^rhodecode_dev\.log$
@@ -17,6 +17,16 b' module.exports = function(grunt) {'
17 },
17 },
18 },
18 },
19 concat: {
19 concat: {
20 polymercss:{
21 src: [
22 // Base libraries
23 '<%= dirs.js.src %>/components/root-styles-prefix.html',
24 '<%= dirs.css %>/style-polymer.css',
25 '<%= dirs.js.src %>/components/root-styles-suffix.html'
26 ],
27 dest: '<%= dirs.js.dest %>/src/components/root-styles.gen.html',
28 nonull: true
29 },
20 dist: {
30 dist: {
21 src: [
31 src: [
22 // Base libraries
32 // Base libraries
@@ -133,12 +143,12 b' module.exports = function(grunt) {'
133
143
134 watch: {
144 watch: {
135 less: {
145 less: {
136 files: ["<%= dirs.css %>/*.less"],
146 files: ["<%= dirs.css %>/**/*.less"],
137 tasks: ["less:development", 'less:components', "vulcanize"]
147 tasks: ["less:development", 'less:components', 'concat:polymercss', "vulcanize"]
138 },
148 },
139 js: {
149 js: {
140 files: ["<%= dirs.js.src %>/**/*.js", "<%= dirs.js.src %>/components/*.*"],
150 files: ["<%= dirs.js.src %>/**/*.js", "<%= dirs.js.src %>/components/**/*.html"],
141 tasks: ["vulcanize", "concat:dist"]
151 tasks: ['less:components', 'concat:polymercss', "vulcanize", "concat:dist"]
142 }
152 }
143 },
153 },
144
154
@@ -173,5 +183,5 b' module.exports = function(grunt) {'
173 grunt.loadNpmTasks('grunt-crisper');
183 grunt.loadNpmTasks('grunt-crisper');
174 grunt.loadNpmTasks('grunt-contrib-copy');
184 grunt.loadNpmTasks('grunt-contrib-copy');
175
185
176 grunt.registerTask('default', ['less:production', 'less:components', 'copy','vulcanize', 'concat:dist']);
186 grunt.registerTask('default', ['less:production', 'less:components', 'concat:polymercss', 'copy','vulcanize', 'concat:dist']);
177 };
187 };
@@ -2,10 +2,7 b''
2 //--- IMPORTS ------------------//
2 //--- IMPORTS ------------------//
3 @import 'helpers';
3 @import 'helpers';
4 @import 'mixins';
4 @import 'mixins';
5 @import 'rcicons';
6 @import 'fonts';
7 @import 'variables';
5 @import 'variables';
8 @import 'type';
9 @import 'buttons';
6 @import 'buttons';
10
7
11 :root {
8 :root {
@@ -1,3 +1,3 b''
1 <dom-module id="shared-styles">
1 <dom-module id="root-styles">
2 <template>
2 <template>
3 <style>
3 <style>
1 NO CONTENT: file renamed from rhodecode/public/js/src/components/shared-styles-suffix.html to rhodecode/public/js/src/components/root-styles-suffix.html
NO CONTENT: file renamed from rhodecode/public/js/src/components/shared-styles-suffix.html to rhodecode/public/js/src/components/root-styles-suffix.html
@@ -1,5 +1,4 b''
1 <template is="dom-bind" id="notificationsPage">
1 <template is="dom-bind" id="notificationsPage">
2 <style include="shared-styles" is="custom-style"></style>
3 <iron-ajax id="toggleNotifications"
2 <iron-ajax id="toggleNotifications"
4 method="post"
3 method="post"
5 url="${url('my_account_notifications_toggle_visibility')}"
4 url="${url('my_account_notifications_toggle_visibility')}"
@@ -60,7 +60,6 b" c.template_context['visual']['default_re"
60 }
60 }
61 })();
61 })();
62 </script>
62 </script>
63 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}" async>
64
63
65 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
64 <script src="${h.asset('js/rhodecode/i18n/%s.js' % c.language, ver=c.rhodecode_version_hash)}"></script>
66 <script type="text/javascript">
65 <script type="text/javascript">
@@ -104,6 +103,8 b" c.template_context['visual']['default_re"
104 <![endif]-->
103 <![endif]-->
105 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
104 <script language="javascript" type="text/javascript" src="${h.asset('js/rhodecode/routes.js', ver=c.rhodecode_version_hash)}"></script>
106 <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
105 <script language="javascript" type="text/javascript" src="${h.asset('js/scripts.js', ver=c.rhodecode_version_hash)}"></script>
106 <link rel="import" href="${h.asset('js/rhodecode-components.html', ver=c.rhodecode_version_hash)}">
107 <style include="shared-styles" is="custom-style"></style>
107 ## avoide escaping the %N
108 ## avoide escaping the %N
108 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
109 <script>CodeMirror.modeURL = "${h.asset('') + 'js/mode/%N/%N.js?ver='+c.rhodecode_version_hash}";</script>
109
110
General Comments 0
You need to be logged in to leave comments. Login now