@@ -43,7 +43,6 @@ The current stable release (2.x) is available at https://js.wiki
### Requirements
### Requirements
- Node.js **18.x** or later
- Node.js **18.x** or later
-- Yarn
- PostgreSQL **11** or later
- PostgreSQL **11** or later
### Usage
### Usage
@@ -53,18 +52,18 @@ The current stable release (2.x) is available at https://js.wiki
1. Edit `config.yml` and fill in the database details. **You need an empty PostgreSQL database.**
1. Edit `config.yml` and fill in the database details. **You need an empty PostgreSQL database.**
1. Run the following commands to install dependencies and generate the client assets:
1. Run the following commands to install dependencies and generate the client assets:
```sh
```sh
- yarn
- yarn legacy:build
- cd ux
- yarn
- yarn build
+ cd server
+ npm install
+ cd ../ux
+ npm install
+ npm run build
cd ..
cd ..
```
```
1. Run this command to start the server:
1. Run this command to start the server:
```sh
```sh
node server
node server
```
```
-1. In your browser, navigate to `http://localhost:5000` *(or the IP/hostname of the server and the PORT you defined earlier.)*
+1. In your browser, navigate to `http://localhost:3000` *(or the IP/hostname of the server and the PORT you defined earlier.)*
1. Login using the default administrator user:
1. Login using the default administrator user:
- Email: `admin@example.com`
- Email: `admin@example.com`
- Password: `12345678`
- Password: `12345678`
@@ -93,17 +92,13 @@ The current stable release (2.x) is available at https://js.wiki
1. Two terminals will launch in split-screen mode at the bottom of the screen. **Server** on the left and **UX** on the right.
1. Two terminals will launch in split-screen mode at the bottom of the screen. **Server** on the left and **UX** on the right.
1. In the left-side terminal (Server), run the command:
1. In the left-side terminal (Server), run the command:
```sh
```sh
- yarn legacy:build
+ npm run dev
```
```
1. In the right-side terminal (UX), run the command:
1. In the right-side terminal (UX), run the command:
```sh
```sh
- yarn build
+ npm run dev
```
```
-1. Back in the left-side terminal (Server), run the command:
- ```sh
- yarn dev
- ```
-1. Open your browser to `http://localhost:5000`
+1. Open your browser to `http://localhost:3000`
1. Login using the default administrator user:
1. Login using the default administrator user:
- Email: `admin@example.com`
- Email: `admin@example.com`
- Password: `12345678`
- Password: `12345678`
@@ -115,7 +110,7 @@ The current stable release (2.x) is available at https://js.wiki
From the left-side terminal (Server), run the command:
From the left-side terminal (Server), run the command:
```sh
```sh
-yarn dev
+npm run dev
```
```
This will launch the server and automatically restart upon modification of any server files.
This will launch the server and automatically restart upon modification of any server files.
@@ -124,31 +119,18 @@ Only precompiled client assets are served in this mode. See the sections below o
### Frontend Development (Quasar/Vue 3)
### Frontend Development (Quasar/Vue 3)
-> Make sure you are running `yarn dev` in the left-side terminal (Server) first! Requests still need to be forwarded to the server, even in SPA mode!
+> Make sure you are running `npm run dev` in the left-side terminal (Server) first! Requests still need to be forwarded to the server, even in SPA mode!
If you wish to modify any frontend content (under `/ux`), you need to start the Quasar Dev Server in the right-side terminal (UX):
If you wish to modify any frontend content (under `/ux`), you need to start the Quasar Dev Server in the right-side terminal (UX):
```sh
```sh
-yarn dev
+npm run dev
```
```
You can then access the site at `http://localhost:5001`. Notice the port being `5001` rather than `5000`. The app runs in a SPA (single-page application) mode and automatically hot-reload any modified component. Any requests made to the `/graphql` endpoint are automatically forwarded to the server running on port `5000`, which is why both must be running at the same time.
You can then access the site at `http://localhost:5001`. Notice the port being `5001` rather than `5000`. The app runs in a SPA (single-page application) mode and automatically hot-reload any modified component. Any requests made to the `/graphql` endpoint are automatically forwarded to the server running on port `5000`, which is why both must be running at the same time.
-Note that not all sections/features are available from this mode, notably the page editing features which still relies on the old client code (Vuetify/Vue 2). For example, trying to edit a page will simply not work. You must use the normal mode (port 5000) to edit pages as it relies on legacy client code. As more features gets ported / developed for Vue 3, they will become available in the SPA mode.
-
Any change you make to the frontend will not be reflected on port 5000 until you run the command `yarn build` in the right-side terminal.
Any change you make to the frontend will not be reflected on port 5000 until you run the command `yarn build` in the right-side terminal.
-### Legacy Frontend Development (Vuetify/Vue 2)
-
-Client code from Wiki.js 2.x is located under `/client`. Some sections still rely on this legacy code (notably the page editing features). Code is gradually being removed from this location and replaced with newer code in `/ux`.
-
-In the unlikely event that you need to modify legacy code and regenerate the old client files, you can do so by running in this command in the left-side terminal (Server):
-```sh
-yarn legacy:build
-```
-
-Then run `yarn dev` to start the server again.
-
### pgAdmin
### pgAdmin
A web version of pgAdmin (a PostgreSQL administration tool) is available at `http://localhost:8000`. Use the login `dev` / `123123` to login.
A web version of pgAdmin (a PostgreSQL administration tool) is available at `http://localhost:8000`. Use the login `dev` / `123123` to login.
- required: value => !!value || 'This field is required.',
- path: value => {
- return filenamePattern.test(value) || 'Invalid path. Please ensure it does not contain special characters, or begin/end in a slash or hashtag string.'
- .caption(v-if='ph.actionType === `edit`') Edited by #[strong {{ ph.authorName }}]
- .caption(v-else-if='ph.actionType === `move`') Moved from #[strong {{ph.valueBefore}}] to #[strong {{ph.valueAfter}}] by #[strong {{ ph.authorName }}]
- .caption(v-else-if='ph.actionType === `initial`') Created by #[strong {{ ph.authorName }}]
- .caption(v-else-if='ph.actionType === `live`') Last Edited by #[strong {{ ph.authorName }}]
- .caption(v-else) Unknown Action by #[strong {{ ph.authorName }}]
-diff_match_patch.prototype.diff_fromDelta=function(a,b){for(var c=[],d=0,e=0,f=b.split(/\t/g),g=0;g<f.length;g++){var h=f[g].substring(1);switch(f[g].charAt(0)){case "+":try{c[d++]=new diff_match_patch.Diff(DIFF_INSERT,decodeURI(h))}catch(k){throw Error("Illegal escape in diff_fromDelta: "+h);}break;case "-":case "=":var l=parseInt(h,10);if(isNaN(l)||0>l)throw Error("Invalid number in diff_fromDelta: "+h);h=a.substring(e,e+=l);"="==f[g].charAt(0)?c[d++]=new diff_match_patch.Diff(DIFF_EQUAL,h):c[d++]=
-new diff_match_patch.Diff(DIFF_DELETE,h);break;default:if(f[g])throw Error("Invalid diff operation in diff_fromDelta: "+f[g]);}}if(e!=a.length)throw Error("Delta length ("+e+") does not equal source text length ("+a.length+").");return c};diff_match_patch.prototype.match_main=function(a,b,c){if(null==a||null==b||null==c)throw Error("Null input. (match_main)");c=Math.max(0,Math.min(c,a.length));return a==b?0:a.length?a.substring(c,c+b.length)==b?c:this.match_bitap_(a,b,c):-1};
-diff_match_patch.prototype.match_bitap_=function(a,b,c){function d(a,d){var e=a/b.length,g=Math.abs(c-d);return f.Match_Distance?e+g/f.Match_Distance:g?1:e}if(b.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));var l=1<<b.length-1;h=-1;for(var k,m,p=b.length+a.length,x,w=0;w<b.length;w++){k=0;for(m=p;k<m;)d(w,