Adds Explorer context actions:
DW: Upload Selected FileDW: Download Selected FileDW: Upload Selected FolderDW: Download Selected Folder
What it runs
Upload:
dw env <env-name> && dw files ./DWProject.Files/Files/path/to/file.ext /path/to --import --overwrite --createEmpty
Upload folder:
dw env <env-name> && dw files ./DWProject.Files/Files/path/to/folder /path/to --import --overwrite --createEmpty --asDirectory
Download:
dw env <env-name> && dw files /path/to/file.ext ./DWProject.Files/Files/path/to --export --overwrite
Download folder:
dw env <env-name> && dw files /path/to/folder ./DWProject.Files/Files/path/to --export --overwrite --asDirectory
The file paths are generated from the selected file.
Settings
Configure .vscode/dw-files.json:
{
"activeProfile": "staging",
"context": "DWProject.Files/Files",
"ignore": [
"Files/Integration/jobs",
"System/Log",
"System/Repositories",
"System/SmartSearches",
"System/LiveIntegration",
"/.vscode",
"/.git",
"/.cache",
"GlobalSettings.*",
"*.license",
".DS_Store",
"*.gz",
"*.log",
"_parsed",
"Cache.net"
],
"profiles": [
{
"name": "staging",
"env": "dw-staging",
"uploadOnSave": true
},
{
"name": "production",
"env": "dw-production",
"uploadOnSave": false
}
]
}
context: workspace-relative folder that acts as local root (shared by all profiles).ignore: glob-like patterns checked against context-relative paths (leading/means workspace-root path); shared by all profiles.profiles: array of upload profiles.profiles[].name: profile name shown in the profile picker.profiles[].env: Dynamicweb environment name used bydw env.profiles[].uploadOnSave: whentrue, saving an eligible file automatically runs upload using this profile when it is active.activeProfile: optional default profile used byDW: Upload Selected Fileand auto-upload on save.
Context menu commands:
DW: Upload Selected File: uploads usingactiveProfile(or first profile if not set).DW: Download Selected File: downloads usingactiveProfile(or first profile if not set).DW: Upload Selected Folder: uploads folder(s) usingactiveProfileand--asDirectory.DW: Download Selected Folder: downloads folder(s) usingactiveProfileand--asDirectory.DW: Upload Selected File (Choose Profile): lets you pick any configured profile at upload time.
How to use
- Start the launch profile
VS Code: DW Upload Extension. - In the Extension Development Host window, right-click a file or folder under your configured
contextpath. - Click the matching upload/download command for file or folder.
The command runs in an integrated terminal named DW Upload.
Publish packaging
One-time setup:
npm install -g @vscode/vsce
Login to VS Marketplace publisher:
vsce login carrot-solutions-pty-ltd
When prompted, paste your Azure DevOps Personal Access Token (PAT).
Create the extension package (.vsix):
vsce package
Optional publish command:
vsce publish