Skip to content

Commit a5fec08

Browse files
lukekarrysfritzy
authored andcommittedOct 12, 2022
feat: rewrite docs generation
High level overview of the changes here: - The source for the docs content has moved from `docs/content/` to `docs/lib/content/`. The generated markdown is still written to `docs/content/` but that directory is now ignored from git. - All generated content sections of the docs have been removed and replaced with single placeholder html comments such as `<!-- AUTOGENERATED CONFIG DESCRIPTIONS -->` - Placeholders are replaced with generated content only as part of the `prepack` step, so generated markdown is no longer checked in to source and all docs related `make` commands have been removed - All docs (and docs related) snapshots have been moved to a single test file that outputs command usage and formats it with functions imported from `docs/lib/index.js`. So tests will fail if docs content changes until `npm run snap` is run.
1 parent bf53d6d commit a5fec08

File tree

176 files changed

+10110
-21428
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+10110
-21428
lines changed
 

‎.github/workflows/ci-docs.yml ‎.github/workflows/ci-npmcli-docs.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is automatically added by @npmcli/template-oss. Do not edit.
22

3-
name: CI - docs
3+
name: CI - @npmcli/docs
44

55
on:
66
workflow_dispatch:
@@ -71,9 +71,9 @@ jobs:
7171
- name: Reset Deps
7272
run: node . run resetdeps
7373
- name: Lint
74-
run: node . run lint --ignore-scripts -w docs
74+
run: node . run lint --ignore-scripts -w @npmcli/docs
7575
- name: Post Lint
76-
run: node . run postlint --ignore-scripts -w docs
76+
run: node . run postlint --ignore-scripts -w @npmcli/docs
7777

7878
test:
7979
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
@@ -119,7 +119,7 @@ jobs:
119119
- name: Add Problem Matcher
120120
run: echo "::add-matcher::.github/matchers/tap.json"
121121
- name: Test
122-
run: node . test --ignore-scripts -w docs
122+
run: node . test --ignore-scripts -w @npmcli/docs
123123
- name: Check Git Status
124124
if: matrix && matrix.platform.os != 'windows-latest'
125125
run: node scripts/git-dirty.js

‎.github/workflows/ci.yml

-26
Original file line numberDiff line numberDiff line change
@@ -135,32 +135,6 @@ jobs:
135135
if: matrix && matrix.platform.os != 'windows-latest'
136136
run: node scripts/git-dirty.js
137137

138-
check-docs:
139-
name: Check Docs
140-
if: github.repository_owner == 'npm'
141-
runs-on: ubuntu-latest
142-
defaults:
143-
run:
144-
shell: bash
145-
steps:
146-
- name: Checkout
147-
uses: actions/checkout@v3
148-
- name: Setup Git User
149-
run: |
150-
git config --global user.email "npm-cli+bot@github.com"
151-
git config --global user.name "npm CLI robot"
152-
- name: Setup Node
153-
uses: actions/setup-node@v3
154-
with:
155-
node-version: 18.x
156-
cache: npm
157-
- name: Reset Deps
158-
run: node . run resetdeps
159-
- name: Make Docs
160-
run: make freshdocs
161-
- name: Check Git Status
162-
run: node scripts/git-dirty.js
163-
164138
licenses:
165139
name: Check Licenses
166140
if: github.repository_owner == 'npm'

0 commit comments

Comments
 (0)
Please sign in to comment.