Skip to content

Commit 8a6bcc1

Browse files
zone117xMary Anthony
authored andcommitted
Generate dist script file usage with a cdn and the subresource integrity hash
Add docs. Add version back into the title Add in explainer for CDN to README and overview Remove spaces from test Signed-off-by: Mary Anthony <[email protected]>
1 parent 3391c0c commit 8a6bcc1

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22

33
Note: If you're looking for the Blockstack CLI repo it was merged with [Blockstack Core](https://github.com/blockstack/blockstack-core).
44

5-
- [Installation](#installation)
6-
- [About](#about)
7-
- [Auth](https://blockstack.github.io/blockstack.js/index.html#authentication)
8-
- [Profiles](https://blockstack.github.io/blockstack.js/index.html#profiles)
9-
- [Storage](https://blockstack.github.io/blockstack.js/index.html#storage)
10-
- [Documentation](#documentation)
11-
- [Compatibility](#compatibility)
12-
- [Contributing](#contributing)
13-
- [Maintainer](#maintainer)
14-
- [Testing](#testing)
15-
- [Releasing](#releasing)
5+
- [blockstack.js ![CircleCI](https://circleci.com/gh/blockstack/blockstack.js/tree/master) ![npm](https://www.npmjs.com/package/blockstack) ![npm](https://www.npmjs.com/package/blockstack) ![npm](https://www.npmjs.com/package/blockstack) ![Slack](http://slack.blockstack.org/)](#blockstackjs-circlecihttpscirclecicomghblockstackblockstackjstreemaster-npmhttpswwwnpmjscompackageblockstack-npmhttpswwwnpmjscompackageblockstack-npmhttpswwwnpmjscompackageblockstack-slackhttpslackblockstackorg)
6+
- [Installation](#installation)
7+
- [About](#about)
8+
- [Documentation](#documentation)
9+
- [Compatibility](#compatibility)
10+
- [Contributing](#contributing)
11+
- [Maintainer](#maintainer)
12+
- [Testing](#testing)
13+
- [Testing in a browser](#testing-in-a-browser)
14+
- [Releasing](#releasing)
1615

1716
## Installation
1817

19-
$ npm install blockstack
18+
```
19+
$ npm install blockstack
20+
```
21+
22+
You can import `blockstack.js` as a script without using a package manager. To securely use the latest distribution of blockstack.js from a CDN, add [this script declaration](mdincludes/include:script-dist-file.md) in your application.
23+
2024

2125
## About
2226

overview.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# blockstack.js Reference Library
1+
# Using the library
22

33
This reference describes the Blockstack Javascript Software Developer Kit (SDK) reference. For complete Blockstack documentation, see [docs.blockstack.org](https://docs.blockstack.org/). There is also reference material available for both the [iOS SDK](https://blockstack.github.io/blockstack-ios/) and [Android SDK](https://blockstack.github.io/blockstack-android/).
44

@@ -9,7 +9,7 @@ This reference describes the Blockstack Javascript Software Developer Kit (SDK)
99
$ npm install blockstack
1010

1111

12-
## Application Quickstart
12+
## Quickstart: Build an application
1313

1414
1. Install `blockstack.js` with `npm`.
1515

@@ -81,3 +81,9 @@ This reference describes the Blockstack Javascript Software Developer Kit (SDK)
8181
can be fetched via an http `GET` from any origin.
8282
8383
7. Serve your application
84+
85+
## Add the library without a package manager
86+
87+
You can import `blockstack.js` as a script without using a package manager. To securely use the latest distribution of `blockstack.js` from a CDN, add the following `script` declaration in your application.
88+
89+
[[include:script-dist-file.md]]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"dev-proofs": "npm run build:webpack && ts-node ./tests/browserTests/proofs-server.ts",
1919
"prepublishOnly": "npm run test && npm run build",
2020
"lint": "eslint --ext .ts ./src",
21-
"build-documentation": "shx rm -rf docs && typedoc --tsconfig tsconfig.typedoc.json --out docs src && typedoc --tsconfig tsconfig.typedoc.json --json docs/docs.json src",
21+
"build-documentation": "shx rm -rf docs && cross-env typedoc --name \"blockstack.js $npm_package_version Library Reference\" --tsconfig tsconfig.typedoc.json --out docs src && cross-env typedoc --name \"blockstack.js $npm_package_version Library Reference\" --tsconfig tsconfig.typedoc.json --json docs/docs.json src",
2222
"tsc": "tsc",
2323
"codecovUpload": "codecov"
2424
},

tsconfig.typedoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"src",
1414
],
1515
"typedocOptions": {
16-
"name": "blockstack.js Library Reference",
1716
"readme": "overview.md",
1817
"mode": "file",
1918
"excludePrivate": true,
2019
"excludeProtected": true,
2120
"excludeExternals": true,
21+
"includes" : "mdincludes"
2222
"includeDeclarations": false,
2323
"gitRevision": "master",
2424
"listInvalidSymbolLinks": true,

0 commit comments

Comments
 (0)