rspack icon indicating copy to clipboard operation
rspack copied to clipboard

Refactor: unify task script

Open hardfist opened this issue 2 years ago • 1 comments

we're using makefile、js scritps、shell、xtask to manual tasks and it's kind of messy and cause confusions for outside contributors, so we should unify all the task scripts. there are some requirements for task scripts:

  • cross platform compatible
  • easy to maintain
  • easy to debug

there are some options now:

  • https://github.com/google/zx
  • npm scripts
  • js scripts
  • shell

hardfist avatar Mar 15 '23 03:03 hardfist

Rome uses https://github.com/casey/just.

This looks kind of nice: https://github.com/rome/tools/blob/main/justfile

Boshen avatar Mar 15 '23 03:03 Boshen

Hi,

For the calls to './x' would it make sense to replace them by 'node x' or it causes trouble ? I can open a PR for it if it makes sense to you

zakuru avatar Mar 31 '23 00:03 zakuru

Hi,

For the calls to './x' would it make sense to replace them by 'node x' or it causes trouble ? I can open a PR for it if it makes sense to you

Thanks for bringing this up. We are going to remove ./x soon/next week, which causes many cross-platform problems and so on. We would switch to npm scripts + zx to have consistent experiences for any platform.

hyf0 avatar Mar 31 '23 02:03 hyf0

Hi,

For the calls to './x' would it make sense to replace them by 'node x' or it causes trouble ? I can open a PR for it if it makes sense to you

Thanks for bringing this up. We are going to remove ./x soon/next week, which causes many cross-platform problems and so on. We would switch to npm scripts + zx to have consistent experiences for any platform.

Super 👌 Thanks

zakuru avatar Mar 31 '23 03:03 zakuru

Sync up:

The Rspack team has met many problems with the current workflows.

After some discussions, the team decided to use zx and npm scripts to unity current scripts(runner).

hyf0 avatar Apr 03 '23 06:04 hyf0

Closed by

  • https://github.com/web-infra-dev/rspack/pull/2754
  • https://github.com/web-infra-dev/rspack/pull/2840
  • https://github.com/web-infra-dev/rspack/pull/2756

hyf0 avatar Apr 21 '23 02:04 hyf0