File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,12 +16,30 @@ _clean_dist:
1616_ clean_dist :
1717 Remove-Item -Path ' packages/*/dist' -Recurse -Force -ErrorAction SilentlyContinue
1818
19- init : _clean_dist
19+ init : _clean_dist _fix_symlinks
2020 cargo binstall watchexec-cli cargo-insta typos-cli cargo-shear dprint taplo-cli -y
2121 node packages/ tools/ src/ index.ts sync-remote
2222 pnpm install
2323 pnpm -C docs install
2424
25+ [unix ]
26+ _ fix_symlinks :
27+ #!/usr/bin/env bash
28+ if [ " $(git config --get core.symlinks)" != " true" ]; then \
29+ echo " Enabling core.symlinks and re-checking out symlinks..." ; \
30+ git config core.symlinks true ; \
31+ git ls-files -s | grep ' ^120000' | cut -f2 | while read -r f; do git checkout -- " $f" ; done; \
32+ fi
33+
34+ [windows ]
35+ _ fix_symlinks :
36+ $symlinks = git config --get core.symlinks; \
37+ if ($symlinks -ne ' true' ) { \
38+ Write-Host ' Enabling core.symlinks and re-checking out symlinks...' ; \
39+ git config core.symlinks true ; \
40+ git ls-files -s | Where-Object { $_ -match ' ^120000' } | ForEach-Object { ($_ -split " `t" , 2 )[1 ] } | ForEach-Object { git checkout -- $_ }; \
41+ }
42+
2543build :
2644 pnpm install
2745 pnpm --filter @rolldown/ pluginutils build
You can’t perform that action at this time.
0 commit comments