Symlink static assets in sites/assets/<app>/
This commit is contained in:
parent
f564435084
commit
59249c421d
|
@ -47,8 +47,7 @@ let
|
|||
|
||||
frappeApp = mkApp "frappe" frappeSrc frappeOfflineCache;
|
||||
erpnextApp = mkApp "erpnext" erpnextSrc erpnextOfflineCache;
|
||||
|
||||
assets = runCommand "frappe-erpnext-assets" {buildInputs = [yarn]; } ''
|
||||
in runCommand "frappe-erpnext-apps-sites" {buildInputs = [yarn]; } ''
|
||||
mkdir -p $out/share/sites $out/share/apps
|
||||
|
||||
# Cannot symlink because the code which traverses path to find sites
|
||||
|
@ -62,7 +61,12 @@ let
|
|||
EOF
|
||||
|
||||
cd $out/share/apps/frappe
|
||||
pwd
|
||||
yarn --offline production
|
||||
'';
|
||||
in assets
|
||||
|
||||
symlinkPublic() {
|
||||
find $out/share/apps/$1/$1/public -type d -mindepth 1 -maxdepth 1 | xargs -I '{}' bash -c "ln -s {} $out/share/sites/assets/$1/"'$(basename {})'
|
||||
}
|
||||
|
||||
symlinkPublic frappe
|
||||
symlinkPublic erpnext
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue