modelence 0.1.5 → 0.1.6

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.
package/README.md CHANGED
@@ -1,3 +1,104 @@
1
1
  # Modelence
2
2
 
3
3
  Full-stack JavaScript framework for interactive applications
4
+
5
+ # App setup
6
+
7
+ - Create the following folder structure in your Node project:
8
+
9
+ ```
10
+ src/
11
+ src/client/index.html
12
+ src/client/index.css
13
+ src/client/index.tsx
14
+ src/client/routes.ts
15
+ src/server/app.ts
16
+ ```
17
+
18
+ - Install dependencies:
19
+
20
+ ```
21
+ npm install --save modelence
22
+ npm install --save react react-dom react-router-dom
23
+ npm install --save-dev @types/react @types/react-dom
24
+ npm install --save-dev tsx nodemon
25
+ npm install --save-dev tailwindcss postcss autoprefixer
26
+ ```
27
+
28
+ - Add the following scripts to your `package.json`:
29
+
30
+ ```
31
+ "scripts": {
32
+ "dev": "nodemon --exec tsx src/server/app.ts"
33
+ }
34
+ ```
35
+
36
+ - Create a `tsconfig.json` file in the root of your project with the following content:
37
+ ```json
38
+ {
39
+ "compilerOptions": {
40
+ "outDir": "./.modelence/",
41
+ "baseUrl": ".",
42
+ "paths": {
43
+ "@/*": ["./src/*"]
44
+ },
45
+ "sourceMap": true,
46
+ "noImplicitAny": true,
47
+ "module": "ESNext",
48
+ "esModuleInterop": true,
49
+ "skipLibCheck": true,
50
+ "target": "ES2020",
51
+ "lib": [
52
+ "ES2020",
53
+ "DOM",
54
+ "WebWorker"
55
+ ],
56
+ "jsx": "react-jsx",
57
+ "allowJs": true,
58
+ "moduleResolution": "node",
59
+ "strict": false,
60
+ "noEmit": true,
61
+ "incremental": true,
62
+ "resolveJsonModule": true,
63
+ "isolatedModules": true,
64
+ "plugins": [
65
+ {
66
+ "name": "next"
67
+ }
68
+ ]
69
+ },
70
+ "include": [
71
+ "**/*.ts",
72
+ "**/*.d.ts",
73
+ "**/*.tsx"
74
+ ],
75
+ "exclude": [
76
+ "node_modules"
77
+ ]
78
+ }
79
+ ```
80
+
81
+ Create a `tailwind.config.js` file in the root of your project with the following content:
82
+ ```js
83
+ /** @type {import('tailwindcss').Config} */
84
+ module.exports = {
85
+ content: [
86
+ "./src/client/**/*.{js,jsx,ts,tsx}",
87
+ ],
88
+ theme: {
89
+ extend: {},
90
+ },
91
+ plugins: [],
92
+ darkMode: 'class',
93
+ }
94
+ ```
95
+
96
+ Create a `postcss.config.js` file in the root of your project with the following content:
97
+ ```js
98
+ /** @type {import('postcss-load-config').Config} */
99
+ export default {
100
+ plugins: {
101
+ tailwindcss: {},
102
+ },
103
+ };
104
+ ```
@@ -0,0 +1,2 @@
1
+ var e={seconds:s=>s*1e3,minutes:s=>s*6e4,hours:s=>s*36e5,days:s=>s*864e5,weeks:s=>s*6048e5};export{e as a};//# sourceMappingURL=chunk-GDI7FXAT.js.map
2
+ //# sourceMappingURL=chunk-GDI7FXAT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../time.ts"],"names":["time","x"],"mappings":"AAMaA,IAAAA,CAAAA,CAAO,CAClB,OAAUC,CAAAA,CAAAA,EAAcA,EAAI,GAC5B,CAAA,OAAA,CAAUA,GAAcA,CAAI,CAAA,GAAA,CAC5B,MAAQA,CAAcA,EAAAA,CAAAA,CAAI,KAC1B,IAAOA,CAAAA,CAAAA,EAAcA,EAAI,KACzB,CAAA,KAAA,CAAQA,CAAcA,EAAAA,CAAAA,CAAI,MAC5B","file":"chunk-GDI7FXAT.js","sourcesContent":["const secondMs = 1000;\nconst minuteMs = 60 * secondMs;\nconst hourMs = 60 * minuteMs;\nconst dayMs = 24 * hourMs;\nconst weekMs = 7 * dayMs;\n\nexport const time = {\n seconds: (x: number) => x * secondMs,\n minutes: (x: number) => x * minuteMs,\n hours: (x: number) => x * hourMs,\n days: (x: number) => x * dayMs,\n weeks: (x: number) => x * weekMs,\n}\n"]}
package/dist/client.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { C as ConfigKey } from './types-DAn43Whw.js';
2
- export { Route, Routes, useNavigate } from 'react-router-dom';
3
2
  import React from 'react';
4
3
 
5
4
  declare function getConfig(key: ConfigKey): string | number | boolean;