有两种方式:
1,直接使用
https://www.npmjs.com/package/jsdoc-to-markdown
2,在工程中使用
在package.json中
"scripts": {
"test": "cross-env NODE_ENV=test jest",
"build": "rm -rf lib && npx babel src -d lib",
"build:docs": "npx jsdoc-to-markdown -f src/**/*.js > docs/okchain-jssdk-doc.md",
"prepublishOnly": "npm run build",
"lint": "eslint --fix src __tests__"
},
"devDependencies": {
"jest": "^23.6.0",
"jsdoc-to-markdown": "^4.0.1",
},