-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS-3194] Generate API docs for JS driver
- Loading branch information
Showing
9 changed files
with
5,845 additions
and
3,164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,14 @@ resources: | |
aws_secret_access_key: ((prod-images-aws-secret-key)) | ||
aws_region: us-east-2 | ||
|
||
- name: fauna-js-repository-docs | ||
type: git | ||
icon: github | ||
source: | ||
uri: [email protected]:fauna/fauna-js.git | ||
branch: gh-pages | ||
private_key: ((github-ssh-key)) | ||
|
||
groups: | ||
- name: pipeline | ||
jobs: | ||
|
@@ -152,3 +160,11 @@ jobs: | |
put: notify | ||
params: | ||
text_file: slack-message/publish | ||
|
||
- task: publish-docs | ||
file: main.git/concourse/tasks/publish-docs.yml | ||
input_mapping: { fauna-js-repository: main.git } | ||
|
||
- put: fauna-js-repository-docs | ||
params: | ||
repository: fauna-js-repository-updated-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
set -eou | ||
|
||
# Setup | ||
echo 'Set up git' | ||
apk add --no-progress --no-cache git | ||
|
||
cd ./fauna-js-repository | ||
|
||
PACKAGE_VERSION=$(node -p -e "require('./package.json').version") | ||
|
||
# Generate docs | ||
npm install | ||
npm run docs | ||
|
||
echo "Current docs version: $PACKAGE_VERSION" | ||
|
||
cd ../ | ||
git clone fauna-js-repository-docs fauna-js-repository-updated-docs | ||
cd fauna-js-repository-updated-docs | ||
|
||
if [ -d "$PACKAGE_VERSION" ]; then | ||
rm -rf "$PACKAGE_VERSION" | ||
echo "Existing $PACKAGE_VERSION directory removed." | ||
fi | ||
|
||
cp -R "../fauna-js-repository/build/docs" "$PACKAGE_VERSION" | ||
|
||
echo "Updating 'latest' symlink to point to $PACKAGE_VERSION" | ||
ln -sfn "$PACKAGE_VERSION" latest | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "Fauna, Inc" | ||
|
||
git add -A | ||
git commit -m "Update docs to version: $PACKAGE_VERSION" | ||
|
||
echo "Updated docs to version: $PACKAGE_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
platform: linux | ||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: node | ||
tag: 15.14.0-alpine3.10 | ||
|
||
inputs: | ||
- name: fauna-js-repository | ||
- name: fauna-js-repository-docs | ||
|
||
outputs: | ||
- name: fauna-js-repository-updated-docs | ||
|
||
run: | ||
path: ./fauna-js-repository/concourse/scripts/publish_docs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!-- Used for auto-generated reference docs --> | ||
|
||
API reference documentation for the | ||
[Fauna v10 JavaScript driver](https://github.com/fauna/fauna-js). | ||
|
||
For examples and tutorials, see the [driver | ||
README](<(https://github.com/fauna/fauna-js)>) and the [Fauna | ||
docs](https://docs.fauna.com/fauna/current/build/drivers/js-client/). | ||
|
||
## Important classes and methods | ||
|
||
- [Client](classes/Client.html): Use instances of this class to send requests to Fauna. | ||
- [query()](classes/Client.html#query): Use this method to run queries. | ||
|
||
## All modules | ||
|
||
For all available modules, see [Modules](Modules.html). |
Oops, something went wrong.