Skip to content

Commit

Permalink
Upgrade to spec-md@3 (graphql#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
leebyron authored Apr 13, 2021
1 parent c6eb911 commit 558f477
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
},
"scripts": {
"test": "spec-md spec/GraphQL.md > /dev/null",
"build": "mkdir -p out; spec-md spec/GraphQL.md > out/index.html",
"build": "mkdir -p out; spec-md --githubSource 'https://github.com/graphql/graphql-spec/blame/main/' spec/GraphQL.md > out/index.html",
"watch": "nodemon -e json,md --exec 'npm run build'"
},
"devDependencies": {
"nodemon": "2.0.7",
"spec-md": "2.2.0"
"spec-md": "3.0.1"
}
}
12 changes: 9 additions & 3 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/bin/bash -e
# This script publishes the GraphQL specification document to the web.

# Determine if this is a tagged release
GITTAG=$(git tag --points-at HEAD)

# Build the specification document into publishable form
echo "Building spec"
mkdir -p out
if [ -n "$GITTAG" ]; then
spec-md --githubSource "https://github.com/graphql/graphql-spec/blame/$GITTAG/" spec/GraphQL.md > out/index.html
else
spec-md --githubSource "https://github.com/graphql/graphql-spec/blame/main/" spec/GraphQL.md > out/index.html
fi
npm run build > /dev/null 2>&1

# Determine if this is a tagged release
GITTAG=$(git tag --points-at HEAD)

# Check out gh-pages locally.
echo "Cloning gh-pages"
rm -rf gh-pages
Expand Down

0 comments on commit 558f477

Please sign in to comment.