mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
switching to pnpm for faster build
This commit is contained in:
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -17,7 +17,10 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: 'yarn'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- run: yarn install
|
- name: Install pnpm
|
||||||
- run: yarn test
|
run: corepack enable
|
||||||
|
|
||||||
|
- run: pnpm install
|
||||||
|
- run: pnpm test
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ I'm using Eslint to maintain quote style and quality. Do not skip it...
|
|||||||
|
|
||||||
##### To do before merging:
|
##### To do before merging:
|
||||||
|
|
||||||
- executed tests? (`yarn run test`)
|
- executed tests? (`pnpm test`)
|
||||||
- sure the changes are useful for everybody? Or is it maybe a custom modification just for your case?
|
- sure the changes are useful for everybody? Or is it maybe a custom modification just for your case?
|
||||||
|
|
||||||
_Thanks!_ :heart:
|
_Thanks!_ :heart:
|
||||||
|
|||||||
@@ -9,14 +9,13 @@ RUN apt-get update && apt-get install -y chromium
|
|||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
|
||||||
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
||||||
|
|
||||||
# Timeout fix für yarn hinzugefügt
|
RUN corepack enable && pnpm config set network-timeout 600000
|
||||||
RUN yarn config set network-timeout 600000
|
|
||||||
|
|
||||||
RUN yarn install
|
RUN pnpm install
|
||||||
|
|
||||||
RUN yarn global add pm2
|
RUN pnpm add -g pm2
|
||||||
|
|
||||||
RUN yarn run prod
|
RUN pnpm run prod
|
||||||
|
|
||||||
RUN mkdir /db /conf && \
|
RUN mkdir /db /conf && \
|
||||||
chown 1000:1000 /db /conf && \
|
chown 1000:1000 /db /conf && \
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -25,9 +25,10 @@ If you want to try out _Fredy_, you can access the demo version [here](https://f
|
|||||||
- Make sure to use Node.js 20 or above
|
- Make sure to use Node.js 20 or above
|
||||||
- Run the following commands:
|
- Run the following commands:
|
||||||
```ssh
|
```ssh
|
||||||
yarn (or npm install)
|
corepack enable (if you use node < 22)
|
||||||
yarn run prod
|
pnpm i
|
||||||
yarn run start
|
pnpm prod
|
||||||
|
pnpm start
|
||||||
```
|
```
|
||||||
_Fredy_ will start with the default port, set to `9998`. You can access _Fredy_ by opening your browser at `http://localhost:9998`. The default login is `admin`, both for username and password. You should change the password as soon as possible when you plan to run Fredy on a server.
|
_Fredy_ will start with the default port, set to `9998`. You can access _Fredy_ by opening your browser at `http://localhost:9998`. The default login is `admin`, both for username and password. You should change the password as soon as possible when you plan to run Fredy on a server.
|
||||||
|
|
||||||
@@ -66,18 +67,18 @@ As an administrator, you can create, edit and remove users from _Fredy_. Be care
|
|||||||
To run _Fredy_ in development mode, you need to run the backend & frontend separately.
|
To run _Fredy_ in development mode, you need to run the backend & frontend separately.
|
||||||
Start the backend with:
|
Start the backend with:
|
||||||
```shell
|
```shell
|
||||||
yarn run start
|
pnpm start
|
||||||
```
|
```
|
||||||
For the frontend, run:
|
For the frontend, run:
|
||||||
```shell
|
```shell
|
||||||
yarn run dev
|
pnpm dev
|
||||||
```
|
```
|
||||||
You should now be able to access _Fredy_ from your browser. Check your Terminal to see what port the frontend is running on.
|
You should now be able to access _Fredy_ from your browser. Check your Terminal to see what port the frontend is running on.
|
||||||
|
|
||||||
### Running Tests
|
### Running Tests
|
||||||
To run the tests, run
|
To run the tests, run
|
||||||
```shell
|
```shell
|
||||||
yarn run test
|
pnpm test
|
||||||
```
|
```
|
||||||
|
|
||||||
# Architecture
|
# Architecture
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "fredy",
|
"name": "fredy",
|
||||||
"version": "11.2.0",
|
"version": "11.3.0",
|
||||||
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
||||||
|
"packageManager": "pnpm@9.1.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node prod.js",
|
"start": "node prod.js",
|
||||||
"dev": "yarn && rm -rf ./ui/public/* && vite",
|
"dev": "pnpm install && rm -rf ./ui/public/* && vite",
|
||||||
"ui": "rm -rf ./ui/public/* && vite",
|
"ui": "rm -rf ./ui/public/* && vite",
|
||||||
"prod": "yarn && vite build --emptyOutDir",
|
"prod": "pnpm install && vite build --emptyOutDir",
|
||||||
"format": "prettier --write lib/**/*.js ui/src/**/*.jsx test/**/*.js *.js --single-quote --print-width 120",
|
"format": "prettier --write lib/**/*.js ui/src/**/*.jsx test/**/*.js *.js --single-quote --print-width 120",
|
||||||
"test": "mocha --loader=esmock --timeout 3000000 test/**/*.test.js",
|
"test": "mocha --loader=esmock --timeout 3000000 test/**/*.test.js",
|
||||||
"lint": "eslint ./index.js ./lib/**/*.js ./test/**/*.js ./ui/src/**/*.jsx"
|
"lint": "eslint ./index.js ./lib/**/*.js ./test/**/*.js ./ui/src/**/*.jsx"
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.0.0",
|
"node": ">=20.0.0",
|
||||||
"npm": ">=7.0.0"
|
"pnpm": ">=9.0.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 0.5%",
|
"> 0.5%",
|
||||||
|
|||||||
Reference in New Issue
Block a user