Skip to main content

What is the squarecloud.ignore file?

The squarecloud.ignore file defines which files and folders should be excluded when you upload or deploy an application. It works with the Square Cloud VS Code extension and the Square Cloud CLI. Its syntax is similar to a .gitignore file, so you can use comments, patterns, directory rules and negation rules.

Creating the file

Create a file named squarecloud.ignore in the root of your project.
The file must be named exactly squarecloud.ignore

Syntax

Each line is a rule. A matching file or folder is excluded from the deployment.
Use / for directory separators in patterns, including on Windows.

Common examples

Exclude development tools, generated files and local secrets while keeping production files in the deployment:

How it is applied

The VS Code extension and the CLI read squarecloud.ignore when preparing the files for upload or deployment. Files that match an ignore rule are left out of the content sent to the production environment. Keep files required at runtime, such as the MAIN file from your configuration, outside the ignored paths.