load-nyc-config-sync.js 376 B

1234567891011121314151617181920
  1. #!/usr/bin/env node
  2. 'use strict';
  3. const {
  4. loadNycConfig
  5. } = require('@istanbuljs/load-nyc-config');
  6. async function main() {
  7. const [cwd, nycrcPath] = process.argv.slice(2);
  8. console.log(JSON.stringify(await loadNycConfig({
  9. cwd,
  10. nycrcPath
  11. })));
  12. }
  13. main().catch(error => {
  14. console.log(JSON.stringify({
  15. 'load-nyc-config-sync-error': error.message
  16. }));
  17. });