diff --git a/build.sh b/build.sh deleted file mode 100755 index d1cc5a50..00000000 --- a/build.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/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 draft document -echo "Building spec draft" -mkdir -p public/draft -spec-md --metadata spec/metadata.json --githubSource "https://github.com/graphql/graphql-over-http/blame/main/" spec/GraphQLOverHTTP.md > public/draft/index.html - -# If this is a tagged commit, also build the release document -if [ -n "$GITTAG" ]; then - echo "Building spec release $GITTAG" - mkdir -p "public/$GITTAG" - spec-md --metadata spec/metadata.json --githubSource "https://github.com/graphql/graphql-over-http/blame/$GITTAG/" spec/GraphQLOverHTTP.md > "public/$GITTAG/index.html" -fi - -# Create the index file -echo "Rebuilding: / (index)" -HTML=" - - GraphQL over HTTP Specification Versions - - - -

GraphQL over HTTP

- " - -# Include latest draft -GITDATE=$(git show -s --format=%cd --date=format:"%a, %b %-d, %Y" HEAD) -HTML="$HTML - - - - - - " - -GITHUB_RELEASES="https://github.com/graphql/graphql-over-http/releases/tag" -for GITTAG in $(git tag -l --sort='-*committerdate') ; do - VERSIONYEAR=${GITTAG: -4} - TAGTITLE="${GITTAG%$VERSIONYEAR} $VERSIONYEAR" - TAGGEDCOMMIT=$(git rev-list -1 "$GITTAG") - GITDATE=$(git show -s --format=%cd --date=format:"%a, %b %-d, %Y" $TAGGEDCOMMIT) - - HTML="$HTML - " - - [ -z $HAS_LATEST_RELEASE ] && HTML="$HTML - " || HTML="$HTML - " - HAS_LATEST_RELEASE=1 - - HTML="$HTML - - - - " -done - -HTML="$HTML -
PrereleaseWorking Draft$GITDATE
Latest Release$TAGTITLE$GITDATERelease Notes
- - -" - -echo $HTML > "public/index.html" diff --git a/package-lock.json b/package-lock.json index c311855f..0b484aa8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,9 +7,9 @@ "name": "graphql-over-http", "license": "OWFa-1.0", "devDependencies": { - "cspell": "6.31.1", + "cspell": "^6.31.1", "nodemon": "^3.1.14", - "prettier": "^2.3.0", + "prettier": "^2.8.8", "spec-md": "^3.1.0", "wgutils": "^2.1.2" } @@ -861,6 +861,7 @@ "resolved": "https://registry.npmjs.org/cspell/-/cspell-6.31.1.tgz", "integrity": "sha512-gyCtpkOpwI/TGibbtIgMBFnAUUp2hnYdvW/9Ky4RcneHtLH0+V/jUEbZD8HbRKz0GVZ6mhKWbNRSEyP9p3Cejw==", "dev": true, + "license": "MIT", "dependencies": { "@cspell/cspell-pipe": "6.31.1", "@cspell/dynamic-import": "6.31.1", @@ -1859,10 +1860,11 @@ } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -2036,6 +2038,7 @@ "resolved": "https://registry.npmjs.org/spec-md/-/spec-md-3.1.0.tgz", "integrity": "sha512-h4/Pc+ICB+q8cXKTyy8f5JJHSQRNy1oh05P/vTrq+qIV2fLmEaalwpZMRYMzlq/g+qxnIp/hywGGYA3rpefYmA==", "dev": true, + "license": "MIT", "dependencies": { "prismjs": "^1.23.0" }, @@ -3799,9 +3802,9 @@ "dev": true }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true }, "prismjs": { diff --git a/package.json b/package.json index e77ad325..0606fe47 100644 --- a/package.json +++ b/package.json @@ -3,19 +3,24 @@ "private": true, "license": "OWFa-1.0", "scripts": { - "test": "npm run test:build && npm run test:spellcheck", - "test:build": "spec-md --metadata spec/metadata.json spec/GraphQLOverHTTP.md > /dev/null", + "test": "npm run test:spelling && npm run test:format && npm run test:build", + "test:build": "wgutils spec build --test", "test:spellcheck": "cspell \"spec/**/*.md\" README.md", "format": "prettier --write \"**/*.{md,yml,yaml,json}\"", "format:check": "prettier --check \"**/*.{md,yml,yaml,json}\"", - "build": "./build.sh", + "build": "wgutils spec build", "watch": "nodemon -e json,md --exec \"npm run build\"", - "gen-agenda": "wgutils agenda gen" + "gen-agenda": "wgutils agenda gen", + "test:spelling": "cspell \"spec/**/*.md\" README.md LICENSE.md", + "test:format": "prettier --check \"**/*.{md,yml,yaml,json}\" || npm run suggest:format", + "suggest:format": "echo \"\nTo resolve this, run: $(tput bold)npm run format$(tput sgr0)\" && exit 1", + "version:prepare": "wgutils spec version", + "version:release": "wgutils spec release" }, "devDependencies": { - "cspell": "6.31.1", + "cspell": "^6.31.1", "nodemon": "^3.1.14", - "prettier": "^2.3.0", + "prettier": "^2.8.8", "spec-md": "^3.1.0", "wgutils": "^2.1.2" },