Skip to content

Commit

Permalink
removing react
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-bao committed Mar 14, 2024
1 parent 3d109ca commit 7bdb970
Show file tree
Hide file tree
Showing 55 changed files with 4,078 additions and 13,168 deletions.
14 changes: 2 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@

# lib
node_modules

# dev
.env.local
.idea

# output
dist
Landing-Page.zip
stats.html
build_temp
Landing-Page.zip
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build:
rm -rf build_temp
mkdir build_temp
cp -r meta/* build_temp

cd dashboard && npm run build
cp -r dashboard/dist/* build_temp

cd dhis-header-bar && npm run build
cp dhis-header-bar/dist/dhis-header-bar.js build_temp

rm -f Landing-Page.zip
cd build_temp && zip ../Landing-Page.zip -r .

test:
cd build_temp && npx http-server -p 3000 --proxy https://dev.datim.org --proxu-options.auth YmFvLWFkbWluOktpZXYxOC1XYWdlcy0yNA==
40 changes: 0 additions & 40 deletions README.md

This file was deleted.

5 changes: 5 additions & 0 deletions dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.env.local
node_modules
dist
.idea

11 changes: 7 additions & 4 deletions index.html → dashboard/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!doctype html>
<html lang="en">
<head>
<title>Landing Page | DHIS2</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<style>
body {
margin: 0px;
Expand Down Expand Up @@ -44,13 +44,16 @@
100% { transform: translate3d(-50%, -50%, 0) rotate(360deg); }
}
</style>

</head>
<body>
<div id="root">
<div id="dhis-header-bar"></div>
<div id="content">
<div id="loader">
<div id="spin"></div>
</div>
</div>
<script type="module" src="/src/index.tsx"></script>
<script type="module" src="/src/index.ts"></script>
<script defer src="dhis-header-bar.js"></script>
</body>
</html>
</html>
22 changes: 22 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "landing-page",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest"
},
"devDependencies": {
"@testing-library/dom": "^9.3.4",
"happy-dom": "^13.7.3",
"typescript": "^5.2.2",
"vite": "^5.1.6",
"vitest": "^1.3.1"
},
"dependencies": {
"yaml": "^2.4.1"
}
}
13 changes: 13 additions & 0 deletions dashboard/plugin/minifyHtml.plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function minifyHtmlPlugin() {
return {
name: 'transform-file',
transform(src, id) {
if (id.includes('css')) return {
code: src.replace(/\n/gm, '').replace(/\/\*.+?\*\//g,'')
}
},
transformIndexHtml(html){
return html.replace(/\n/gm, '').replace(/>\s+?</g,'><')
}
}
}
Loading

0 comments on commit 7bdb970

Please sign in to comment.