Skip to content

Commit ef33572

Browse files
author
eden
committed
chore: update docs
1 parent b2ea526 commit ef33572

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
# cert-helper
1+
# Cert Helper
22

33
Install and trust certificates automatically. Very useful in the use of agent software scenarios.
44

55
## Usage
66

7+
### Install
8+
9+
```sh
10+
npm i cert-helper
11+
```
12+
713
### install certificate
814

915
Install certification as root certificate
1016

1117
```js
12-
const { certInstaller } = require("cert-helper");
13-
certInstaller(path.resolve("./certs/root.crt"), err => {
18+
const { certInstaller } = require('cert-helper');
19+
certInstaller(path.resolve('./certs/root.crt'), (err) => {
1420
if (err) {
1521
//install error
1622
} else {
@@ -24,18 +30,18 @@ certInstaller(path.resolve("./certs/root.crt"), err => {
2430
Check certificate is installed
2531

2632
```js
27-
const { certVerify } = require("cert-helper");
33+
const { certVerify } = require('cert-helper');
2834
certVerify(
2935
{
30-
certDir: path.resolve("./certs/root.crt"),
31-
certName: "certificate name"
36+
certDir: path.resolve('./certs/root.crt'),
37+
certName: 'certificate name',
3238
},
3339

34-
err => {
40+
(err) => {
3541
if (err) {
36-
console.info("Check cert failed!");
42+
console.info('Check cert failed!');
3743
} else {
38-
console.info("Check cert success!");
44+
console.info('Check cert success!');
3945
}
4046
}
4147
);

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"lint:style": "stylelint --fix src/**/*.{less,scss,css}",
9-
"lint:js": "eslint --fix src --ext .js,.jsx"
8+
"lint:style": "stylelint --fix lib/**/*.{less,scss,css}",
9+
"lint:js": "eslint --fix lib --ext .js,.jsx"
1010
},
1111
"repository": {
1212
"type": "git",

0 commit comments

Comments
 (0)