swc-project / pkgs

node.js packages for SWC
49 stars 15 forks source link

Add more CLI option shortcuts #39

Open caribou-code opened 4 months ago

caribou-code commented 4 months ago

I'm finding SWC CLI commands can get very long, which is awkward when they're defined in a package.json script such as:

"scripts": {
  "swc": "swc src -d dist --strip-leading-paths --delete-dir-on-start",
}

It would be great to have shortcuts for at least the 2 longer flags above. Could be an acronym to avoid using up options that might be useful elsewhere. e.g.

swc src -d dist -slp -ddon

I'm happy to put in a PR for this but wanted to check opinions first.