Skip to content

Commit 8e1808b

Browse files
committed
feat(docs): Experiment with doc generation
1 parent 80a8017 commit 8e1808b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

core/scripts/docs.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const doc = require('jsdoc-to-markdown');
2+
const path = require('path');
3+
const process = require('process');
4+
const fs = require('fs-extra');
5+
6+
doc.render({
7+
files: path.resolve(process.cwd(), './core/lib/patternlab.js')
8+
}).then((x) => {
9+
fs.outputFile(path.resolve(process.cwd(), './docs/README.md'), x);
10+
});

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"eslint": "3.5.0",
27+
"jsdoc-to-markdown": "^3.0.0",
2728
"rewire": "2.5.2",
2829
"tap": "7.1.2"
2930
},
@@ -56,6 +57,7 @@
5657
],
5758
"license": "MIT",
5859
"scripts": {
60+
"docs": "node ./core/scripts/docs.js",
5961
"lint": "eslint core/**/*.js",
6062
"pretest": "npm run lint",
6163
"test": "tap test/*_tests.js --reporter spec --coverage"

0 commit comments

Comments
 (0)