ide-deploy-config
v1.1.0
Published
Set JetBrains IDE deployment config from config file.
Downloads
15
Readme
ide-deploy-config
Ease set / switch deployment config for JetBrains IDE from config file using node CLI.
Tested on:
- PhpStorm 2016.2 @ macOS Sierra 10.12.1
- PhpStorm 2016.2 @ Windows 10
- WebStorm 2016.3 @ macOS Sierra 10.12.1
Help with testing! Write if it's works or not works in you system.
Install
Require Node.js.
$ npm install ide-deploy-config -g
Usage
Init project with IDE
.idea
folder must be created in project root.
Configure server in IDE
- Go to
Tools - Deployment - Configuration
and create server - Set
Name
for server and access data:FTP host
,Port
,Root path
,Username
,Password
It's all. Mappings and excluded paths will be configured with script.
Create config .json file
Buy default script search deploy-config.json
in project root. You can specify path to config file.
$ cd my-project
$ touch deploy-config.json
Also you can run ide-deploy-config init
for create config file.
Content of deploy-config.json
:
{
"dev": {
"serverName": "serverName",
"autoUpload": "Always",
"autoUploadExternalChanges": true,
"mappings": [
{
"deploy": "/",
"local": "$PROJECT_DIR$",
"web": "/"
}
],
"excludedLocal": [
"$PROJECT_DIR$/.idea",
"$PROJECT_DIR$/bower_components",
"$PROJECT_DIR$/node_modules",
"$PROJECT_DIR$/deploy-config.json"
],
"excludedServer": [
"/uploads/"
]
},
"production": {
"serverName": "anotherServerName",
"autoUpload": "Always",
"autoUploadExternalChanges": true,
"mappings": [
{
"deploy": "/",
"local": "$PROJECT_DIR$",
"web": "/"
}
],
"excludedLocal": [
"$PROJECT_DIR$/.idea",
"$PROJECT_DIR$/bower_components",
"$PROJECT_DIR$/node_modules",
"$PROJECT_DIR$/deploy-config.json"
],
"excludedServer": [
"/uploads/"
]
}
}
Set serverName
that exist in IDE deployment configuration.
Set / switch deployment configuration
Go to project root and run script:
Usage
$ ide-deploy-config
$ ide-deploy-config <env>
$ ide-deploy-config <env> <path to config>
Example
$ ide-deploy-config // set first deployment configuration from deploy-config.json
$ ide-deploy-config production // set 'production' deployment configuration from deploy-config.json
$ ide-deploy-config stage configs/deploy.json // set 'stage' deployment configuration from configs/deploy.json
Changelog
1.1.0
- Set default
notifyRemoteChanges: true
1.0.0
- Rewrite to ES6
- Add multiple mappings config instead serverPath and localPath options.
Breaking change
License
MIT