edge-city
git clone https://git.pyrossh.dev/edge-city
edge-city is a next level meta-framework for react that runs only on edge runtimes
d4801c5
— Peter John
2023-03-19T18:04:07+05:30
rename package
Generated files not shown: bun.lockb, package-lock.json, packages/muffinjs/bun.lockb
- package.json +1 -3
- packages/example/containers/TodoList/TodoList.jsx +2 -1
- packages/example/main.js +0 -3
- packages/example/package.json +3 -3
- packages/example/routes/todos/page.jsx +1 -3
- packages/muffinjs/.gitignore +0 -1
- packages/muffinjs/bin/muffin +0 -5
- packages/{muffinjs → parotta}/atom.js +0 -0
- packages/{muffinjs/index.js → parotta/cli.js} +2 -0
- packages/{muffinjs → parotta}/package.json +3 -10
- packages/{muffinjs → parotta}/router.js +0 -0
package.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "my-project",
|
|
3
|
-
"version": "1.0.0",
|
|
4
2
|
"workspaces": [
|
|
5
3
|
"packages/example",
|
|
6
|
-
"packages/
|
|
4
|
+
"packages/parotta"
|
|
7
5
|
]
|
|
8
6
|
}
|
packages/example/containers/TodoList/TodoList.jsx
CHANGED
|
@@ -2,10 +2,11 @@ import Todo from "@/components/Todo/Todo";
|
|
|
2
2
|
|
|
3
3
|
const todos = [
|
|
4
4
|
{ id: '1', text: "123" },
|
|
5
|
-
{ id: '2', text: "
|
|
5
|
+
{ id: '2', text: "ABC" }
|
|
6
6
|
];
|
|
7
7
|
|
|
8
8
|
const TodoList = () => {
|
|
9
|
+
// const { data: todos } = usePromise("/todos");
|
|
9
10
|
return (
|
|
10
11
|
<div className="todo-list">
|
|
11
12
|
<h1>Todos</h1>
|
packages/example/main.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import server from "muffinjs/index.js";
|
|
2
|
-
|
|
3
|
-
export default server;
|
packages/example/package.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"name": "quickstart",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"scripts": {
|
|
5
|
-
"dev": "
|
|
5
|
+
"dev": "bunx parotta",
|
|
6
|
-
"start": "NODE_ENV=production
|
|
6
|
+
"start": "NODE_ENV=production bunx parotta",
|
|
7
7
|
"build": "docker build . -t example",
|
|
8
8
|
"run": "docker run -p 3000:3000 example"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"
|
|
11
|
+
"parotta": "0.1.0",
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"react-dom": "^18.2.0"
|
|
14
14
|
}
|
packages/example/routes/todos/page.jsx
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { Suspense } from "react";
|
|
2
2
|
import { useRouter } from "muffinjs/router.js";
|
|
3
|
-
import TodoList from "@/containers/TodoList.jsx";
|
|
3
|
+
import TodoList from "@/containers/TodoList/TodoList.jsx";
|
|
4
4
|
// import "./index.css";
|
|
5
5
|
|
|
6
6
|
const TodosPage = () => {
|
|
7
|
-
const router = useRouter();
|
|
8
|
-
const { data: todos, isRevalidating } = usePromise("/todos");
|
|
9
7
|
return (
|
|
10
8
|
<div className="todos-page">
|
|
11
9
|
<h1>Todos</h1>
|
packages/muffinjs/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node_modules
|
packages/muffinjs/bin/muffin
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
import server from "../index.js";
|
|
4
|
-
|
|
5
|
-
Bun.serve(server);
|
packages/{muffinjs → parotta}/atom.js
RENAMED
|
File without changes
|
packages/{muffinjs/index.js → parotta/cli.js}
RENAMED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env bun --hot
|
|
2
|
+
|
|
1
3
|
import path from 'path';
|
|
2
4
|
import walkdir from 'walkdir';
|
|
3
5
|
import postcss from "postcss"
|
packages/{muffinjs → parotta}/package.json
RENAMED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "parotta",
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
-
"module": "
|
|
4
|
+
"module": "cli.js",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "bun --hot index.js",
|
|
8
|
-
"start": "bun index.js"
|
|
9
|
-
},
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"bun-types": "^0.5.0"
|
|
12
|
-
},
|
|
13
6
|
"dependencies": {
|
|
14
7
|
"autoprefixer": "^10.4.14",
|
|
15
8
|
"mime-types": "2.1.35",
|
|
@@ -21,6 +14,6 @@
|
|
|
21
14
|
"walkdir": "0.4.1"
|
|
22
15
|
},
|
|
23
16
|
"bin": {
|
|
24
|
-
"
|
|
17
|
+
"parotta": "./cli.js"
|
|
25
18
|
}
|
|
26
19
|
}
|
packages/{muffinjs → parotta}/router.js
RENAMED
|
File without changes
|