Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds automatic documentation generation #287

Merged
merged 1 commit into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ jobs:
paths:
- ./*

generate_documentation:
executor: base-executor
working_directory: *sdk_working_dir
steps:
- attach_workspace: *attach_options
- run: cd ../docs && ./generate_documentation.sh
- persist_to_workspace:
root: ~/src/
paths:
- ./raiden-dapp/dist/docs

deploy_gh_pages:
executor: base-executor
working_directory: *dapp_working_dir
Expand Down Expand Up @@ -164,10 +175,17 @@ workflows:
requires:
- lint_dapp
- build_dapp
- deploy_gh_pages:
- generate_documentation:
requires:
- test_dapp
filters:
branches:
only:
- master
- deploy_gh_pages:
requires:
- generate_documentation
filters:
branches:
only:
- master
17 changes: 17 additions & 0 deletions docs/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const sidebar = require('./api-sidebar');

module.exports = {
title: 'Raiden Light Client SDK',
description: 'API Documentation for the Raiden Light Client SDK',
base: '/docs/',
themeConfig: {
repo: 'raiden-network/light-client',
displayAllHeaders: true,
sidebar: sidebar,
lastUpdated: 'Last Updated',
nav: [
{ text: 'Raiden Network', link: 'https://raiden.network/' },
{ text: 'Developer Portal', link: 'https://developer.raiden.network/' }
]
}
};
28 changes: 28 additions & 0 deletions docs/generate_documentation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

cd ../raiden-ts

if [[ -d './docs' ]]
then
rm -rf docs
fi

npm run docs:generate

[[ -d 'docs/.vuepress' ]] || mkdir docs/.vuepress
[[ -d 'docs/.vuepress/styles' ]] || mkdir docs/.vuepress/styles

cp ../docs/config.js docs/.vuepress/config.js
cp ../docs/palette.styl docs/.vuepress/styles/palette.styl

npm run docs:build

if [[ ! -d '../raiden-dapp/dist/' ]]
then
echo 'The dApp dist directory was not available'
exit 1;
fi

[[ ! -d '../raiden-dapp/dist/docs' ]] || rm -rf ../raiden-dapp/dist/docs

cp -r docs/.vuepress/dist ../raiden-dapp/dist/docs
1 change: 1 addition & 0 deletions docs/palette.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$accentColor = #28a5c8
1 change: 1 addition & 0 deletions raiden-ts/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ contracts/

*.vim
.localstorage
docs
Loading