|
1 | 1 | {
|
2 | 2 | "Notes": [
|
3 |
| - "The 'all' runs _all_ named scripts in sequence, even if one fails; and exits with failure in that case." |
| 3 | + "The 'all' runs _all_ named scripts in sequence, even if one fails; and exits with failure in that case.", |
| 4 | + "check:links actually has the side-effect of 'fixing' the refcache; this is why test-and-fix uses _fix:most" |
4 | 5 | ],
|
5 | 6 | "scripts": {
|
6 | 7 | "__check:links": "make --keep-going check-links",
|
|
20 | 21 | "_diff:fail": "git diff --name-only --exit-code || exit 1",
|
21 | 22 | "_fail": "exit 1",
|
22 | 23 | "_filename-error": "echo 'ERROR: the following files violate naming conventions; fix using: `npm run fix:filenames`'; echo; npm run -s _ls-bad-filenames; exit 1",
|
| 24 | + "_fix:most": "npm run all -- $(npm -s run _list:fix:* | grep -Ev 'refcache|submodule')", |
23 | 25 | "_get:no": "echo SKIPPING get operation",
|
24 | 26 | "_get:submodule:non-lang": "npm run _get:submodule -- content-modules/opentelemetry-specification themes/docsy",
|
25 | 27 | "_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 999}",
|
|
30 | 32 | "_list:dict": "grep '^\\s*\"@cspell' package.json | awk -F: '{print $1}' | tr -d '\"'",
|
31 | 33 | "_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'",
|
32 | 34 | "_ls-bad-filenames": "find assets content static -name '*_*' ! -name '[_.]*'",
|
| 35 | + "_pin": "scripts/pin-submodules.pl", |
33 | 36 | "_prebuild": "npm run seq -- get:submodule cp:spec",
|
34 | 37 | "_prepare:docsy": "cd themes/docsy && npm install",
|
35 | 38 | "_prettier:any": "npx prettier --ignore-path ''",
|
36 | 39 | "_rename-to-kebab-case": "find assets content static -name '*_*' ! -name '[_.]*' -exec sh -c 'mv \"$1\" \"${1//_/-}\"' _ {} \\;",
|
37 | 40 | "_serve:hugo": "hugo server --buildDrafts --minify",
|
38 | 41 | "_serve:netlify": "netlify dev -c \"npm run _serve:hugo -- --renderToMemory\"",
|
39 |
| - "_sync": "scripts/sync-submodules.pl", |
40 | 42 | "all": "bash -c 'x=0; for c in \"$@\"; do npm run $c || x=$((x+1)); done; ((!x)) || (echo \"ERROR: some scripts failed!\" && exit 1)' -",
|
41 | 43 | "build:preview": "set -x && npm run _build -- --minify",
|
42 | 44 | "build:production": "npm run _hugo -- --minify",
|
|
59 | 61 | "cp:spec": "scripts/content-modules/cp-pages.sh",
|
60 | 62 | "diff:check": "npm run _diff:check || (echo; echo 'WARNING: the files above have not been committed'; echo)",
|
61 | 63 | "diff:fail": "npm run _diff:check || (echo; echo 'ERROR: the files above have changed. Locally rerun `npm run test-and-fix` and commit changes'; echo; exit 1)",
|
62 |
| - "fix:all": "npm run seq -- $(npm -s run _list:fix:*)", |
| 64 | + "fix:all": "npm run all -- $(npm -s run _list:fix:*)", |
63 | 65 | "fix:dict": "find content/en layouts -name \"*.md\" -print0 | xargs -0 scripts/normalize-cspell-front-matter.pl",
|
64 | 66 | "fix:filenames": "npm run _rename-to-kebab-case",
|
65 | 67 | "fix:format": "npm run format",
|
|
69 | 71 | "fix:i18n": "npm run fix:i18n:new",
|
70 | 72 | "fix:markdown": "npm run check:markdown -- --fix",
|
71 | 73 | "fix:refcache": "npm run check:links",
|
72 |
| - "fix:submodules": "npm run _sync", |
| 74 | + "fix:submodules": "npm run update:submodule && npm run _pin", |
73 | 75 | "fix:text": "npm run check:text -- --fix",
|
74 | 76 | "fix": "npm run fix:all",
|
75 | 77 | "format": "npm run _check:format -- --write && npm run _check:format:ja+zh -- --write",
|
76 | 78 | "get:submodule": "npm run _get:${GET:-submodule} --",
|
77 | 79 | "log:check:links": "npm run check:links | tee tmp/build-log.txt",
|
| 80 | + "log:test-and-fix": "npm run test-and-fix | tee tmp/build-log.txt", |
78 | 81 | "make:public": "make public ls-public",
|
79 | 82 | "netlify-build:preview": "npm run seq -- build:preview diff:check",
|
80 | 83 | "netlify-build:production": "npm run seq -- build:production diff:check",
|
|
93 | 96 | "serve:hugo": "npm run _serve:hugo -- --renderToMemory",
|
94 | 97 | "serve:netlify": "npm run _serve:netlify",
|
95 | 98 | "serve": "npm run serve:hugo --",
|
96 |
| - "sync": "scripts/sync-submodules.pl", |
97 |
| - "test-and-fix": "npm run seq -- check fix:dict fix:filenames", |
| 99 | + "test-and-fix": "npm run seq -- fix:submodules _fix:most test", |
98 | 100 | "test": "npm run check",
|
99 |
| - "update:docsy-dep": "npm install --save-dev autoprefixer@latest postcss-cli@latest", |
100 | 101 | "update:htmltest-config": "scripts/htmltest-config.sh",
|
101 |
| - "update:hugo": "npm install --save-dev --save-exact hugo-extended@latest", |
102 |
| - "update:hugo+": "npm run update:hugo && npm run update:docsy-dep", |
103 |
| - "update:netlify": "npm install --save-optional netlify-cli@latest", |
104 |
| - "update:other-pkg": "npm install --save-dev gulp@latest", |
| 102 | + "update:pkg:hugo": "npm install --save-dev --save-exact hugo-extended@latest", |
105 | 103 | "update:pkgs": "npx npm-check-updates -u",
|
106 |
| - "update:submodule:lang": "npm run seq -- update:submodule _get:submodule:non-lang", |
107 | 104 | "update:submodule": "set -x && git submodule update --remote ${DEPTH:- --depth 999}"
|
108 | 105 | },
|
109 | 106 | "devDependencies": {
|
|
157 | 154 | "proseWrap": "always",
|
158 | 155 | "singleQuote": true
|
159 | 156 | },
|
160 |
| - "spelling": "cSpell:ignore docsy elemetry htmltest hugo loglevel netlify nowrap postnetlify prebuild precheck preinstall postbuild postget refcache textlint -" |
| 157 | + "spelling": "cSpell:ignore docsy elemetry htmltest hugo loglevel netlify nowrap pkgs postnetlify prebuild precheck preinstall postbuild postget refcache textlint -" |
161 | 158 | }
|
0 commit comments