JavaScript build hooks
Run custom JavaScript build scripts
Airplane allows you to run custom build scripts before and after dependencies are installed. This
lets you to customize your task's environment and perform additional setup steps your tasks may
require.
Build hooks in airplane.yaml
configuration file
Build hooks in
airplane.yaml
configuration fileThe simplest place to specify build hooks is in the
airplane.yaml
configuration file.yamlCopied1# airplane.yaml23javascript:4nodeVersion: "18"5preinstall: echo "preinstall"6postinstall: echo "postinstall"
Build hook files
Build hook files
You can also specify build hooks in their own files. This is useful for writing more complex build
hooks that span multiple lines.
-
To run a script before dependency installation, create a file with the name
airplane_preinstall.sh
in the root directory of your project. -
To run a script after dependency installation, create a file with the name
airplane_postinstall.sh
in the root directory of your project.
Airplane runs your custom build scripts as executables.