Skip to content

Commit 10e9735

Browse files
committed
Merge branch 'master' of https://github.com/tczagany/cc-vizzu
2 parents 18f04d0 + a19cfc4 commit 10e9735

15 files changed

+55
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
One-click interactive source code stats using animated charts.
44

5-
- [Online demo](https://vizzuhq.github.io/codeviz/)
6-
- [GitHub](https://github.com/vizzuhq/codeviz/)
5+
- Online demos: [vizzu-lib](https://vizzuhq.github.io/codeviz/?project=vizzu-lib), [PyScript](https://vizzuhq.github.io/codeviz/?project=PyScript), [Bitcoin](https://vizzuhq.github.io/codeviz/?project=bitcoin), [Go Ethereum](https://vizzuhq.github.io/codeviz/?project=Go_Ethereum), [Prysm](https://vizzuhq.github.io/codeviz/?project=prysm), [Solana](https://vizzuhq.github.io/codeviz/?project=solana)
6+
- [GitHub](https://github.com/vizzuhq/codeviz/)
77
- [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=vizzuhq.code-viz-stat)
88

99
Built using the open-source Javascript charting library [Vizzu](https://github.com/vizzuhq/vizzu-lib).

docs/Go_Ethereum-data.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/Go_Ethereum-datasum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rootDir":"/vizzu/ethereum/go-ethereum","date":"2022-06-22_10-17-33","files":1492,"lines":649434,"commentCount":63768,"blankCount":37461,"codeCount":548205,"depth":7}

docs/PyScript-data.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/PyScript-datasum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rootDir":"/vizzu/PyScript","date":"2022-06-22_10-00-48","files":139,"lines":14090,"commentCount":442,"blankCount":1879,"codeCount":11769,"depth":5}

docs/bitcoin-data.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/bitcoin-datasum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rootDir":"/vizzu/bitcoin/bitcoin","date":"2022-06-22_10-22-05","files":2054,"lines":632307,"commentCount":52343,"blankCount":54538,"codeCount":525426,"depth":7}

docs/prysm-data.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/prysm-datasum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rootDir":"/vizzu/prysmaticlabs/prysm","date":"2022-06-22_10-29-25","files":2178,"lines":415658,"commentCount":27197,"blankCount":44628,"codeCount":343833,"depth":7}

docs/scripts/uiLogic-main.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
const vscode = acquireVsCodeApi();
1+
const params = new URLSearchParams(window.location.search);
2+
const project = params.get('project');
3+
const vscode = acquireVsCodeApi(project);
24
let navChart = undefined;
35
let infoChart = undefined;
46

7+
function setTitle(project) {
8+
const title = project
9+
? `CodeViz Stat Demo: ${project[0].toUpperCase()}${project.substring(1).replace("_"," ")}`
10+
: 'CodeViz Stat Demo';
11+
12+
document.title = title;
13+
document.getElementById('label_title').innerText = title;
14+
}
15+
16+
setTitle(project);
17+
518
(function () {
619
window.addEventListener('message', async event => {
720
const message = event.data;

docs/solana-data.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/solana-datasum.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rootDir":"/vizzu/solana-labs/solana","date":"2022-06-22_10-25-59","files":2520,"lines":705648,"commentCount":48153,"blankCount":56451,"codeCount":601044,"depth":6}
File renamed without changes.
File renamed without changes.

docs/vscodeapi.js

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,34 @@ function getJSONSync(url) {
2626
});
2727
}
2828

29-
let vscodeapi = {
30-
postMessage: function(msgParam) {
31-
if (msgParam.command == 'vizzu-ready') {
32-
let data = null;
33-
let datasum = null;
34-
getJSONSync('data.json').then(
35-
(d1) => {
36-
data = d1;
37-
getJSONSync('datasum.json').then(
38-
(d2) => {
39-
datasum = d2;
40-
window.postMessage({
41-
command: 'refresh-data-table',
42-
dataTable: data,
43-
dataSummary: datasum
44-
});
45-
}
46-
);
47-
}
48-
);
29+
function acquireVsCodeApi(project) {
30+
return {
31+
postMessage: function(msgParam) {
32+
if (msgParam.command == 'vizzu-ready') {
33+
let data = null;
34+
let datasum = null;
35+
if (!project) project = 'vizzu-lib';
36+
let jsonfile = project+'-data.json';
37+
getJSONSync(jsonfile).then(
38+
(d1) => {
39+
data = d1;
40+
let jsonfile = project+'-datasum.json';
41+
getJSONSync(jsonfile).then(
42+
(d2) => {
43+
datasum = d2;
44+
window.postMessage({
45+
command: 'refresh-data-table',
46+
dataTable: data,
47+
dataSummary: datasum
48+
});
49+
}
50+
);
51+
}
52+
);
53+
}
54+
else {
55+
console.log(msgParam);
56+
}
4957
}
50-
else {
51-
console.log(msgParam);
52-
}
53-
}
54-
};
55-
56-
function acquireVsCodeApi() {
57-
return vscodeapi;
58+
};
5859
}

0 commit comments

Comments
 (0)