Skip to content

Commit

Permalink
feat(jsx/tsx): add ability to document .jsx and .tsx (React JSX) files (
Browse files Browse the repository at this point in the history
  • Loading branch information
narration-sd authored and ph1p committed Feb 18, 2019
1 parent ebf62c4 commit db628ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules
node_modules
# for Jetbrains IDEA ides
.idea
4 changes: 2 additions & 2 deletions cmds/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const { checkExtension, getFilename } = require('../helpers/utils');

const fileTree = [];

const extensions = ['.ts', '.js', '.vue'];
const extensions = ['.ts', '.js', '.tsx', '.jsx', '.vue'];

/**
* Default command that generate md files
Expand Down Expand Up @@ -142,7 +142,7 @@ async function generate(argv, ctx) {
mdFileData = await vuedoc.md({
filename: `${folder}/${file}`
});
} else if (/\.(js|ts)$/.test(file) && fileData) {
} else if (/\.(js|ts|jsx|tsx)$/.test(file) && fileData) {
const configPath = argv.jsDocConfigPath;

try {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuepress-jsdoc",
"version": "1.4.0",
"version": "1.4.1",
"description": "Generate jsdoc markdown files for vuepress",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit db628ce

Please sign in to comment.