test-treeshakability.mjs 435 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.mjs ]]`.exitCode) == 0) {
  6. await $`agadoo dist/index.browser.mjs`;
  7. }
  8. if ((await $`[[ -f dist/index.node.mjs ]]`.exitCode) == 0) {
  9. await $`agadoo dist/index.node.mjs`;
  10. }
  11. if ((await $`[[ -f dist/index.react-native.mjs ]]`.exitCode) == 0) {
  12. await $`agadoo dist/index.react-native.mjs`;
  13. }