mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-27 11:55:22 +00:00
prettier-plugin-svelte: skip npm prune step; remove redundant build deps
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I296b2b0b59f6eaec0563c97c011d4a356a6a6964
This commit is contained in:
parent
cf9d76b52c
commit
e1340c0aeb
1 changed files with 7 additions and 6 deletions
|
|
@ -17,11 +17,12 @@ in
|
|||
|
||||
npmDepsHash = "sha256-XVyLW0XDCvZCZxu8g1fP7fRfeU3Hz81o5FCi/i4BKQw=";
|
||||
|
||||
# FIXME: this probably also copies over build dependencies.
|
||||
# Look at how other prettier plugins in nixpkgs do things. I couldn't get it to work
|
||||
# and am out of time so good luck :)
|
||||
preInstall = ''
|
||||
mkdir -p $out/lib
|
||||
cp -r node_modules $out
|
||||
dontNpmPrune = true;
|
||||
|
||||
# Fixes error: Cannot find module 'prettier'
|
||||
postInstall = ''
|
||||
pushd "$nodeModulesPath"
|
||||
find -mindepth 1 -maxdepth 1 -type d -print0 | grep --null-data -Exv "\./(ulid|prettier)" | xargs -0 rm -rfv
|
||||
popd
|
||||
'';
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue