Skip to content

Commit

Permalink
fix: Fixed TypeScript export transforming
Browse files Browse the repository at this point in the history
Signed-off-by: Jaid <[email protected]>
  • Loading branch information
Jaid committed Jul 1, 2019
1 parent 19a58f3 commit c4a5fe9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import fss from "@absolunet/fss"

import transformTsd from "./transformTsd"

const debug = require("debug")("jsdoc-tsd-webpack-plugin")
const debug = require("debug")(_PKG_NAME)

const webpackId = "JsdocTsdWebpackPlugin"

Expand Down Expand Up @@ -173,7 +173,7 @@ export default class {
root: compiler.context,
comments: true,
envName: "development",
...(isObject(this.options.babel) ? this.options.babel : undefined),
...isObject(this.options.babel) ? this.options.babel : undefined,
}
configBase.babel = babelConfig
}
Expand Down
2 changes: 1 addition & 1 deletion src/transformTsd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const moduleBlockRegex = /(declare module [^\n]+)(.+?)(\n})/gs
const moduleFieldRegex = /^([\t ]*)(type|function|interface|var|const|class) +(a-zA-Z0-9_\$+)/gm
const moduleFieldRegex = /^([\t ]*)(type|function|interface|var|const|class) +([\w$]+)/gm

const debug = require("debug")("jsdoc-tsd-webpack-plugin")

Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {CleanWebpackPlugin} from "clean-webpack-plugin"
import PublishimoWebpackPlugin from "publishimo-webpack-plugin"
import fsp from "@absolunet/fsp"

const indexModule = (process.env.MAIN ? path.resolve(__dirname, "..", process.env.MAIN) : path.join(__dirname, "..", "src"))
const indexModule = process.env.MAIN ? path.resolve(__dirname, "..", process.env.MAIN) : path.join(__dirname, "..", "src")
const {default: JsdocTsdWebpackPlugin} = require(indexModule)

jest.setTimeout(60 * 1000)
Expand Down

0 comments on commit c4a5fe9

Please sign in to comment.