|
1 | 1 | # Textwire Documentation |
2 | | -Docs build with [Docusaurus](https://docusaurus.io/). |
3 | 2 |
|
4 | | -## Contribute |
5 | | -### NPM Commands |
6 | | -#### Install Dependencies |
7 | | -```bash |
8 | | -npm install |
9 | | -``` |
| 3 | +Documentation website for [Textwire](https://github.com/textwire/textwire) templating language for Go (Golang) written with [VitePress](https://vitepress.dev/) |
10 | 4 |
|
11 | | -#### Watch File Changes |
12 | | -```bash |
13 | | -npm start |
14 | | -``` |
| 5 | +## Contribute |
15 | 6 |
|
16 | | -Navigate to `http://localhost:3000` to see your documentation. |
| 7 | +### Build an Image |
17 | 8 |
|
18 | | -### With Container Engine |
19 | | -#### Build an Image |
20 | 9 | To build an image, navigate to the root of the project and run this command. |
21 | 10 |
|
22 | | -For Podman: |
| 11 | +With Podman: |
| 12 | + |
23 | 13 | ```bash |
24 | 14 | podman-compose build |
25 | 15 | ``` |
26 | 16 |
|
27 | | -For Docker: |
| 17 | +With Docker: |
| 18 | + |
28 | 19 | ```bash |
29 | 20 | docker compose build |
30 | 21 | ``` |
31 | 22 |
|
32 | | -#### Create `node_modules` |
| 23 | +### Create `node_modules` |
| 24 | + |
33 | 25 | Run this command to install npm packages and generate a `node_modules` directory on your local machine. |
34 | 26 |
|
35 | | -For Podman: |
| 27 | +With Podman: |
| 28 | + |
36 | 29 | ```bash |
37 | 30 | podman-compose run --rm app npm i |
38 | 31 | ``` |
39 | 32 |
|
40 | | -For Docker: |
| 33 | +With Docker: |
| 34 | + |
41 | 35 | ```bash |
42 | 36 | docker compose run --rm app npm i |
43 | 37 | ``` |
44 | 38 |
|
45 | | -#### Run the Container |
| 39 | +### Run the Container |
| 40 | + |
46 | 41 | To run a container, navigate to the root of the project and run this command. |
47 | 42 |
|
48 | | -For Podman: |
| 43 | +With Podman: |
| 44 | + |
49 | 45 | ```bash |
50 | | -podman-compose up -d |
| 46 | +podman-compose up |
51 | 47 | ``` |
52 | 48 |
|
53 | | -For Docker: |
| 49 | +With Docker: |
| 50 | + |
54 | 51 | ```bash |
55 | | -docker compose up -d |
| 52 | +docker compose up |
56 | 53 | ``` |
57 | 54 |
|
58 | | -You can visit `http://localhost:3000` to see your documentation. Your files will be auto-compiled to plain JavaScript as you change them. |
| 55 | +You can visit [localhost:3000](http://localhost:3000) to see your documentation. |
| 56 | + |
| 57 | +### Enter the Container |
59 | 58 |
|
60 | | -#### Enter the Container |
61 | 59 | To enter inside of the container, run this command. |
62 | 60 |
|
63 | | -For Podman: |
| 61 | +With Podman: |
| 62 | + |
64 | 63 | ```bash |
65 | | -podman-compose exec app sh |
| 64 | +podman-compose app sh |
66 | 65 | ``` |
67 | 66 |
|
68 | | -For Docker: |
| 67 | +With Docker: |
| 68 | + |
69 | 69 | ```bash |
70 | | -docker compose exec app sh |
| 70 | +docker compose app sh |
71 | 71 | ``` |
72 | 72 |
|
73 | 73 | You'll be able to run NPM commands inside of the container. |
74 | 74 |
|
75 | | -> [!TIP] |
76 | | -> You don't need to run `npm start` because it's already running after you created a container. |
| 75 | +### Remove the Container |
77 | 76 |
|
78 | | -#### Delete the Container |
79 | | -After you are done working on a project, you can cleanup by stopping and removing all the running containers for this project. |
| 77 | +After you are done working on a project, you can cleanup by removing running containers. |
| 78 | + |
| 79 | +With Podman: |
80 | 80 |
|
81 | | -For Podman: |
82 | 81 | ```bash |
83 | 82 | podman-compose down |
84 | 83 | ``` |
85 | 84 |
|
86 | | -For Docker: |
| 85 | +With Docker: |
| 86 | + |
87 | 87 | ```bash |
88 | 88 | docker compose down |
89 | 89 | ``` |
| 90 | + |
| 91 | +## NPM Commands |
| 92 | + |
| 93 | +### Install Dependencies |
| 94 | + |
| 95 | +```bash |
| 96 | +npm i |
| 97 | +``` |
| 98 | + |
| 99 | +### Watch File Changes |
| 100 | + |
| 101 | +```bash |
| 102 | +npm run dev |
| 103 | +``` |
| 104 | + |
| 105 | +Navigate to [localhost:5173](http://localhost:5173) to see your documentation if you run this project locally. With container engines it's going to be [localhost:3000](http://localhost:3000). |
0 commit comments