Skip to content

Commit

Permalink
feat: updates CLI docs adding new strip-leading-paths parameter (#235)
Browse files Browse the repository at this point in the history
Update cli.mdx

Related to [this PR](swc-project/cli#283)
This PR introduces the `strip-leading-paths` command to the `cli`. 
This was a recent change and was undocumented in the docs, but very important.
  • Loading branch information
abnersajr authored Jan 28, 2024
1 parent 4ec78fd commit 790194c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pages/docs/usage/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,11 @@ npx swc input.js --log-watch-compilation
### --extensions

Use specific extensions.

### --strip-leading-paths

Remove the leading directory (including all parent relative paths) when building the final output path. As an example it compiles all modules under `src` folder to `dist` folder, without create the `src` folder inside of `dist`.

```sh
npx swc src -d dist --strip-leading-paths
```

1 comment on commit 790194c

@vercel
Copy link

@vercel vercel bot commented on 790194c Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.