This repository has been archived by the owner on Aug 31, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 39
folder_mappings
Marcel Kloubert edited this page Jun 30, 2018
·
6 revisions
Home >> Targets >> Folder mappings
In the following example, all files inside /dist
folder of the workspace will be deployed to /my_package_files
of the FTP server instead of /my_package_files/dist
.
{
"deploy": {
"targets": [
{
"type": "ftp",
"host": "ftp.example.com", "port": 21,
"user": "mkloubert", "password": "P@assword123!",
"dir": "/my_package_files",
"mappings": {
"/dist/**/*": "/"
}
}
]
}
}
You also can use an object with settings:
{
"deploy.reloaded": {
"targets": [
{
// ...
"dir": "/my_package_files",
"mappings": {
"/dist/**/*": {
"to": "/"
}
}
}
]
}
}
Name | Description |
---|---|
to |
The directory on the target machine. |
If you set useFastGlob
setting to (true)
, you have to change the upper example a little bit, because the underlying fast-glob module, which is a very fast alternative to node-glob, works a little bit different:
{
"deploy": {
"targets": [
{
// ...
"mappings": {
"dist": "/",
"dist/**/*": "/"
}
}
]
}
}
Do not use leading /
patterns.
If you want to map an entier directory, you have to additionally specify the directory itself.