Skip to content

Commit 3452f93

Browse files
committed
use script to build
1 parent 6a24781 commit 3452f93

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"private": true,
2121
"scripts": {
2222
"deploy": "npm run build && deploy-to-gh-pages --update web_deploy",
23-
"build": "redocly build-docs ./spec/openapi.yaml -o web_deploy/index.html",
23+
"build": "node ./scripts/build.js",
2424
"swagger": "swagger-repo",
25-
"test": "redocly lint ./spec/openapi.yaml",
25+
"test": "redocly lint ./spec/openapi.yaml --max-problems 5000",
2626
"start": "gulp serve",
2727
"process-yaml": "node ./spec/process-yaml.js",
2828
"deploy-branch": "node ./scripts/deploy-branch.js"

scripts/build.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@ mkdir('-p', 'web_deploy');
99

1010
cp('-R', 'web/*', 'web_deploy/');
1111

12-
exec('npm run swagger build -- -o web_deploy');
13-
exec('npm run swagger bundle -- -o web_deploy/swagger.json');
14-
exec('npm run swagger bundle -- --yaml -o web_deploy/swagger.yaml');
15-
16-
17-
mkdir('-p', 'web_deploy/spec');
18-
cp('-R', 'spec/translation_quality', 'web_deploy/spec');
19-
cp('-R', 'spec/issues', 'web_deploy/spec');
20-
cp('-R', 'spec/job_batches_v1', 'web_deploy/spec');
21-
cp('-R', 'spec/job_batches_v2', 'web_deploy/spec');
22-
cp('-R', 'spec/file_translation', 'web_deploy/spec');
23-
cp('-R', 'spec/glossary_v3', 'web_deploy/spec');
24-
cp('-R', 'spec/api_common.yaml', 'web_deploy/spec');
12+
exec('redocly build-docs ./spec/openapi.yaml -o web_deploy/index.html');
13+
exec('redocly bundle ./spec/openapi.yaml -o web_deploy/swagger.yaml');
14+
exec('redocly bundle ./spec/openapi.yaml -o web_deploy/swagger.json');

0 commit comments

Comments
 (0)