blob: 7abff461752cb1f75b834598a35c19ede77be5cc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# themanaworld-website
The website of The Mana World, built with Vue and Vue-Cli.
## Project setup
```
npm install
```
### Customize configuration
The app can be configured with environment variables. See [Dotenv] for further info.
## Building
### Compiles and hot-reloads for development
```sh
npm run serve
```
### Compiles and minifies for production
```sh
npm run build
```
## Testing
### Run all tests
```sh
npm run test
```
### Lints and fixes files
```sh
npm run lint
```
### Run unit tests
```sh
npm run test:unit
```
### Run accessibility tests
```sh
npm run test:accessibility
```
### Run performance tests
```sh
# TODO: implement Lighthouse
npm run test:speed
```
### Run security tests
```sh
# TODO: implement Wapiti
npm run test:security
```
## Deployment
### Nginx
1. Build in production mode
2. Add a nginx vhost pointing to the `dist` folder as root
### [Netlify]
1. Set up a new project
- Build command: `npm run build`
- Publish directory: `dist`
### [Render]
1. Set up a new Web Service
- Environment: `Static Site`
- Build command: `npm run build`
- Publish directory: `dist`
### Gitlab Pages
```yml
pages: # the job must be named pages
image: node:latest
stage: deploy
script:
- npm ci
- npm run build
- mv public public-vue # GitLab Pages hooks on the public folder
- mv dist public # rename the dist folder (result of npm run build)
artifacts:
paths:
- public # artifact path must be /public for GitLab Pages to pick it up
only:
- master
```
[Vue]: https://vuejs.org/
[Dotenv]: https://cli.vuejs.org/guide/mode-and-env.html
[Netlify]: https://www.netlify.com/
[Render]: https://render.com/
|