Skip to content

Commit

Permalink
Added debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaid committed Jan 31, 2019
1 parent da4c671 commit b5c3e23
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 2 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"jsdoc-export-default-interop": "^0.3.1",
"node-exec-promise": "^1.0.2",
"tmp-promise": "^1.0.5",
"tsd-jsdoc": "^2.1.2"
"tsd-jsdoc": "^2.1.2",
"debug": "^4.1.1"
},
"peerDependencies": {
"webpack": "^4.28.0"
Expand All @@ -52,4 +53,4 @@
"webpack-cli": "^3.2.1",
"webpack-config-jaid": "1.22.0"
}
}
}
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {exec} from "node-exec-promise"
import readPkgUp from "read-pkg-up"
import {isObject} from "lodash"

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

const webpackId = "JsdocTsdWebpackPlugin"

const getHtmlConfigPath = async (compilation, configBase, template, options, configDir) => {
Expand Down Expand Up @@ -161,7 +163,9 @@ export default class {
getTsdConfigPath(compilation, configBase, tsdModulePath, this.options, tempDir),
])

const jsdocJobs = [htmlConfigPath, tsdConfigPath].map(configPath => exec(`node "${jsdocPath}" --configure "${configPath}"`))
const jsdocCommands = [htmlConfigPath, tsdConfigPath].map(configPath => `${process.execPath} "${jsdocPath}" --configure "${configPath}"`)
debug("JSDoc commands", jsdocCommands)
const jsdocJobs = jsdocCommands.map(command => exec(command))

const jsdocResults = await Promise.all(jsdocJobs)

Expand Down

0 comments on commit b5c3e23

Please sign in to comment.