Skip to content

Commit 2f27573

Browse files
committed
Added how build Vanilla
1 parent 00fb8f1 commit 2f27573

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ installation.These variables are mandatory.
2929
## Setup Vanilla Forums
3030

3131
Go to [Setup Vanilla Forums](./docs/SetupVanillaForums.md) to complete installation.
32+
33+
## Build Vanilla Forums
34+
35+
Go to [Build Vanilla Forums](./docs/BuildVanillaForums.md) to install dependencies and build assets.

docs/BuildVanillaForums.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Build Vanilla Forums
2+
3+
Vanilla Forums has pre-built frontend assets (js, css and addons assets).
4+
5+
The full source code is https://github.com/vanilla/vanilla/tree/Vanilla_3.3.
6+
7+
## Requirements
8+
9+
- Node.js “>=8.0.0 <12.0.0”
10+
- PHP 7.2 - 7.4 (as of Vanilla 3.3)
11+
- Yarn
12+
- Composer
13+
14+
## Installing yarn
15+
16+
Install yarn:
17+
18+
`npm install -g yarn`
19+
20+
## Installing composer
21+
22+
Install composer:
23+
24+
`php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"`
25+
26+
`php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"`
27+
28+
`php composer-setup.php`
29+
30+
`php -r "unlink('composer-setup.php');"`
31+
32+
33+
## Building Frontend assets
34+
35+
1.Clone or download a repo. Go to the root folder:
36+
cd `Vanilla_3.3`
37+
38+
2.Run the command to install dependencies and build:
39+
`composer install or php composer.phar install`
40+
41+
You should see output
42+
43+
![./images/build.png](./images/build.png)
44+
45+
46+
3.Copy all files from the 'dist' folder to 'forums/vanilla/dist' (the 'forums' repo).
47+
48+
Notes:
49+
The first time you run this, it may take a while. Subsequent runs should be faster, but if you are constantly
50+
updating the javascript or CSS or addons or themes, it's recommended to use the developer build.
51+
52+
`yarn build:dev`

docs/images/build.png

103 KB
Loading

0 commit comments

Comments
 (0)