Skip to content

Commit 55a17e0

Browse files
authored
Merge pull request #136 from OpenIPC/dev
Dev
2 parents 4b1306f + 95e0d9a commit 55a17e0

35 files changed

+4022
-5875
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ node_modules
1111
dist
1212
dist-ssr
1313
*.local
14+
.yarn
1415

1516
# Editor directories and files
1617
.vscode/*

.yarn/install-state.gz

-851 KB
Binary file not shown.

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,22 @@
1515

1616
Clone the repo and go into it:
1717
```
18-
git clone https://github.com/openipc/fancyweb-ng
18+
git clone https://github.com/openipc/fancyweb-ng
1919
cd fancyweb-ng
2020
```
2121

22-
Install Node.js.
23-
Enable Corepack.
22+
Install Node.js.
23+
Enable Corepack.
2424

25-
Install dependencies: `yarn install`
26-
Run main site development: `yarn run dev-main`
27-
Run cameras' site development: `yarn run dev-camera`
28-
Run Storybook: `yarn run storybook`
25+
Install dependencies: `yarn install`
26+
Run main site development: `yarn run dev-main`
27+
Run cameras' site development: `yarn run dev-camera`
28+
Run Storybook: `yarn run storybook`
2929

3030
Builds are being preparing and be ready soon. Wait a bit.
3131

32+
## Alternative development way with docker
33+
Run compose: `docker compose up`
3234

3335
### Technical support and donations
3436

docker-compose.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
app:
3+
tty: true
4+
stdin_open: true
5+
build:
6+
context: ./docker
7+
dockerfile: Dockerfile
8+
restart: unless-stopped
9+
command: dev-main
10+
ports:
11+
- 5173:5173
12+
volumes:
13+
- ./:/opt/app

docker/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:lts-alpine
2+
3+
EXPOSE 5173
4+
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
5+
RUN mkdir -p /opt/app && corepack enable && corepack install --global pnpm
6+
7+
WORKDIR /opt/app
8+
USER node
9+
10+
ENTRYPOINT ["docker/start_dev.sh"]

docker/start_dev.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
yarn install
4+
yarn run $1

eslint.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import globals from "globals";
2+
import pluginJs from "@eslint/js";
3+
import tseslint from "typescript-eslint";
4+
5+
6+
/** @type {import('eslint').Linter.Config[]} */
7+
export default [
8+
{
9+
files: ["src/**/*.{js,mjs,cjs,ts,jsx,tsx}"],
10+
},
11+
{
12+
languageOptions: {
13+
globals: globals.browser
14+
}
15+
},
16+
pluginJs.configs.recommended,
17+
...tseslint.configs.recommended,
18+
{
19+
rules: {
20+
"no-unused-vars": [ "error", {
21+
vars: "all",
22+
args: "all",
23+
argsIgnorePattern: "^_+",
24+
}],
25+
},
26+
},
27+
];

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
},
1818
"dependencies": {
1919
"@preact/signals": "^1.2.3",
20+
"hls.js": "^1.5.18",
2021
"preact": "^10.19.6",
2122
"preact-iso": "^2.6.3",
2223
"preact-render-to-string": "^6.5.5"
2324
},
2425
"devDependencies": {
2526
"@babel/core": "^7.24.5",
2627
"@chromatic-com/storybook": "^1.3.3",
28+
"@eslint/js": "^9.16.0",
2729
"@preact/preset-vite": "^2.8.2",
2830
"@storybook/addon-essentials": "^8.2.9",
2931
"@storybook/addon-interactions": "^8.2.9",
@@ -33,13 +35,14 @@
3335
"@storybook/preact-vite": "^8.2.9",
3436
"@storybook/test": "^8.2.9",
3537
"@types/babel__core": "^7",
36-
"@types/express": "^4",
3738
"autoprefixer": "^10.4.19",
38-
"express": "^4.19.2",
39+
"eslint": "^9.16.0",
40+
"globals": "^15.13.0",
3941
"postcss": "^8.4.38",
4042
"storybook": "^8.2.9",
4143
"tailwindcss": "^3.4.3",
4244
"typescript": "^5.2.2",
45+
"typescript-eslint": "^8.17.0",
4346
"vite": "^5.2.0",
4447
"vite-plugin-svgr": "^4.2.0",
4548
"vitest": "^2.0.4"

postcss.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
import path from 'path';
2-
import { fileURLToPath } from 'url';
31
import tailwindcss from 'tailwindcss';
42
import autoprefixer from 'autoprefixer';
53

6-
const __filename = fileURLToPath(import.meta.url);
7-
const __dirname = path.dirname(__filename);
8-
94
export default {
105
plugins: [
116
tailwindcss(),

0 commit comments

Comments
 (0)