Skip to content

Commit 1baae1d

Browse files
committed
switched using webr
1 parent 9bce502 commit 1baae1d

16 files changed

+166188
-1445
lines changed

package.json

100755100644
+67-96
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,72 @@
11
{
2-
"name": "StatConverter",
3-
"version": "1.1.9",
4-
"description": "Convert statistical data using R",
5-
"main": "dist/main.js",
6-
"scripts": {
7-
"build": "tsc",
8-
"watch": "tsc -w",
9-
"lint": "eslint -c .eslintrc --ext .ts ./src",
10-
"start": "npm run build && electron ./dist/main.js",
11-
"dist": "npm run build && electron-builder",
12-
"pack": "npm run build && electron-builder --dir"
2+
"name": "statconverter",
3+
"version": "1.2.0",
4+
"description": "",
5+
"main": "dist/main.js",
6+
"scripts": {
7+
"build": "tsc",
8+
"watch": "tsc -w",
9+
"lint": "eslint -c .eslintrc --ext .ts ./src",
10+
"start": "npm run build && electron ./dist/main.js",
11+
"dist": "npm run build && electron-builder"
12+
},
13+
"author": "RODA",
14+
"license": "CC0-1.0",
15+
"bugs": {
16+
"url": "https://github.com/RODA/StatConverter/issues"
17+
},
18+
"homepage": "https://github.com/RODA/StatConverter#readme",
19+
"build": {
20+
"appId": "StatConverter.tool",
21+
"productName": "StatConverter",
22+
"directories": {
23+
"output": "build/output"
1324
},
14-
"repository": {
15-
"type": "git",
16-
"url": "git+https://github.com/RODA/StatConverter.git"
25+
"win": {
26+
"icon": "build/StatConverter.ico",
27+
"legalTrademarks": "MIT Licence",
28+
"target": {
29+
"target": "nsis",
30+
"arch": [
31+
"x64"
32+
]
33+
}
1734
},
18-
"keywords": [
19-
"convert",
20-
"SAS",
21-
"SPSS",
22-
"Stata",
23-
"R",
24-
"Excel",
25-
"DDI"
26-
],
27-
"author": "RODA",
28-
"license": "MIT",
29-
"bugs": {
30-
"url": "https://github.com/RODA/StatConverter/issues"
31-
},
32-
"homepage": "https://github.com/RODA/StatConverter#readme",
33-
"dependencies": {
34-
"@electron/asar": "^3.2.1",
35-
"@electron/get": "^2.0.2",
36-
"@electron/universal": "^1.3.3",
37-
"@popperjs/core": "^2.11.6",
38-
"@types/bluebird": "^3.5.37",
39-
"@types/jsdom": "^20.0.1",
40-
"@types/ws": "^8.5.3",
41-
"app-builder-lib": "^24.0.0-alpha.2",
42-
"asar": "^3.2.0",
43-
"bootstrap": "^5.2.2",
44-
"dmg-builder": "^24.0.0-alpha.2",
45-
"electron-squirrel-startup": "^1.0.0",
46-
"imports-loader": "^4.0.1",
47-
"lodash.clonedeep": "^4.5.0",
48-
"minimatch": "^5.1.0",
49-
"r-integration": "^2.4.0",
50-
"trim-newlines": ">=4.0.2",
51-
"ws": "^8.10.0"
52-
},
53-
"devDependencies": {
54-
"@types/lodash.clonedeep": "^4.5.7",
55-
"@typescript-eslint/eslint-plugin": "^5.41.0",
56-
"@typescript-eslint/parser": "^5.41.0",
57-
"electron": "^18.3.15",
58-
"electron-builder": "^23.6.0",
59-
"electron-rebuild": "^3.2.9",
60-
"eslint": "^8.26.0",
61-
"path": "^0.12.7",
62-
"typescript": "^4.8.4"
63-
},
64-
"build": {
65-
"appId": "StatConverter.tool",
66-
"productName": "StatConverter",
67-
"directories": {
68-
"output": "build/output"
69-
},
70-
"extraResources": [
71-
{
72-
"from": "R_Portable",
73-
"to": "R_Portable"
74-
},
75-
{
76-
"from": "src/startServer.R",
77-
"to": "startServer.R"
78-
}
79-
],
80-
"win": {
81-
"icon": "build/StatConverter.ico",
82-
"legalTrademarks": "MIT Licence",
83-
"target": {
84-
"target": "nsis",
85-
"arch": [
86-
"x64"
87-
]
88-
}
89-
},
90-
"mac": {
91-
"category": "public.app-category.productivity",
92-
"target": {
93-
"target": "dmg",
94-
"arch": [
95-
"x64"
96-
]
97-
},
98-
"icon": "build/StatConverter.icns"
99-
}
35+
"mac": {
36+
"category": "public.app-category.productivity",
37+
"target": {
38+
"target": "dmg",
39+
"arch": [
40+
"arm64"
41+
]
42+
},
43+
"icon": "build/StatConverter.icns"
10044
}
45+
},
46+
"devDependencies": {
47+
"@types/electron": "^1.4.38",
48+
"@types/emscripten": "^1.39.13",
49+
"@types/lodash": "^4.17.15",
50+
"@types/serviceworker": "^0.0.118",
51+
"@types/uuid": "^10.0.0",
52+
"@typescript-eslint/eslint-plugin": "^8.20.0",
53+
"@typescript-eslint/parser": "^8.20.0",
54+
"electron": "^34.0.2",
55+
"electron-builder": "^26.0.1",
56+
"eslint": "^9.18.0",
57+
"ts-loader": "^9.5.2",
58+
"typescript": "^5.7.3",
59+
"webpack": "^5.97.1",
60+
"webpack-cli": "^6.0.1"
61+
},
62+
"dependencies": {
63+
"@xterm/addon-fit": "^0.10.0",
64+
"@xterm/xterm": "^5.5.0",
65+
"bootstrap": "^5.3.3",
66+
"lodash": "^4.17.21",
67+
"tippy.js": "^6.3.7",
68+
"uuid": "^11.0.5",
69+
"webr": "^0.4.2"
70+
},
71+
"postinstall": "electron-builder install-app-deps"
10172
}

src/assets/global.css

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.mt-1 {
2+
margin-top: 1rem;
3+
}
4+
.mt-1_5 {
5+
margin-top: 1.5rem;
6+
}
7+
.mt-2 {
8+
margin-top: 2rem;
9+
}
10+
.mt-3 {
11+
margin-top: 3rem;
12+
}
13+
.mt-4 {
14+
margin-top: 4rem;
15+
}
16+
.mt-5 {
17+
margin-top: 5rem;
18+
}
19+
20+
.hidden {
21+
display: none;
22+
}
23+
24+
.text-right {
25+
text-align: right;
26+
}
27+
28+
.text-left {
29+
text-align: left;
30+
}
31+
32+
.text-center {
33+
text-align: center;
34+
}

src/communication.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// encapsulation
2+
3+
import { ipcRenderer } from 'electron';
4+
5+
interface ShowMessageBoxInterface {
6+
type: 'info' | 'error' | 'question' | 'warning';
7+
title: string;
8+
message: string;
9+
}
10+
11+
export const showMessageBox = (obj: ShowMessageBoxInterface) => {
12+
ipcRenderer.send('showDialogMessage', obj);
13+
}

0 commit comments

Comments
 (0)