> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use hooks with dependencies

> Manage dependencies for your hooks, such as compiling Sass files as part of your build.

If you use a specific package in a hook, you may want to manage dependencies for it.
For example, you may want to compile Sass files as part of your build process.
You can set dependencies along with hooks in your [app configuration](/docs/configure-apps/app-reference/single-runtime-image#dependencies).

The following example assumes you have some Sass source files, such as a `index.scss` file.
You also need a script to compile the files, such as the following:

```json package.json theme={null}
{
  "scripts": {
    "build-css": "sass index.scss css/index.css"
  },
}
```

Set your app configuration to have Sass available globally and use it:

```yaml .upsun/config.yaml theme={null}
applications:
  myapp:
    # Ensure sass is available globally
    dependencies:
      nodejs:
        sass: "^1.47.0"

    hooks:
      # Run the script defined in package.json
      build: |
        npm run build-css
```
