@klyb/cli 0.1.19

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 (48) hide show
  1. package/README.md +82 -0
  2. package/bin/klyb.js +4 -0
  3. package/dist/commands/deploy.js +141 -0
  4. package/dist/commands/dev.js +87 -0
  5. package/dist/commands/init.js +77 -0
  6. package/dist/commands/login.js +121 -0
  7. package/dist/credentials.js +35 -0
  8. package/dist/index.js +31 -0
  9. package/dist/simulator/client/src/SimulatorApp.js +133 -0
  10. package/dist/simulator/client/src/main.js +11 -0
  11. package/dist/simulator/client/vite.config.js +15 -0
  12. package/dist/templates/react-vite-ts/src/App.js +27 -0
  13. package/dist/templates/react-vite-ts/src/main.js +11 -0
  14. package/dist/templates/react-vite-ts/vite.config.js +22 -0
  15. package/dist/templates/templates/react-vite-ts/_env.example +12 -0
  16. package/dist/templates/templates/react-vite-ts/clubz.json +20 -0
  17. package/dist/templates/templates/react-vite-ts/index.html +13 -0
  18. package/dist/templates/templates/react-vite-ts/klyb.json +20 -0
  19. package/dist/templates/templates/react-vite-ts/package.json +24 -0
  20. package/dist/templates/templates/react-vite-ts/public/clubz.json +20 -0
  21. package/dist/templates/templates/react-vite-ts/public/preview.png +0 -0
  22. package/dist/templates/templates/react-vite-ts/src/App.tsx +35 -0
  23. package/dist/templates/templates/react-vite-ts/src/main.tsx +9 -0
  24. package/dist/templates/templates/react-vite-ts/tsconfig.json +37 -0
  25. package/dist/templates/templates/react-vite-ts/tsconfig.node.json +12 -0
  26. package/dist/templates/templates/react-vite-ts/vite.config.ts +25 -0
  27. package/package.json +37 -0
  28. package/src/commands/deploy.ts +155 -0
  29. package/src/commands/dev.ts +94 -0
  30. package/src/commands/init.ts +88 -0
  31. package/src/commands/login.ts +94 -0
  32. package/src/credentials.ts +36 -0
  33. package/src/index.ts +37 -0
  34. package/src/simulator/client/index.html +16 -0
  35. package/src/simulator/client/src/SimulatorApp.tsx +163 -0
  36. package/src/simulator/client/src/main.tsx +9 -0
  37. package/src/simulator/client/vite.config.ts +12 -0
  38. package/src/templates/react-vite-ts/_env.example +12 -0
  39. package/src/templates/react-vite-ts/index.html +13 -0
  40. package/src/templates/react-vite-ts/klyb.json +20 -0
  41. package/src/templates/react-vite-ts/package.json +24 -0
  42. package/src/templates/react-vite-ts/public/preview.png +0 -0
  43. package/src/templates/react-vite-ts/src/App.tsx +35 -0
  44. package/src/templates/react-vite-ts/src/main.tsx +9 -0
  45. package/src/templates/react-vite-ts/tsconfig.json +37 -0
  46. package/src/templates/react-vite-ts/tsconfig.node.json +12 -0
  47. package/src/templates/react-vite-ts/vite.config.ts +25 -0
  48. package/tsconfig.json +19 -0
@@ -0,0 +1,9 @@
1
+ import React from 'react'
2
+ import ReactDOM from 'react-dom/client'
3
+ import App from './App.tsx'
4
+
5
+ ReactDOM.createRoot(document.getElementById('root')!).render(
6
+ <React.StrictMode>
7
+ <App />
8
+ </React.StrictMode>,
9
+ )
@@ -0,0 +1,37 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": [
6
+ "ES2020",
7
+ "DOM",
8
+ "DOM.Iterable"
9
+ ],
10
+ "module": "ESNext",
11
+ "skipLibCheck": true,
12
+ /* Bundler mode */
13
+ "moduleResolution": "bundler",
14
+ "allowImportingTsExtensions": true,
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "noEmit": true,
18
+ "jsx": "react-jsx",
19
+ /* Linting */
20
+ "strict": true,
21
+ "noUnusedLocals": true,
22
+ "noUnusedParameters": true,
23
+ "noFallthroughCasesInSwitch": true,
24
+ "preserveSymlinks": true
25
+ },
26
+ "include": [
27
+ "src"
28
+ ],
29
+ "exclude": [
30
+ "node_modules"
31
+ ],
32
+ "references": [
33
+ {
34
+ "path": "./tsconfig.node.json"
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": true,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true
8
+ },
9
+ "include": [
10
+ "vite.config.ts"
11
+ ]
12
+ }
@@ -0,0 +1,25 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ // https://vitejs.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ build: {
8
+ rollupOptions: {
9
+ output: {
10
+ // Ensure we get a single recognizable entry point if possible,
11
+ // though standard vite build is fine for the platform zipper.
12
+ entryFileNames: 'assets/[name].js',
13
+ chunkFileNames: 'assets/[name].js',
14
+ assetFileNames: 'assets/[name].[ext]'
15
+ }
16
+ }
17
+ },
18
+ resolve: {
19
+ preserveSymlinks: true,
20
+ dedupe: ['react', 'react-dom']
21
+ },
22
+ optimizeDeps: {
23
+ exclude: ['@klyb/sdk']
24
+ }
25
+ })
package/tsconfig.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2020",
4
+ "module": "commonjs",
5
+ "outDir": "./dist",
6
+ "rootDir": "./src",
7
+ "strict": true,
8
+ "esModuleInterop": true,
9
+ "skipLibCheck": true,
10
+ "forceConsistentCasingInFileNames": true
11
+ },
12
+ "include": [
13
+ "src/**/*"
14
+ ],
15
+ "exclude": [
16
+ "src/templates/**/*",
17
+ "src/simulator/client/**/*"
18
+ ]
19
+ }