Extend SAC shell to install and compile frontend

This commit is contained in:
Daniel Siepmann 2022-06-02 08:30:31 +02:00
parent 6dbc2011dc
commit 8c129b7fa9
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -29,6 +29,31 @@ let
"$PROJECT_ROOT/vendor/bin/phpstan"
'';
};
reinstallFrontend = pkgs.writeShellApplication {
name = "compileFrontend";
runtimeInputs = [
pkgs.nodejs-14_x
pkgs.nodePackages.npm
];
text = ''
rm -rf "$PROJECT_ROOT/frontend/build/*"
npm ci --prefix="$PROJECT_ROOT/frontend/"
'';
};
compileFrontend = pkgs.writeShellApplication {
name = "compileFrontend";
runtimeInputs = [
pkgs.nodejs-14_x
pkgs.nodePackages.npm
];
text = ''
npm run build --prefix="$PROJECT_ROOT/frontend"
notify-send "Done compiling frontend"
'';
};
in pkgs.mkShell {
name = "TYPO3";
buildInputs = [
@ -36,6 +61,8 @@ in pkgs.mkShell {
pkgs.php74Packages.composer
projectCsFixer
projectPhpStan
reinstallFrontend
compileFrontend
];
shellHook = ''