Skip to content

Commit 558f477

Browse files
authored
Upgrade to spec-md@3 (#850)
1 parent c6eb911 commit 558f477

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
},
1515
"scripts": {
1616
"test": "spec-md spec/GraphQL.md > /dev/null",
17-
"build": "mkdir -p out; spec-md spec/GraphQL.md > out/index.html",
17+
"build": "mkdir -p out; spec-md --githubSource 'https://github.com/graphql/graphql-spec/blame/main/' spec/GraphQL.md > out/index.html",
1818
"watch": "nodemon -e json,md --exec 'npm run build'"
1919
},
2020
"devDependencies": {
2121
"nodemon": "2.0.7",
22-
"spec-md": "2.2.0"
22+
"spec-md": "3.0.1"
2323
}
2424
}

publish.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#!/bin/bash -e
22
# This script publishes the GraphQL specification document to the web.
33

4+
# Determine if this is a tagged release
5+
GITTAG=$(git tag --points-at HEAD)
6+
47
# Build the specification document into publishable form
58
echo "Building spec"
9+
mkdir -p out
10+
if [ -n "$GITTAG" ]; then
11+
spec-md --githubSource "https://github.com/graphql/graphql-spec/blame/$GITTAG/" spec/GraphQL.md > out/index.html
12+
else
13+
spec-md --githubSource "https://github.com/graphql/graphql-spec/blame/main/" spec/GraphQL.md > out/index.html
14+
fi
615
npm run build > /dev/null 2>&1
716

8-
# Determine if this is a tagged release
9-
GITTAG=$(git tag --points-at HEAD)
10-
1117
# Check out gh-pages locally.
1218
echo "Cloning gh-pages"
1319
rm -rf gh-pages

0 commit comments

Comments
 (0)