rainlab / deploy-plugin

A simple way to deploy your application to a remote location.
Other
16 stars 15 forks source link

Filter deployment bundles using .gitignore #12

Closed daftspunk closed 2 years ago

daftspunk commented 3 years ago

Sending dev resources such as .git and node_modules is not necessary during deployment so they should be filtered out. This will help with the archive file size.

Hlusta commented 3 years ago

I would love to use this feature too.

daftspunk commented 2 years ago

Solved in v1.1.1 and should be available soon. Note it requires the latest v2 core (v2.1.20)


Using .deployignore to Ignore Files

There are times when you don't want specific files to be deployed, such as the node_modules directory used in plugins and themes. This is possible by creating a .deployignore file in the base directory of your plugin or theme. This file behaves the same as .gitignore file where you can configure Git to ignore files you don't want to check in.

The following .deployignore file will exclude the node_modules directory:

node_modules/

The file must be located at the base directory of the theme or plugin. For example:

Hlusta commented 2 years ago

Thank you!