File tree Expand file tree Collapse file tree 4 files changed +19
-46
lines changed Expand file tree Collapse file tree 4 files changed +19
-46
lines changed Original file line number Diff line number Diff line change @@ -120,42 +120,29 @@ You might find useful to run both the documentation website and the API referenc
120
120
1 . Build the Docker image (only needed the first time):
121
121
122
122
``` bash
123
- npm run docs-buildDockerImage
123
+ npm run docs:docker:build
124
124
```
125
125
126
126
2 . Run the documentation website:
127
127
128
128
``` bash
129
- npm run docs-runLocalDocker
129
+ npm run docs:docker:run
130
130
```
131
131
132
132
#### Using Python directly
133
133
134
- If you have Python installed, you can run the documentation website and API reference locally without Docker:
134
+ If you have Python 3.x installed, you can run the documentation website and API reference locally without Docker:
135
135
136
- 1 . Create a virtual environment:
136
+ 1 . Create a virtual environment and install dependencies :
137
137
138
138
``` bash
139
- python3 -m venv .venv
139
+ npm run docs:local:setup
140
140
```
141
141
142
- 2 . Activate the virtual environment:
143
-
144
- ``` bash
145
- source .venv/bin/activate # Linux/Mac
146
- .venv\S cripts\a ctivate # Windows
147
- ```
148
-
149
- 3 . Install the required dependencies:
150
-
151
- ``` bash
152
- pip install -r docs/requirements.txt
153
- ```
154
-
155
- 4 . Run the documentation website:
142
+ 2 . Run the documentation website:
156
143
157
144
``` bash
158
- mkdocs serve
145
+ npm run docs:local:run
159
146
```
160
147
161
148
## Conventions
Original file line number Diff line number Diff line change @@ -74,40 +74,27 @@ You might find useful to run both the documentation website and the API referenc
74
74
1 . Build the Docker image (only needed the first time):
75
75
76
76
``` bash
77
- npm run docs-buildDockerImage
77
+ npm run docs:docker:build
78
78
```
79
79
80
80
2 . Run the documentation website:
81
81
82
82
``` bash
83
- npm run docs-runLocalDocker
83
+ npm run docs:docker:run
84
84
```
85
85
86
86
#### Using Python directly
87
87
88
88
If you have Python installed, you can run the documentation website and API reference locally without Docker:
89
89
90
- 1 . Create a virtual environment:
90
+ 1 . Create a virtual environment and install dependencies :
91
91
92
92
``` bash
93
- python3 -m venv .venv
93
+ npm run docs:local:setup
94
94
```
95
95
96
- 2 . Activate the virtual environment:
97
-
98
- ``` bash
99
- source .venv/bin/activate # Linux/Mac
100
- .venv\S cripts\a ctivate # Windows
101
- ```
102
-
103
- 3 . Install the required dependencies:
104
-
105
- ``` bash
106
- pip install -r docs/requirements.txt
107
- ```
108
-
109
- 4 . Run the documentation website:
96
+ 2 . Run the documentation website:
110
97
111
98
``` bash
112
- mkdocs serve
99
+ npm run docs:local:run
113
100
```
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ plugins:
141
141
output_dir : ' api'
142
142
tsconfig : ' tsconfig.json'
143
143
options : ' typedoc.json'
144
- name : ' API Docs '
144
+ name : ' API Reference '
145
145
146
146
extra_css :
147
147
- stylesheets/extra.css
Original file line number Diff line number Diff line change 27
27
"commit" : " commit" ,
28
28
"setup-local" : " npm ci && npm run build && husky" ,
29
29
"build" : " npm run build -ws" ,
30
- "docs-website-build-run" : " npm run docs-buildDockerImage && npm run docs-runLocalDocker" ,
31
- "docs-buildDockerImage" : " docker build -t powertools-typescript/docs ./docs/" ,
32
- "docs-runLocalDocker" : " docker run --rm -it -p 8000:8000 -v ${PWD}:/docs powertools-typescript/docs" ,
33
- "docs-api-build-run" : " npm run docs-generateApiDoc && npx live-server api" ,
34
- "docs-generateApiDoc" : " typedoc ." ,
35
- "docs-runLocalApiDoc" : " npx live-server api" ,
30
+ "docs:docker:build" : " docker build -t powertools-typescript/docs ./docs/" ,
31
+ "docs:docker:run" : " docker run --rm -it -p 8000:8000 -v ${PWD}:/docs powertools-typescript/docs" ,
32
+ "docs:local:setup" : " python3 -m venv .venv && .venv/bin/pip install -r docs/requirements.txt" ,
33
+ "docs:local:run" : " .venv/bin/mkdocs serve" ,
34
+ "docs:local:api" : " typedoc ." ,
36
35
"postpublish" : " git restore ." ,
37
36
"lint:markdown" : " markdownlint-cli2 '**/*.md' '#node_modules' '#**/*/node_modules' '#docs/changelog.md' '#LICENSE.md' '#.github' '#**/*/CHANGELOG.md' '#examples/app/README.md'"
38
37
},
You can’t perform that action at this time.
0 commit comments