clemstore 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/cli.js +19 -0
  2. package/index.html +31 -0
  3. package/main.js +23 -0
  4. package/package.json +19 -0
package/cli.js ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawn } = require("child_process");
4
+ const path = require("path");
5
+
6
+ const electronPath = require.resolve("electron/cli");
7
+
8
+ const cmd = process.argv[2];
9
+
10
+ if (cmd === "run") {
11
+ const child = spawn(process.execPath, [electronPath, "."], {
12
+ cwd: path.join(__dirname),
13
+ stdio: "inherit"
14
+ });
15
+
16
+ child.on("close", (code) => process.exit(code));
17
+ } else {
18
+ console.log("Usage: clemstore run");
19
+ }
package/index.html ADDED
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>App</title>
7
+
8
+ <style>
9
+ html, body {
10
+ margin: 0;
11
+ padding: 0;
12
+ width: 100%;
13
+ height: 100%;
14
+ overflow: hidden;
15
+ }
16
+
17
+ iframe {
18
+ position: fixed;
19
+ top: 0;
20
+ left: 0;
21
+ width: 100%;
22
+ height: 100%;
23
+ border: 0;
24
+ }
25
+ </style>
26
+ </head>
27
+
28
+ <body>
29
+ <iframe src="https://eliotclem-store.vercel.app/"></iframe>
30
+ </body>
31
+ </html>
package/main.js ADDED
@@ -0,0 +1,23 @@
1
+ const { app, BrowserWindow } = require("electron");
2
+ const path = require("path");
3
+
4
+ function createWindow() {
5
+ const win = new BrowserWindow({
6
+ width: 1000,
7
+ height: 700,
8
+ webPreferences: {
9
+ nodeIntegration: true,
10
+ contextIsolation: false
11
+ }
12
+ });
13
+
14
+ win.loadFile(path.join(__dirname, "index.html"));
15
+ }
16
+
17
+ app.whenReady().then(createWindow);
18
+
19
+ app.on("window-all-closed", () => {
20
+ if (process.platform !== "darwin") {
21
+ app.quit();
22
+ }
23
+ });
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "clemstore",
3
+ "version": "1.0.0",
4
+ "main": "main.js",
5
+ "bin": {
6
+ "clemstore": "cli.js"
7
+ },
8
+ "scripts": {
9
+ "start": "electron ."
10
+ },
11
+ "dependencies": {
12
+ "electron": "^42.3.0"
13
+ },
14
+ "description": "",
15
+ "keywords": [],
16
+ "author": "",
17
+ "license": "ISC",
18
+ "type": "commonjs"
19
+ }