Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Jul 17, 2023
1 parent a0fe2ef commit 4f1e930
Show file tree
Hide file tree
Showing 9 changed files with 3,504 additions and 0 deletions.
1 change: 1 addition & 0 deletions package/gluon-web2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
14 changes: 14 additions & 0 deletions package/gluon-web2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=gluon-web2

PKG_INSTALL:=1

include ../gluon.mk

define Package/gluon-web2
TITLE:=Gluon Web rewritten with Preact and Parcel
DEPENDS:=+gluon-web
endef

$(eval $(call BuildPackageGluon,gluon-web2))
18 changes: 18 additions & 0 deletions package/gluon-web2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "gluon-web2",
"version": "1.0.0",
"description": "Gluon Web rewritten with Preact and Parcel",
"main": "index.js",
"author": "Gluon Contributors",
"license": "MIT",
"dependencies": {
"preact": "^10.15.1"
},
"devDependencies": {
"parcel": "^2.9.2",
"@types/jest": "^29.5.2",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"typescript": "^5.1.3"
}
}
8 changes: 8 additions & 0 deletions package/gluon-web2/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { render, h } from "preact";
import App from "./App";

it("renders without crashing", () => {
const div = document.createElement("div");
render(<App />, div);
render(null, div);
});
5 changes: 5 additions & 0 deletions package/gluon-web2/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { h } from "preact";

const App = () => <h1>Hello world</h1>;

export default App;
15 changes: 15 additions & 0 deletions package/gluon-web2/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>Parcel Preact Typescript</title>
</head>
<body>
<div id="root"></div>
<script src="./index.tsx"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions package/gluon-web2/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { h, render } from "preact";
import App from "./App";

render(<App />, document.getElementById("root")!);
14 changes: 14 additions & 0 deletions package/gluon-web2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"baseUrl": ".",
"esModuleInterop": true,
"jsx": "react",
"jsxFactory": "h",
"lib": ["dom", "esnext"],
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"target": "es5"
},
"include": ["src/**/*"]
}
3,425 changes: 3,425 additions & 0 deletions package/gluon-web2/yarn.lock

Large diffs are not rendered by default.

0 comments on commit 4f1e930

Please sign in to comment.