Skip to content

Commit

Permalink
feat(c8): formatted the config file better by using the config-file p…
Browse files Browse the repository at this point in the history
…lugin
  • Loading branch information
travi committed Jul 28, 2022
1 parent a3bacd6 commit e70baeb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/coverage/c8/scaffolder-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ suite('c8 scaffolder', () => {
JSON.stringify({
reporter: ['lcov', 'text-summary', 'html'],
exclude: ['src/**/*-test.js', 'test/', 'thirdparty-wrappers/', 'vendor/']
})
}, null, 2)
);
});
});
15 changes: 9 additions & 6 deletions src/coverage/c8/scaffolder.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import {promises} from 'fs';
import {write} from '@form8ion/config-file';
import {fileTypes} from '@form8ion/core';

export default async function ({projectRoot}) {
await promises.writeFile(
`${projectRoot}/.c8rc.json`,
JSON.stringify({
await write({
name: 'c8',
format: fileTypes.JSON,
path: projectRoot,
config: {
reporter: ['lcov', 'text-summary', 'html'],
exclude: ['src/**/*-test.js', 'test/', 'thirdparty-wrappers/', 'vendor/']
})
);
}
});

return {
devDependencies: ['cross-env', 'c8'],
Expand Down

0 comments on commit e70baeb

Please sign in to comment.