Skip to content

Commit 062f351

Browse files
authored
move vue and vue-calendar-heatmap to webpack (#10188)
- unvendor vue and vue-calendar-heatmap - remove unused moment.js leftover from previous heatmap version - ensure webpack loads the full version of vue - fix vue devmode warning related to 'searchLimit' type I wanted to name the chunk heatmap.js but adblockers don't like that filename [1]. [1] https://github.com/easylist/easylist/blob/3899d5dff33216c0bc64f09ff15d376f346d3e33/easyprivacy/easyprivacy_general.txt#L2095
1 parent 09dbd85 commit 062f351

15 files changed

+154
-263
lines changed

.eslintrc

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ globals:
2323
emojify: false
2424
SimpleMDE: false
2525
u2fApi: false
26-
Vue: false
2726

2827
rules:
2928
arrow-body-style: [0]

package-lock.json

+35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"jquery-migrate": "3.1.0",
1414
"jquery.are-you-sure": "1.9.0",
1515
"swagger-ui": "3.25.0",
16-
"vue-bar-graph": "1.2.0"
16+
"vue": "2.6.11",
17+
"vue-bar-graph": "1.2.0",
18+
"vue-calendar-heatmap": "0.8.4"
1719
},
1820
"devDependencies": {
1921
"@babel/core": "7.8.4",

public/vendor/librejs.html

+4-9
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
<td><a href="https://github.com/bluef/gitgraph.js">gitgraph.js-latest</a></td>
5252
</tr>
5353
<tr>
54-
<td><a href="./plugins/vue/vue.min.js">vue.min.js</a></td>
54+
<td><a href="../js/index.js">vue</a></td>
5555
<td><a href="https://github.com/vuejs/vue/blob/dev/LICENSE">Expat</a></td>
56-
<td><a href="https://github.com/vuejs/vue/archive/v2.6.6.tar.gz">vue.js-v2.6.6.tar.gz</a></td>
56+
<td><a href="https://github.com/vuejs/vue/archive/v2.6.11.tar.gz">vue.js-v2.6.11.tar.gz</a></td>
5757
</tr>
5858
<tr>
5959
<td><a href="./plugins/emojify/emojify.custom.js">emojify.custom.js</a></td>
@@ -131,14 +131,9 @@
131131
<td><a href="https://github.com/swagger-api/swagger-ui/archive/v3.22.1.tar.gz">swagger-ui-v3.22.1.tar.gz</a></td>
132132
</tr>
133133
<tr>
134-
<td><a href="./plugins/vue-calendar-heatmap/">vue-calendar-heatmap</a></td>
134+
<td><a href="../js/userheatmap.js">vue-calendar-heatmap</a></td>
135135
<td><a href="https://github.com/WildCodeSchool/vue-calendar-heatmap/blob/master/README.md">MIT</a></td>
136-
<td><a href="https://github.com/WildCodeSchool/vue-calendar-heatmap/archive/master.zip">7f48b20.zip</a></td>
137-
</tr>
138-
<tr>
139-
<td><a href="./plugins/moment/">moment.js</a></td>
140-
<td><a href="https://github.com/moment/moment/blob/develop/LICENSE">MIT</a></td>
141-
<td><a href="https://github.com/moment/moment/archive/2.22.2.tar.gz">0.4.1.tar.gz</a></td>
136+
<td><a href="https://github.com/WildCodeSchool/vue-calendar-heatmap/archive/master.zip">master.zip</a></td>
142137
</tr>
143138
</tbody>
144139
</table>

public/vendor/plugins/moment/moment.min.js

-1
This file was deleted.

public/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.browser.js

-1
This file was deleted.

public/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.css

-112
This file was deleted.

public/vendor/plugins/vue/LICENSE

-21
This file was deleted.

public/vendor/plugins/vue/vue.min.js

-6
This file was deleted.

templates/base/footer.tmpl

-8
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,8 @@
108108
</script>
109109
{{end}}
110110
<script src="{{StaticUrlPrefix}}/vendor/plugins/emojify/emojify.custom.js"></script>
111-
<script src="{{StaticUrlPrefix}}/vendor/plugins/vue/vue.min.js"></script>
112111
<script src="{{StaticUrlPrefix}}/fomantic/semantic.min.js?v={{MD5 AppVer}}"></script>
113112
<script src="{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}"></script>
114-
{{if .EnableHeatmap}}
115-
<script src="{{StaticUrlPrefix}}/vendor/plugins/moment/moment.min.js" charset="utf-8"></script>
116-
<script src="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.browser.js" charset="utf-8"></script>
117-
<script type="text/javascript">
118-
window.initHeatmap('user-heatmap', '{{.HeatmapUser}}');
119-
</script>
120-
{{end}}
121113
{{template "custom/footer" .}}
122114
</body>
123115
</html>

templates/base/head.tmpl

+2-3
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@
9393
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
9494
Tribute: {{if .RequireTribute}}true{{else}}false{{end}},
9595
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
96+
Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
97+
heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
9698
};
9799
</script>
98100
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png">
@@ -124,9 +126,6 @@
124126
{{end}}
125127
{{if .RequireDropzone}}
126128
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css">
127-
{{end}}
128-
{{if .EnableHeatmap}}
129-
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/vue-calendar-heatmap/vue-calendar-heatmap.css">
130129
{{end}}
131130
<style class="list-search-style"></style>
132131
{{if .PageIsUserProfile}}

templates/pwa/serviceworker_js.tmpl

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,19 @@ var urlsToCache = [
88
'{{StaticUrlPrefix}}/js/index.js?v={{MD5 AppVer}}',
99
'{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}',
1010
'{{StaticUrlPrefix}}/js/swagger.js?v={{MD5 AppVer}}',
11+
'{{StaticUrlPrefix}}/js/userheatmap.js',
1112
'{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js',
1213
'{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js',
1314
'{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js',
1415
'{{StaticUrlPrefix}}/vendor/plugins/emojify/emojify.custom.js',
1516
'{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js',
1617
'{{StaticUrlPrefix}}/vendor/plugins/jquery.minicolors/jquery.minicolors.min.js',
1718
'{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.js',
18-
'{{StaticUrlPrefix}}/vendor/plugins/vue/vue.min.js',
1919

2020
// css
2121
'{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}',
2222
'{{StaticUrlPrefix}}/css/swagger.css?v={{MD5 AppVer}}',
23+
'{{StaticUrlPrefix}}/css/userheatmap.css',
2324
'{{StaticUrlPrefix}}/fomantic/semantic.min.css?v={{MD5 AppVer}}',
2425
'{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css',
2526
'{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css',

0 commit comments

Comments
 (0)