Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Merge branch 'docs' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
glowkeeper committed Jan 1, 2021
2 parents f1cadf3 + a4574bc commit 2c68c31
Show file tree
Hide file tree
Showing 72 changed files with 657 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ node_modules/

# npm build output
/dist

# docs
docs/_build
docs/_static
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25 changes: 25 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Minima Documentation

This directory contains documentation for _minima.js_.

The files use [reStructuredText](https://rest-sphinx-memo.readthedocs.io/en/latest/ReST.html), targeted at [sphinx](https://www.sphinx-doc.org/en/master/).

If you do not have sphinx installed, then:

```
pip install sphinx
```

You will also need the sphinx read-the-docs theme:

```
pip install sphinx-rtd-theme
```

Now you can generate the docs:

```
make html
```

That will create a static documentation website in _./build/html_, which you can load into any browser.
69 changes: 69 additions & 0 deletions docs/api/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
##########
Minima API
##########

The Minima API is used to drive MiniDapps.

.. toctree::
:maxdepth: 2
:caption: Top-level API:

top/init.rst
top/notify.rst
top/log.rst
top/cmd.rst
top/sql.rst

.. toctree::
:maxdepth: 2
:caption: Utility API:

util/getBalance.rst
util/getStateVariable.rst
util/checkAllResponses.rst

.. toctree::
:maxdepth: 2
:caption: Form API:

form/getParams.rst
form/params.rst

.. toctree::
:maxdepth: 2
:caption: File API:

file/saveHEX.rst
file/move.rst
file/copy.rst
file/save.rst
file/delete.rst
file/list.rst
file/loadHEX.rst
file/load.rst

.. toctree::
:maxdepth: 2
:caption: Net API:

net/POST.rst
net/start.rst
net/disconnect.rst
net/onOutbound.rst
net/GET.rst
net/connect.rst
net/onInbound.rst
net/stats.rst
net/broadcast.rst
net/stop.rst
net/send.rst
net/info.rst

.. toctree::
:maxdepth: 2
:caption: MiniDapps API:

minidapps/listen.rst
minidapps/list.rst
minidapps/send.rst
minidapps/reply.rst
5 changes: 5 additions & 0 deletions docs/api/file/copy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
file.copy
#########

.. _apiFileCopy:
5 changes: 5 additions & 0 deletions docs/api/file/delete.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###########
file.delete
###########

.. _apiFileDelete:
5 changes: 5 additions & 0 deletions docs/api/file/list.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
file.list
#########

.. _apiFileList:
5 changes: 5 additions & 0 deletions docs/api/file/load.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
file.load
#########

.. _apiFileLoad:
5 changes: 5 additions & 0 deletions docs/api/file/loadHEX.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
############
file.loadHex
############

.. _apiFileLoadHex:
5 changes: 5 additions & 0 deletions docs/api/file/move.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###########
file.move
###########

.. _apiFileMove:
5 changes: 5 additions & 0 deletions docs/api/file/save.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
file.save
#########

.. _apiFileSave:
5 changes: 5 additions & 0 deletions docs/api/file/saveHEX.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
############
file.saveHex
############

.. _apiFileSaveHex:
5 changes: 5 additions & 0 deletions docs/api/form/getParams.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############
form.getParams
##############

.. _apiFormGetParams:
5 changes: 5 additions & 0 deletions docs/api/form/params.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###########
form.params
###########

.. _apiFormParams:
5 changes: 5 additions & 0 deletions docs/api/minidapps/list.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############
minidapps.list
##############

.. _apiMiniDappsList:
5 changes: 5 additions & 0 deletions docs/api/minidapps/listen.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
################
minidapps.listen
################

.. _apiMiniDappsListen:
5 changes: 5 additions & 0 deletions docs/api/minidapps/reply.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###############
minidapps.reply
###############

.. _apiMiniDappsReply:
5 changes: 5 additions & 0 deletions docs/api/minidapps/send.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############
minidapps.send
##############

.. _apiMiniDappsSend:
5 changes: 5 additions & 0 deletions docs/api/net/GET.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#######
net.GET
#######

.. _apiNetGet:
5 changes: 5 additions & 0 deletions docs/api/net/POST.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
########
net.POST
########

.. _apiNetPOST:
5 changes: 5 additions & 0 deletions docs/api/net/broadcast.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#############
net.broadcast
#############

.. _apiNetBroadcast:
5 changes: 5 additions & 0 deletions docs/api/net/connect.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###########
net.connect
###########

.. _apiNetConnect:
5 changes: 5 additions & 0 deletions docs/api/net/disconnect.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############
net.disconnect
##############

.. _apiNetDisconnect:
5 changes: 5 additions & 0 deletions docs/api/net/info.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
########
net.info
########

.. _apiNetInfo:
5 changes: 5 additions & 0 deletions docs/api/net/onInbound.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#############
net.onInbound
#############

.. _apiNetOnInbound:
5 changes: 5 additions & 0 deletions docs/api/net/onOutbound.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
##############
net.onOutbound
##############

.. _apiNetOnOutbound:
5 changes: 5 additions & 0 deletions docs/api/net/send.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
########
net.send
########

.. _apiNetSend:
5 changes: 5 additions & 0 deletions docs/api/net/start.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
net.start
#########

.. _apiNetStart:
5 changes: 5 additions & 0 deletions docs/api/net/stats.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#########
net.stats
#########

.. _apiNetStats:
5 changes: 5 additions & 0 deletions docs/api/net/stop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
########
net.stop
########

.. _apiNetStop:
5 changes: 5 additions & 0 deletions docs/api/top/cmd.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###
cmd
###

.. _apiCmd:
19 changes: 19 additions & 0 deletions docs/api/top/init.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
####
init
####

.. _apiInit:

`Minima.init` must be called **FIRST**. It can be called alone, i.e. `Minima.init()`, or with a callback function that can be used to monitor (and act upon) all Minima events, e.g:

::

Minima.init( function( msg ) {

console.log("Minima event", msg)

if ( msg.event == "connected" ) {

console.log("connected");
}
});
5 changes: 5 additions & 0 deletions docs/api/top/log.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###
log
###

.. _apiLog:
5 changes: 5 additions & 0 deletions docs/api/top/notify.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
######
notify
######

.. _apiNotify:
5 changes: 5 additions & 0 deletions docs/api/top/sql.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###
sql
###

.. _apiSql:
5 changes: 5 additions & 0 deletions docs/api/util/checkAllResponses.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
######################
util.checkAllResponses
######################

.. _apiUtilCheckAllResponses:
5 changes: 5 additions & 0 deletions docs/api/util/getBalance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###############
util.getBalance
###############

.. _apiUtilGetBalance:
5 changes: 5 additions & 0 deletions docs/api/util/getStateVariable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#####################
util.getStateVariable
#####################

.. _apiUtilGetStateVariable:
54 changes: 54 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import sphinx_rtd_theme

# -- Project information -----------------------------------------------------

project = 'minima.js'
copyright = '2020, Minima Global'
author = 'Steve Huckle'
master_doc = 'index'

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_rtd_theme",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
Loading

0 comments on commit 2c68c31

Please sign in to comment.