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 +101 -0
- package/dist/chunk-GDI7FXAT.js +2 -0
- package/dist/chunk-GDI7FXAT.js.map +1 -0
- package/dist/client.d.ts +0 -1
- package/dist/client.js +1 -360
- package/dist/client.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/package.json +7 -2
- package/dist/chunk-ESWIAHZY.js +0 -2
- package/dist/chunk-ESWIAHZY.js.map +0 -1
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 @@
|
|
|
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"]}
|