Skip to content

Commit 0d3507d

Browse files
committed
Added option "babel"
1 parent 2513d8c commit 0d3507d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export default class {
5656
jsdocHtmlConfig: {},
5757
jsdocTsdConfig: {},
5858
productionOnly: true,
59+
babel: false,
5960
...options,
6061
}
6162
}
@@ -124,6 +125,7 @@ export default class {
124125
"tsd-jsdoc/dist",
125126
"better-docs",
126127
"jsdoc-export-default-interop/dist/index.js",
128+
"jsdoc-babel/lib/index.js",
127129
].map(async file => {
128130
const possiblePaths = [
129131
path.resolve(compiler.context, "node_modules", file),
@@ -138,10 +140,14 @@ export default class {
138140
return foundFile
139141
})
140142

141-
const [jsdocPath, tsdModulePath, htmlModulePath, exportDefaultModulePath] = await Promise.all(findModulesJobs)
143+
const [jsdocPath, tsdModulePath, htmlModulePath, exportDefaultModulePath, jsdocBabelPath] = await Promise.all(findModulesJobs)
142144

143145
configBase.plugins = [exportDefaultModulePath]
144146

147+
if (this.options.babel) {
148+
configBase.plugins.push(jsdocBabelPath)
149+
}
150+
145151
if (!this.options.tsdOutputFile) {
146152
const tsdFileName = path.basename(compilation.chunks[0].files[0], ".js")
147153
this.options.autoTsdOutputFile = path.join(tempDir, `${tsdFileName}.d.ts`)

test/index.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import path from "path"
22

33
import webpack from "webpack"
44
import pify from "pify"
5-
import loadJsonFile from "load-json-file"
65
import CleanWebpackPlugin from "clean-webpack-plugin"
76
import PublishimoWebpackPlugin from "publishimo-webpack-plugin"
87

webpack.config.babel.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ import webpackConfigJaid from "webpack-config-jaid"
22

33
export default webpackConfigJaid({
44
type: "libClass",
5-
include: [
6-
"license.*",
7-
"readme.md",
8-
],
95
publishimo: {
106
publishimoOptions: {
117
fetchGithub: true,

0 commit comments

Comments
 (0)