|
8 | 8 | "scripts": {
|
9 | 9 | "__check:links": "make --keep-going check-links",
|
10 | 10 | "_build": "hugo --cleanDestinationDir -e dev -DFE",
|
| 11 | + "_check:formatting": "npx prettier --check .", |
11 | 12 | "_check:links": "HTMLTEST_ARGS='--log-level 1' npm run __check:links",
|
12 | 13 | "_check:links:internal": "npm run __check:links",
|
13 | 14 | "_get:no": "echo SKIPPING get operation",
|
14 | 15 | "_get:submodule:non-lang": "npm run _get:submodule -- content-modules/opentelemetry-specification themes/docsy",
|
15 | 16 | "_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}",
|
16 | 17 | "_prebuild": "run-s get:submodule cp:spec",
|
17 | 18 | "_prepare:docsy": "cd themes/docsy && npm install",
|
18 |
| - "_serve:hugo": "hugo serve --disableFastRender -DFE --minify", |
| 19 | + "_serve:hugo": "hugo serve -DFE --minify", |
19 | 20 | "_serve": "netlify dev -c \"npm run _serve:hugo\"",
|
20 | 21 | "all": "npm-run-all",
|
21 | 22 | "build:preview": "set -x && npm run _build -- --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"",
|
22 | 23 | "build:production": "hugo --cleanDestinationDir --minify",
|
23 | 24 | "build": "npm run _build",
|
24 | 25 | "cd:public": "cd public &&",
|
25 | 26 | "check": "npm run all -- check:*",
|
26 |
| - "check:formatting": "npx prettier --check .", |
| 27 | + "check:formatting": "npm run _check:formatting || (echo '[help] Run: npm run prettier:write'; exit 1)", |
27 | 28 | "check:links": "npm run _check:links",
|
28 | 29 | "check:links:internal": "npm run _check:links:internal",
|
29 | 30 | "clean": "make clean",
|
30 | 31 | "cp:spec": "./scripts/content-modules/cp-pages.sh",
|
| 32 | + "diff:check": "git diff --name-only --exit-code || (echo; echo 'WARNING: the files above have not been committed'; echo)", |
| 33 | + "diff:fail": "git diff --name-only --exit-code || (echo; echo 'ERROR: the files above have changed. Locally rerun `npm run test` and commit changes'; echo; exit 1)", |
31 | 34 | "get:submodule": "npm run _get:${GET:-submodule}",
|
32 | 35 | "make:public": "make public ls-public",
|
33 | 36 | "postbuild:preview": "npm run _check:links",
|
|
40 | 43 | "prepare": "run-s get:submodule _prepare:docsy",
|
41 | 44 | "preserve:hugo": "npm run _prebuild",
|
42 | 45 | "prettier:no-ignore": "npx prettier --ignore-path ''",
|
| 46 | + "prettier:write": "npm run _check:formatting -- --write", |
43 | 47 | "preserve": "npm run _prebuild",
|
44 | 48 | "s": "run-s",
|
45 | 49 | "schemas:update": "npm run update:submodule content-modules/opentelemetry-specification",
|
|
0 commit comments