-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(babel-istanbul): stopped including the plugin since it is not ne…
…eded with c8
- Loading branch information
Showing
6 changed files
with
7 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import {promises as fsPromises} from 'fs'; | ||
|
||
export default async function ({projectRoot, preset, tests, buildDirectory}) { | ||
export default async function ({projectRoot, preset, buildDirectory}) { | ||
if (!preset) { | ||
throw new Error('No babel preset provided. Cannot configure babel transpilation'); | ||
} | ||
|
||
await fsPromises.writeFile( | ||
`${projectRoot}/.babelrc`, | ||
JSON.stringify({ | ||
presets: [preset.name], | ||
ignore: [`./${buildDirectory}/`], | ||
...tests.unit && {env: {test: {plugins: ['istanbul']}}} | ||
}) | ||
JSON.stringify({presets: [preset.name], ignore: [`./${buildDirectory}/`]}) | ||
); | ||
|
||
return { | ||
devDependencies: [ | ||
'@babel/register', | ||
preset.packageName, | ||
...tests.unit ? ['babel-plugin-istanbul'] : [] | ||
], | ||
devDependencies: ['@babel/register', preset.packageName], | ||
eslint: {} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters