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

Docs fix #10

Merged
merged 2 commits into from
Nov 7, 2018
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
6 changes: 3 additions & 3 deletions build/build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { remove, p, run, files, copy, create } from "./utils";
import { remove, p, run, files, copy, create, copyJson } from "./utils";

async function build() {
try {
Expand All @@ -19,12 +19,12 @@ async function build() {
await copy(p('../tsconfig.json'), p('tmp/tsconfig.json'))
await run('tsc', p('tmp'))
await copy(p('tmp/dist'), p('tmp/node_modules/waves-transactions'))
await copy(p('package.json'), p('tmp/node_modules/waves-transactions/package.json'))
await copyJson(p('../package.json'), p('tmp/node_modules/waves-transactions/package.json'), {main:'index.js', types:'index.d.ts'})
await remove(p('tmp/dist'))
await run('ts-node usage/index.ts', p('tmp'))
await run('typedoc', p('tmp'))
await run('tsc', p('tmp'))
await copy(p('package.json'), p('tmp/dist/package.json'))
await copyJson(p('../package.json'), p('tmp/dist/package.json'), { main: 'index.js', types: 'index.d.ts' })
await copy(p('../README.md'), p('tmp/dist/README.md'))
await copy(p('tmp/dist'), p('../dist'))
await copy(p('tmp/docs'), p('../docs'))
Expand Down
28 changes: 0 additions & 28 deletions build/package.json

This file was deleted.

10 changes: 9 additions & 1 deletion build/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mkdir, readdir } from "fs"
import { mkdir, readdir, readFile, writeFile } from "fs"
import { exec } from "child_process"
import { resolve } from "path"

const ncp = require('ncp').ncp
const rimraf = require('rimraf')

Expand All @@ -20,3 +21,10 @@ export const run = (cmd: string, cwd?: string): Promise<string> =>

export const files = (path: string, filter: (file: string) => boolean = (_) => true): Promise<string[]> =>
new Promise((resolve, reject) => readdir(path, (err, files) => err ? reject(err) : resolve(files.filter(filter))))

export const copyJson = (src: string, dst: string, rewriteFields?: { [key: string]: any }): Promise<void> =>
new Promise(((resolve, reject) => readFile(src, ((err, data) => {
if (err) reject(err)
const modified = { ...JSON.parse(data.toString()), ...rewriteFields };
writeFile(dst, JSON.stringify(modified, null, 2), err => err ? reject(err) : resolve())
}))));
2 changes: 0 additions & 2 deletions docs/enums/transactiontype.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down
391 changes: 64 additions & 327 deletions docs/globals.html

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down Expand Up @@ -200,18 +198,12 @@ <h3 id="transactions">Transactions</h3>
<li class=" tsd-kind-interface">
<a href="interfaces/orderparams.html" class="tsd-kind-icon">Order<wbr>Params</a>
</li>
<li class=" tsd-kind-interface tsd-is-external">
<a href="interfaces/params.html" class="tsd-kind-icon">Params</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/reissueparams.html" class="tsd-kind-icon">Reissue<wbr>Params</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/reissuetransaction.html" class="tsd-kind-icon">Reissue<wbr>Transaction</a>
</li>
<li class=" tsd-kind-interface tsd-is-external">
<a href="interfaces/seedsandindexes.html" class="tsd-kind-icon">Seeds<wbr>And<wbr>Indexes</a>
</li>
<li class=" tsd-kind-interface">
<a href="interfaces/setscriptparams.html" class="tsd-kind-icon">Set<wbr>Script<wbr>Params</a>
</li>
Expand All @@ -236,15 +228,9 @@ <h3 id="transactions">Transactions</h3>
<li class=" tsd-kind-interface">
<a href="interfaces/withsender.html" class="tsd-kind-icon">With<wbr>Sender</a>
</li>
<li class=" tsd-kind-type-alias tsd-is-external">
<a href="globals.html#seedtypes" class="tsd-kind-icon">Seed<wbr>Types</a>
</li>
<li class=" tsd-kind-type-alias">
<a href="globals.html#tx" class="tsd-kind-icon">Tx</a>
</li>
<li class=" tsd-kind-function tsd-is-external">
<a href="globals.html#addproof" class="tsd-kind-icon">add<wbr>Proof</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#alias" class="tsd-kind-icon">alias</a>
</li>
Expand All @@ -257,30 +243,18 @@ <h3 id="transactions">Transactions</h3>
<li class=" tsd-kind-function">
<a href="globals.html#data" class="tsd-kind-icon">data</a>
</li>
<li class=" tsd-kind-function tsd-is-external">
<a href="globals.html#isarrayofseeds" class="tsd-kind-icon">is<wbr>Array<wbr>OfSeeds</a>
</li>
<li class=" tsd-kind-function tsd-is-external">
<a href="globals.html#isseedsandindexes" class="tsd-kind-icon">is<wbr>Seeds<wbr>And<wbr>Indexes</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#issue" class="tsd-kind-icon">issue</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#lease" class="tsd-kind-icon">lease</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-external">
<a href="globals.html#mapseed" class="tsd-kind-icon">map<wbr>Seed</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#masstransfer" class="tsd-kind-icon">mass<wbr>Transfer</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#order" class="tsd-kind-icon">order</a>
</li>
<li class=" tsd-kind-function tsd-is-external">
<a href="globals.html#pullseedandindex" class="tsd-kind-icon">pull<wbr>Seed<wbr>And<wbr>Index</a>
</li>
<li class=" tsd-kind-function">
<a href="globals.html#reissue" class="tsd-kind-icon">reissue</a>
</li>
Expand All @@ -293,12 +267,6 @@ <h3 id="transactions">Transactions</h3>
<li class=" tsd-kind-function">
<a href="globals.html#transfer" class="tsd-kind-icon">transfer</a>
</li>
<li class=" tsd-kind-function tsd-has-type-parameter tsd-is-external">
<a href="globals.html#valordef" class="tsd-kind-icon">val<wbr>OrDef</a>
</li>
<li class=" tsd-kind-function tsd-is-external">
<a href="globals.html#validateparams" class="tsd-kind-icon">validate<wbr>Params</a>
</li>
</ul>
</nav>
</div>
Expand Down
8 changes: 3 additions & 5 deletions docs/interfaces/aliasparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down Expand Up @@ -68,7 +66,7 @@ <h1>Interface AliasParams</h1>
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="params.html" class="tsd-signature-type">Params</a>
<span class="tsd-signature-type">Params</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">AliasParams</span>
Expand Down Expand Up @@ -131,7 +129,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> fee</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">sender<wbr>Public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="params.html">Params</a>.<a href="params.html#senderpublickey">senderPublicKey</a></p>
<p>Inherited from Params.senderPublicKey</p>
<ul>
<li>Defined in generic.ts:4</li>
</ul>
Expand All @@ -142,7 +140,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr
<h3><span class="tsd-flag ts-flagOptional">Optional</span> timestamp</h3>
<div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="params.html">Params</a>.<a href="params.html#timestamp">timestamp</a></p>
<p>Overrides Params.timestamp</p>
<ul>
<li>Defined in transactions/alias.ts:8</li>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions docs/interfaces/aliastransaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down
8 changes: 3 additions & 5 deletions docs/interfaces/burnparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down Expand Up @@ -68,7 +66,7 @@ <h1>Interface BurnParams</h1>
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="params.html" class="tsd-signature-type">Params</a>
<span class="tsd-signature-type">Params</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">BurnParams</span>
Expand Down Expand Up @@ -142,7 +140,7 @@ <h3>quantity</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">sender<wbr>Public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="params.html">Params</a>.<a href="params.html#senderpublickey">senderPublicKey</a></p>
<p>Inherited from Params.senderPublicKey</p>
<ul>
<li>Defined in generic.ts:4</li>
</ul>
Expand All @@ -153,7 +151,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr
<h3><span class="tsd-flag ts-flagOptional">Optional</span> timestamp</h3>
<div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="params.html">Params</a>.<a href="params.html#timestamp">timestamp</a></p>
<p>Overrides Params.timestamp</p>
<ul>
<li>Defined in transactions/burn.ts:9</li>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions docs/interfaces/burntransaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down
8 changes: 3 additions & 5 deletions docs/interfaces/cancelleaseparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down Expand Up @@ -68,7 +66,7 @@ <h1>Interface CancelLeaseParams</h1>
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="params.html" class="tsd-signature-type">Params</a>
<span class="tsd-signature-type">Params</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">CancelLeaseParams</span>
Expand Down Expand Up @@ -131,7 +129,7 @@ <h3>lease<wbr>Id</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">sender<wbr>Public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="params.html">Params</a>.<a href="params.html#senderpublickey">senderPublicKey</a></p>
<p>Inherited from Params.senderPublicKey</p>
<ul>
<li>Defined in generic.ts:4</li>
</ul>
Expand All @@ -142,7 +140,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr
<h3><span class="tsd-flag ts-flagOptional">Optional</span> timestamp</h3>
<div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="params.html">Params</a>.<a href="params.html#timestamp">timestamp</a></p>
<p>Overrides Params.timestamp</p>
<ul>
<li>Defined in transactions/cancel-lease.ts:8</li>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions docs/interfaces/cancelleasetransaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down
2 changes: 0 additions & 2 deletions docs/interfaces/dataentry.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down
8 changes: 3 additions & 5 deletions docs/interfaces/dataparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down Expand Up @@ -68,7 +66,7 @@ <h1>Interface DataParams</h1>
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="params.html" class="tsd-signature-type">Params</a>
<span class="tsd-signature-type">Params</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">DataParams</span>
Expand Down Expand Up @@ -120,7 +118,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> fee</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">sender<wbr>Public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="params.html">Params</a>.<a href="params.html#senderpublickey">senderPublicKey</a></p>
<p>Inherited from Params.senderPublicKey</p>
<ul>
<li>Defined in generic.ts:4</li>
</ul>
Expand All @@ -131,7 +129,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr
<h3><span class="tsd-flag ts-flagOptional">Optional</span> timestamp</h3>
<div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="params.html">Params</a>.<a href="params.html#timestamp">timestamp</a></p>
<p>Overrides Params.timestamp</p>
<ul>
<li>Defined in transactions/data.ts:13</li>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions docs/interfaces/datatransaction.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down
8 changes: 3 additions & 5 deletions docs/interfaces/issueparams.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
Expand Down Expand Up @@ -68,7 +66,7 @@ <h1>Interface IssueParams</h1>
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="params.html" class="tsd-signature-type">Params</a>
<span class="tsd-signature-type">Params</span>
<ul class="tsd-hierarchy">
<li>
<span class="target">IssueParams</span>
Expand Down Expand Up @@ -175,7 +173,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> reissuable</h3>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr>Key</h3>
<div class="tsd-signature tsd-kind-icon">sender<wbr>Public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="params.html">Params</a>.<a href="params.html#senderpublickey">senderPublicKey</a></p>
<p>Inherited from Params.senderPublicKey</p>
<ul>
<li>Defined in generic.ts:4</li>
</ul>
Expand All @@ -186,7 +184,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> sender<wbr>Public<wbr
<h3><span class="tsd-flag ts-flagOptional">Optional</span> timestamp</h3>
<div class="tsd-signature tsd-kind-icon">timestamp<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<p>Overrides <a href="params.html">Params</a>.<a href="params.html#timestamp">timestamp</a></p>
<p>Overrides Params.timestamp</p>
<ul>
<li>Defined in transactions/issue.ts:12</li>
</ul>
Expand Down
Loading