Skip to content

Commit 8e83013

Browse files
committed
chore: update dependencies and documentation
1 parent 1452e46 commit 8e83013

File tree

11 files changed

+1267
-1275
lines changed

11 files changed

+1267
-1275
lines changed

example/package-lock.json

Lines changed: 412 additions & 438 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
"vuepress": "^1.8.2"
1818
},
1919
"devDependencies": {
20-
"@babel/cli": "^7.14.8",
21-
"@babel/core": "^7.15.0",
20+
"@babel/cli": "^7.15.7",
21+
"@babel/core": "^7.15.5",
2222
"@babel/plugin-proposal-class-properties": "^7.14.5",
23-
"@babel/preset-env": "^7.15.0",
23+
"@babel/preset-env": "^7.15.6",
2424
"@babel/preset-typescript": "^7.15.0",
2525
"concurrently": "^6.2.1",
2626
"jsdoc-babel": "^0.5.0",
2727
"jsdoc-to-markdown": "^7.0.1",
28-
"typescript": "^4.4.2"
28+
"typescript": "^4.4.3"
2929
}
3030
}

package-lock.json

Lines changed: 793 additions & 793 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"prepublishOnly": "npm i && npm run build",
1414
"prepare": "husky install",
1515
"version": "conventional-changelog -p karma -i CHANGELOG.md -s -r 0 && git add .",
16-
"docs": "npx vuepress-jsdoc --source=./dist --partials=./example/partials/*.hbs --readme ./README.md --exclude=\"**/*.d.ts,**/interfaces.*,**/constants.*,**/cmds.*\"",
17-
"docs:dev": "npm run docs && npx vuepress dev documentation",
16+
"docs": "./bin/vuepress-jsdoc.js --source=./dist --partials=./example/partials/*.hbs --readme ./README.md --exclude=\"**/*.d.ts,**/interfaces.*,**/constants.*\"",
17+
"docs:dev": "npx concurrently --kill-others \"npm run dev\" \"npm run docs && npx vuepress dev documentation\"",
1818
"docs:build": "npm run build && npm run docs && npx vuepress build documentation"
1919
},
2020
"keywords": [
@@ -81,34 +81,34 @@
8181
"dependencies": {
8282
"chalk": "^4.1.2",
8383
"chokidar": "^3.5.2",
84-
"commander": "^8.1.0",
84+
"commander": "^8.2.0",
8585
"del": "^6.0.0",
8686
"front-matter": "^4.0.2",
8787
"jsdoc-to-markdown": "^7.0.1",
8888
"micromatch": "^4.0.4",
8989
"mkdirp": "^1.0.4",
90-
"vue-docgen-cli": "^4.41.1"
90+
"vue-docgen-cli": "^4.41.2"
9191
},
9292
"devDependencies": {
9393
"@types/jest": "^27.0.1",
9494
"@types/jsdoc-to-markdown": "^7.0.1",
9595
"@types/micromatch": "^4.0.2",
9696
"@types/mkdirp": "^1.0.2",
97-
"@typescript-eslint/eslint-plugin": "^4.30.0",
98-
"@typescript-eslint/parser": "^4.30.0",
99-
"babel-jest": "^27.1.0",
97+
"@typescript-eslint/eslint-plugin": "^4.31.1",
98+
"@typescript-eslint/parser": "^4.31.1",
99+
"babel-jest": "^27.2.0",
100100
"cross-env": "^7.0.3",
101101
"eslint": "^7.32.0",
102102
"eslint-config-prettier": "^8.3.0",
103103
"eslint-plugin-import": "^2.24.2",
104-
"eslint-plugin-jest": "^24.4.0",
104+
"eslint-plugin-jest": "^24.4.2",
105105
"eslint-plugin-prefer-arrow": "^1.2.3",
106106
"husky": "^7.0.2",
107-
"jest": "^27.1.0",
107+
"jest": "^27.2.0",
108108
"lint-staged": "^11.1.2",
109-
"memfs": "^3.2.3",
109+
"memfs": "^3.3.0",
110110
"ts-jest": "^27.0.5",
111-
"typescript": "^4.4.2"
111+
"typescript": "^4.4.3"
112112
},
113113
"lint-staged": {
114114
"src/**/*.{css,scss,json}": [

src/cmds.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1+
/*
2+
* @vuepress
3+
* ---
4+
* headline: cmds.ts
5+
* ---
6+
*/
17
import { program } from 'commander';
28

39
import { generate } from '.';
410

11+
/**
12+
* This method builds the cli interface and is necessary because
13+
* we need the version from the package.json here. We do not import
14+
* this here, because otherwise the folder structure in the dist folder would get mixed up.
15+
* @param {string} version a version string
16+
*/
517
export default (version: string) => {
618
program.version(version).description('a CLI Tool to generate markdown files for vuepress');
719

src/index.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { generateVueSidebar } from './lib/vue-sidebar';
2121

2222
/**
2323
* Create the sidebar
24-
* @param options {object}
24+
* @param {object} options
2525
* @returns {Promise}
2626
*/
2727
const createVuepressSidebar = options =>
@@ -37,8 +37,8 @@ const createVuepressSidebar = options =>
3737

3838
/**
3939
* Parse file
40-
* @param file {DirectoryFile}
41-
* @param argv {CLIArguments}
40+
* @param {DirectoryFile} file
41+
* @param {CLIArguments} argv
4242
* @returns {Promise}
4343
*/
4444
const parseDirectoryFile = async (file: DirectoryFile, argv: CLIArguments) => {
@@ -59,6 +59,12 @@ const parseDirectoryFile = async (file: DirectoryFile, argv: CLIArguments) => {
5959
}
6060
};
6161

62+
/**
63+
* Create the readme file. First page when entering the documentation.
64+
* @param {CLIArguments} argv
65+
* @param {string} deletedPaths
66+
* @returns {void}
67+
*/
6268
const createReadmeFile = async (argv: CLIArguments, deletedPaths?: string[]) => {
6369
const { srcFolder, codeFolder, docsFolder, title, readme } = parseArguments(argv);
6470

@@ -83,7 +89,7 @@ const createReadmeFile = async (argv: CLIArguments, deletedPaths?: string[]) =>
8389

8490
/**
8591
* Parse all CLI arguments
86-
* @param argv {CLIArguments}
92+
* @param {CLIArguments} argv
8793
* @returns {object} all arguments
8894
*/
8995
const parseArguments = (argv: CLIArguments) => {
@@ -189,7 +195,7 @@ export const generate = async (argv: CLIArguments) => {
189195

190196
/**
191197
* Watch files in source folder
192-
* @param argv {CLIArguments}
198+
* @param {CLIArguments} argv
193199
*/
194200
const watchFiles = (argv: CLIArguments) => {
195201
const { exclude, srcFolder, codeFolder, docsFolder, title } = parseArguments(argv);
@@ -234,8 +240,8 @@ const watchFiles = (argv: CLIArguments) => {
234240

235241
/**
236242
* The vuepress plugins
237-
* @param argv {CLIArguments}
238-
* @param ctx {object}
243+
* @param {CLIArguments} argv
244+
* @param {object} ctx
239245
* @returns {object}
240246
*/
241247
const plugin = (argv: CLIArguments, ctx) => ({

src/lib/comment-parser.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { DirectoryFile } from '../interfaces';
1010

1111
/**
1212
* Search in file for @vuepress comment
13-
* @param fileContent {string} content of given file
13+
* @param {string} fileContent content of given file
1414
* @returns {object} object of found frontmatter data
1515
*/
1616
export const parseComment = (fileContent: string) => {
@@ -46,8 +46,8 @@ export const parseComment = (fileContent: string) => {
4646

4747
/**
4848
* Helper function to get header as structured markdown
49-
* @param content {string} file content
50-
* @param file {object} file object
49+
* @param {string} content file content
50+
* @param {object} file file object
5151
* @returns {string} markdown header
5252
*/
5353
export const parseVuepressFileHeader = (content: string, file: DirectoryFile) => {

src/lib/list-folder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import { DirectoryFile, FileTree } from '../interfaces';
1212

1313
/**
1414
* Recursively traverse folders and return exluded files, a file list and a file tree.
15-
* @param srcPath {string} path to source dir
16-
* @param exclude {array} exluded file patter list
17-
* @param mainPath {string} path to hold source dir
18-
* @param tree {object} tree array
15+
* @param {string} srcPath path to source dir
16+
* @param {array} exclude exluded file patter list
17+
* @param {string} mainPath path to hold source dir
18+
* @param {object} tree tree array
1919
* @returns {object} paths array, tree, excluded array
2020
*/
2121
export const listFolder = async (srcPath: string, exclude: string[] = [], mainPath?: string, tree: FileTree[] = []) => {

src/lib/parser.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ export const parseFile = async (
9191

9292
/**
9393
* Parse a vue file
94-
* @param file {DirectoryFile}
95-
* @param srcFolder {string}
96-
* @param destFolder {string}
94+
* @param {DirectoryFile} file
95+
* @param {string} srcFolder
96+
* @param {string} destFolder
9797
* @returns {object} file data
9898
*/
9999
export const parseVueFile = async (
@@ -153,8 +153,8 @@ export const parseVueFile = async (
153153

154154
/**
155155
* Write content on disk
156-
* @param parseData {ParseReturn | null}
157-
* @param dest {string}
156+
* @param {ParseReturn | null} parseData
157+
* @param {string} dest
158158
* @returns {Promise | null} null or type with some data of the saved file
159159
*/
160160
export const writeContentToFile = async (parseData: ParseReturn | null, dest: string) => {

src/lib/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
*/
77
/**
88
* Get extension of file
9-
* @param path {string}
9+
* @param {string} path
1010
* @returns {string} extension of file
1111
*/
1212
export const getExtension = (path: string) => path.substring(path.length, path.lastIndexOf('.'));
1313

1414
/**
1515
* Check if extension ist correct
16-
* @param path {string}
17-
* @param extensions {string[]}
16+
* @param {string} path
17+
* @param {string[]} extensions
1818
* @returns {boolean}
1919
*/
2020
export const checkExtension = (path: string, extensions: string[]) => extensions.indexOf(getExtension(path)) >= 0;
2121

2222
/**
2323
* Get filename without extension
24-
* @param path {string}
24+
* @param {string} path
2525
* @returns {string} filename
2626
*/
2727
export const getFilename = (path: string) =>

0 commit comments

Comments
 (0)