Skip to content

Commit

Permalink
Merge 6f40f95 into 83e169e
Browse files Browse the repository at this point in the history
  • Loading branch information
yusefnapora committed Feb 10, 2017
2 parents 83e169e + 6f40f95 commit e11711d
Show file tree
Hide file tree
Showing 23 changed files with 974 additions and 220 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ lib/
*.sublime-workspace

bin/jq

# generated documentation
docs/dist/
13 changes: 13 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

REPO_ROOT=$(git rev-parse --show-toplevel)
THIS_DIR="${REPO_ROOT}/docs"
NODE_MODULES="${REPO_ROOT}/node_modules"
JSDOC="${NODE_MODULES}/.bin/jsdoc"
TEMPLATE="${NODE_MODULES}/ink-docstrap/template"
SOURCE="${REPO_ROOT}/src"
README="${REPO_ROOT}/README.md"
OUTPUT_DIR="${THIS_DIR}/dist"
CONFIG="${THIS_DIR}/jsdoc-conf.json"

cd ${REPO_ROOT} && ${JSDOC} -c ${CONFIG} -r ${SOURCE} -d ${OUTPUT_DIR} -t ${TEMPLATE} -R ${README}
7 changes: 7 additions & 0 deletions docs/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

REPO_ROOT=$(git rev-parse --show-toplevel)
THIS_DIR="${REPO_ROOT}/docs"
OUTPUT_DIR="${THIS_DIR}/dist"

rm -rf "${OUTPUT_DIR}"
8 changes: 8 additions & 0 deletions docs/jsdoc-conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": ["plugins/markdown", "node_modules/jsdoc-babel"],
"templates": {
"systemName": "Mediachain (aleph)",
"includeDate": false,
"theme": "lumen"
}
}
13 changes: 13 additions & 0 deletions docs/publish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env node

const ghpages = require('gh-pages')
const path = require('path')

ghpages.publish(path.join(__dirname, 'dist'), (err) => {
if (err) {
console.error('Error updating gh-pages branch:', err)
process.exit(1)
}

console.log('Done updating gh-pages branch')
})
122 changes: 0 additions & 122 deletions docs/schema-generation.md

This file was deleted.

58 changes: 16 additions & 42 deletions npm-shrinkwrap.json

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

17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
"coverage": "nyc report --reporter=text-lcov | coveralls",
"coverage:lcov": "npm run test && nyc report --reporter=lcov",
"build": "mkdirp ./lib && babel --copy-files src -d lib",
"check": "standard && flow",
"check": "npm run check:style && npm run check:types",
"check:style": "standard",
"check:types": "flow",
"cli": "npm run build >/dev/null && node ./lib/client/cli/index.js",
"prepublish": "npm run build"
"prepublish": "npm run build",
"docs": "npm run docs:build && npm run docs:publish && npm run docs:clean",
"docs:build": "./docs/build.sh",
"docs:publish": "node ./docs/publish.js",
"docs:clean": "./docs/clean.sh"
},
"bin": {
"aleph": "./bin/aleph.js",
Expand Down Expand Up @@ -83,7 +89,11 @@
"coveralls": "^2.11.15",
"eslint-plugin-flowtype": "^2.30.0",
"flow-bin": "^0.38.0",
"gh-pages": "^0.12.0",
"ink-docstrap": "^1.3.0",
"interface-connection": "^0.3.0",
"jsdoc": "^3.4.3",
"jsdoc-babel": "^0.3.0",
"mocha": "^3.2.0",
"mocha-eventually": "^1.1.0",
"mocha-lcov-reporter": "^1.2.0",
Expand All @@ -97,7 +107,8 @@
"flowtype"
],
"ignore": [
"/flow-typed/**"
"/flow-typed/**",
"/docs/**"
]
},
"nyc": {
Expand Down
Loading

0 comments on commit e11711d

Please sign in to comment.