Skip to content

Commit

Permalink
Merge pull request #1093 from OzzieOrca/patch-1
Browse files Browse the repository at this point in the history
Add env variable to disable transpiling with typescript
  • Loading branch information
orta committed Jan 4, 2021
2 parents a461e43 + f82e1f7 commit 3a90dec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

<!-- Your comment below this -->

- Add `DANGER_DISABLE_TSC` environment variable to disable transpiling with tsc, providing a way to force transpiling
with Babel - [@ozzieorca]
- Adds options `--newComment` and `--removePreviousComments` - [@davidhouweling]
- Add support for a file path filter when calculation lines of code - [@melvinvermeer]

Expand Down
3 changes: 2 additions & 1 deletion source/runner/runners/utils/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const enum BabelPackagePrefix {
}

const disableTranspilation = process.env.DANGER_DISABLE_TRANSPILATION === "true"
const disableTsc = process.env.DANGER_DISABLE_TSC === "true"

let hasNativeTypeScript = false
let hasBabel = false
Expand All @@ -30,7 +31,7 @@ export const checkForNodeModules = () => {

try {
require.resolve("typescript") // tslint:disable-line
hasNativeTypeScript = true
hasNativeTypeScript = true && !disableTsc
} catch (e) {
d("Does not have TypeScript set up")
}
Expand Down

0 comments on commit 3a90dec

Please sign in to comment.