fixed some description error

pull/21/head
Wen Zhang 5 years ago committed by Ganesha Upadhyaya
parent bb9a818295
commit ff6c207e9e
  1. 45
      docs/README.md

@ -4,26 +4,33 @@
# metaDocumentation
## Summary
The following content demonstrate how to generate our documentations!
The following content demonstrate how to generate our documentation!
## Step 1: Generating Documentation
## Step 1: Generate Documentation
### Introduction of TypeDoc
[TypeDoc is used to generate HTML](https://typedoc.org/api/index.html)
> See [TypeDoc command line arguments](https://typedoc.org/guides/options/), to understand how to use them.
> Using `typedoc --help` to see them
>
> For example:
> **For example:**
> `typedoc --name <Name>` to set the name of header
> `typedoc --theme <default | minimal | path/to/theme>` to set the theme of documation
> `typedoc --readme <path/to/readme | none>` path to readme file that should be displayed on the index page.
> `typedoc --ignoreCompilerErrors` Should TypeDoc generate documentation pages even after the compiler has returned errors?
### Install the global cli
### Install TypeDoc
Local installation (prefered)
```
npm install --global typedoc
$ npm install typedoc --save-dev
```
### Generating HTML
Golbal CLI installation
```
$ npm install --global typedoc
```
### Generate HTML
```
cd docs
@ -37,9 +44,9 @@ typedoc --out ./transaction ../packages/harmony-transaction/ --ignoreCompilerErr
typedoc --out ./utils ../packages/harmony-utils/ --ignoreCompilerErrors
```
### Runing an simpleHTTPServer to test it
### Run a simpleHTTPServer to test it
```
python3 -m http.server 8000
$ python3 -m http.server 8000
```
Then View the documentation generated at http://localhost:8000
>http://localhost:8000/core/index.html
@ -52,29 +59,28 @@ http://localhost:8000/transaction/index.html
http://localhost:8000/utils/index.html
## Step 2: Deploy them on AWS
## Step 2: Deploy on AWS (harmony core only!)
### Create an AWS s3 bucket
Actually, there are just two points need to do!
Actually, there are just two points needed!
1. Create an AWS S3 bucket, **UNCHECK** `Block all public access`
2. Put the files into that bucket, and set the **public permission** to `Grant public read access to this object(s)`
2. Put the files into the bucket, and set the **public permission** to `Grant public read access to this object(s)`
### Method 1: Using Console
### Method 1: Use Console
Here is the documentation of AWS, just follow it!
https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html
[Here](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) is the documentation of AWS, just follow it!
>Don't forget the two points mentioned above
### Method 2: Using AWS CLI
### Method 2: Use AWS CLI
Reference: [AWS CLI documentation](https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html)
If you have never used aws CLI, you need follow these two steps to set up your environment first!
If you have never used AWS CLI, you need follow these to set up your environment first!
- [Install the AWS CLI version 1](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html)
- [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)
After that, we can used AWS CLI to do these jobs
After that, use AWS CLI to do following
1. Create a Bucket
```
@ -90,6 +96,7 @@ aws s3 ls
```
aws s3 cp ./account s3://harmony-js-sdk-doc --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --recursive
```
Here is some explanations
> **./account**
> the path of folder which we want to upload
>
@ -102,8 +109,8 @@ aws s3 cp ./account s3://harmony-js-sdk-doc --grants read=uri=http://acs.amazona
> **--recursive**
> Command is performed on all files or objects under the specified directory or prefix.
4. Open the folder in S3 bucket and find the `index.html`, get the
`Object URL` and share it to public!
1. Open the folder in S3 bucket and find `index.html`, get the
`Object URL`, then make it public!
Loading…
Cancel
Save