Refactor: moved site to packages/demo folder

This commit is contained in:
Prozilla 2024-07-07 12:22:10 +02:00
parent 80244ea31b
commit 02c512d611
No known key found for this signature in database
GPG key ID: 5858DFE71CAF31EE
114 changed files with 439 additions and 98 deletions

View file

@ -10,14 +10,18 @@
"type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "vite",
"build": "tsc && vite build",
"preview": "vite preview --port 8080",
"stage": "vite-node scripts/stage",
"predeploy": "pnpm run build && pnpm run stage",
"deploy": "vite-node scripts/deploy",
"fetch": "vite-node scripts/fetchRepository",
"packages:build": "pnpm -r --sequential run build",
"start": "pnpm run site:start",
"prebuild": "rimraf dist",
"build": "pnpm run packages:build && pnpm run site:build",
"predeploy": "rimraf dist",
"deploy": "pnpm run site:deploy",
"site:start": "pnpm --filter prozilla-os-demo run start",
"site:build": "pnpm --filter prozilla-os-demo run build",
"site:preview": "pnpm --filter prozilla-os-demo run preview",
"site:stage": "pnpm --filter prozilla-os-demo run stage",
"site:deploy": "pnpm --filter prozilla-os-demo run deploy",
"site:fetch": "pnpm --filter prozilla-os-demo run fetch",
"packages:build": "pnpm -r --sequential --filter @prozilla-os/* --filter prozilla-os build",
"packages:update": "npx changeset && pnpm changeset version",
"packages:release": "pnpm changeset publish"
},
@ -29,34 +33,17 @@
"type": "git",
"url": "git+https://github.com/Prozilla/ProzillaOS.git"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@prozilla-os/logic-sim": "workspace:*",
"prozilla-os": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"react-svg": "^16.1.34",
"react-tabs": "^6.0.2",
"vite": "^5.3.1",
"vite-plugin-svgr": "^4.2.0"
},
"devDependencies": {
"@changesets/cli": "^2.27.5",
"@eslint/js": "^9.5.0",
"@types/eslint": "^8.56.10",
"@types/gh-pages": "^6.1.0",
"@types/node": "^20.14.6",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-refresh": "^0.4.7",
"gh-pages": "^6.1.1",
"rimraf": "^5.0.8",
"stylelint": "^16.6.1",
"typescript": "^5.4.5",
"typescript-eslint": "^7.13.1",

View file

@ -1,5 +1,13 @@
# @prozilla-os/browser
## 1.0.2
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16
## 1.0.1
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/browser",
"description": "A ProzillaOS application for browsing the internet.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://os.prozilla.dev/browser",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,13 @@
# @prozilla-os/calculator
## 1.0.2
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16
## 1.0.1
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/calculator",
"description": "A ProzillaOS application for making basic calculations.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://os.prozilla.dev/calculator",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,13 @@
# @prozilla-os/file-explorer
## 1.0.13
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16
## 1.0.12
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/file-explorer",
"description": "A standard ProzillaOS application for browsing files.",
"version": "1.0.12",
"version": "1.0.13",
"homepage": "https://os.prozilla.dev/file-explorer",
"author": {
"name": "Prozilla",

View file

@ -0,0 +1,9 @@
# @prozilla-os/logic-sim
## 1.0.2
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/logic-sim",
"description": "A ProzillaOS application for simulating digital logic.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://os.prozilla.dev/logic-sim",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,13 @@
# @prozilla-os/media-viewer
## 1.0.2
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16
## 1.0.1
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/media-viewer",
"description": "A ProzillaOS application for viewing different kinds of media.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://os.prozilla.dev/media-viewer",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,14 @@
# @prozilla-os/settings
## 1.0.2
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/file-explorer@1.0.13
- @prozilla-os/core@1.0.16
## 1.0.1
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/settings",
"description": "A settings app for ProzillaOS.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "https://os.prozilla.dev/settings",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,13 @@
# @prozilla-os/terminal
## 1.0.6
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16
## 1.0.5
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/terminal",
"description": "A terminal/shell application for ProzillaOS.",
"version": "1.0.5",
"version": "1.0.6",
"homepage": "https://os.prozilla.dev/terminal",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,13 @@
# @prozilla-os/text-editor
## 1.0.6
### Patch Changes
- Added logic-sim app + updated app class
- Updated dependencies
- @prozilla-os/core@1.0.16
## 1.0.5
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/text-editor",
"description": "A text editor application for ProzillaOS.",
"version": "1.0.5",
"version": "1.0.6",
"homepage": "https://os.prozilla.dev/text-editor",
"author": {
"name": "Prozilla",

View file

@ -1,5 +1,11 @@
# @prozilla-os/core
## 1.0.16
### Patch Changes
- Added logic-sim app + updated app class
## 1.0.15
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@prozilla-os/core",
"description": "A React component library written in TypeScript for building web-based operating systems, made by Prozilla.",
"version": "1.0.15",
"version": "1.0.16",
"homepage": "https://os.prozilla.dev",
"author": {
"name": "Prozilla",

View file

@ -0,0 +1,70 @@
{
"name": "prozilla-os-demo",
"private": true,
"author": {
"name": "Prozilla",
"email": "business@prozilla.dev",
"url": "https://prozilla.dev/"
},
"homepage": "https://os.prozilla.dev/",
"type": "module",
"scripts": {
"start": "vite",
"build": "tsc && vite build",
"preview": "vite preview --port 8080",
"stage": "vite-node scripts/stage",
"predeploy": "pnpm run build && pnpm run stage",
"deploy": "vite-node scripts/deploy",
"fetch": "vite-node scripts/fetchRepository"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Prozilla/ProzillaOS.git"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@prozilla-os/logic-sim": "workspace:*",
"prozilla-os": "workspace:*",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"react-svg": "^16.1.34",
"react-tabs": "^6.0.2",
"vite": "^5.3.1",
"vite-plugin-svgr": "^4.2.0"
},
"devDependencies": {
"@changesets/cli": "^2.27.5",
"@eslint/js": "^9.5.0",
"@types/eslint": "^8.56.10",
"@types/gh-pages": "^6.1.0",
"@types/node": "^20.14.6",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-refresh": "^0.4.7",
"gh-pages": "^6.1.1",
"stylelint": "^16.6.1",
"typescript": "^5.4.5",
"typescript-eslint": "^7.13.1",
"vite-node": "^1.6.0",
"vite-plugin-checker": "^0.7.1"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

View file

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View file

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View file

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 189 KiB

View file

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 4 KiB

View file

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 227 KiB

View file

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View file

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 193 KiB

View file

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 226 KiB

View file

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 217 KiB

View file

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 194 KiB

File diff suppressed because one or more lines are too long

View file

Before

Width:  |  Height:  |  Size: 649 B

After

Width:  |  Height:  |  Size: 649 B

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -1,6 +1,7 @@
import ghpages from "gh-pages";
import { ANSI } from "../packages/core/src/constants";
import { ANSI } from "../../core/src/constants";
import { BASE_URL, BUILD_DIR, COMMIT_MESSAGE, DOMAIN, REPO_URL } from "../src/config/deploy.config";
import path from "node:path";
function deploy() {
console.log(`${ANSI.fg.yellow}Deploying to GitHub Pages...${ANSI.reset}`);
@ -8,7 +9,7 @@ function deploy() {
console.log(`Commit message: ${ANSI.fg.cyan + COMMIT_MESSAGE + ANSI.reset}`);
console.log(`Repository: ${ANSI.fg.cyan + REPO_URL + ANSI.reset}\n`);
void ghpages.publish(BUILD_DIR, {
void ghpages.publish(path.resolve(__dirname, "../../../", BUILD_DIR), {
repo: REPO_URL,
message: COMMIT_MESSAGE
}, (error) => {

View file

@ -1,6 +1,6 @@
import fs from "node:fs";
import { REPO } from "../src/config/deploy.config";
import { ANSI } from "../packages/core/src/constants";
import { ANSI } from "../../core/src/constants";
const API_URL = "https://api.github.com/";
const TREE_DIRECTORY = "public/config";

View file

@ -1,9 +1,10 @@
import fs from "node:fs";
import { appsConfig } from "../src/config/apps.config";
import { ANSI } from "../packages/core/src/constants";
import { ANSI } from "../../core/src/constants";
import { NAME, TAG_LINE } from "../src/config/branding.config";
import { BASE_URL, BUILD_DIR, DOMAIN } from "../src/config/deploy.config";
import { desktopConfig } from "../src/config/desktop.config";
import path from "node:path";
const PATHS = {
sitemapXml: BUILD_DIR + "/sitemap.xml",
@ -146,6 +147,8 @@ function stage() {
generate404Page(template);
generateAppPages(template);
fs.cpSync(BUILD_DIR, path.resolve(__dirname, "../../../", BUILD_DIR), { recursive: true });
console.log(`\n${ANSI.fg.green}✓ Staging complete${ANSI.reset}`);
} catch (error) {

Some files were not shown because too many files have changed in this diff Show more