test-treeshakability.mjs 429 B

1234567891011121314
  1. #!/usr/bin/env zx
  2. import { $ } from 'zx';
  3. // Ensure the code is tree-shakable.
  4. $.stdio = 'inherit';
  5. if ((await $`[[ -f dist/index.browser.js ]]`.exitCode) == 0) {
  6. await $`agadoo dist/index.browser.js`;
  7. }
  8. if ((await $`[[ -f dist/index.node.js ]]`.exitCode) == 0) {
  9. await $`agadoo dist/index.node.js`;
  10. }
  11. if ((await $`[[ -f dist/index.react-native.js ]]`.exitCode) == 0) {
  12. await $`agadoo dist/index.react-native.js`;
  13. }