The .Esadaxignore file is a powerful tool for managing deployments on Esadax. It allows you to specify which files and directories should be excluded during the deployment process.
Overview
The .Esadaxignore file works similarly to a .gitignore file but is specific to Esadax. By placing this file in your project's root directory, you can exclude certain files and directories from being uploaded or served on Esadax.
How It Works
- Default Exclusions: All files are excluded by default unless specified otherwise.
- Including Files: To include a file or directory, add its name prefixed with
!in the.Esadaxignorefile. - Structure: The file should be placed at the root level of your project.
Example Usage
To exclude specific files and directories:
.Esadaxignore image private.html
This will prevent the /image directory and /private.html file from being uploaded.
Advanced Use Cases
- Allowing Specific Files: Add
!file_nameto allow a specific file. - Combining Rules: Use multiple lines to create complex rules.
Ignoring All Files: Start with /* to ignore all files in the root directory.
.Esadaxignore /*
Monorepos and Workflows
- In a monorepo, the
.Esadaxignorefile at the project root takes precedence over any other configuration. - If no
.Esadaxignoreis found, Esadax uses the one at the root level.
Best Practices
- Security: Use it to protect sensitive files like
private.html. - Efficiency: Upload only necessary files, reducing deployment size and improving speed.
- Compliance: Ensure compliance with specific project requirements by excluding unnecessary files.
By leveraging the .Esadaxignore file, you can streamline your deployment process while keeping your project secure and efficient.
