mightycoco / fsdeploy Goto Github PK
View Code? Open in Web Editor NEWVSCode File System Deploy. Auto-deploys a file after saving.
Home Page: https://marketplace.visualstudio.com/items?itemName=mightycoco.fsdeploy
VSCode File System Deploy. Auto-deploys a file after saving.
Home Page: https://marketplace.visualstudio.com/items?itemName=mightycoco.fsdeploy
Hey thanks for writing this extension! I was wondering if there is a way that I can manually run fsdeploy...
use-case: i have a folder that is the source for a bunch of fsdeploy nodes. it's contents get copied to a number of different other directories for sub-projects all under the root directory.
when I add a new one of these sub-projects, i want to populate it with the contents of the source folder so I make a new fsdeploy node for it, but those files won't copy until they are modified and saved.
i'm a VS Code novice, so forgive me if this is already possible in some way that i've overlooked, but if not, it would be really useful for how i intend to use the plugin.
thanks!
Add new menu command, explicitly doing a deleteTarget and deployWorkspace in one go.
Reasonable if you don't want to have the deleteTargetOnDeploy option enabled all the time.
First up, let me just say I like where you're heading with this extension.
(I'm coming to vscode from vim, where I used a similar plugin for copying files to a target directory automatically on save).
Unfortunately, I'm running vscode on a Mac, and it would seem that your extension is assuming Windows paths?
With a config like this:
{
"fsdeploy.nodes": [
{
"source": "/Users/scott/src/",
"target": "/Users/scott/dist/"
}
],
"fsdeploy.deployOnSave": true
}
...if I save a file /Users/scott/src/foo.js
it gets deployed as /Users/scott/dist/\\/Users/scott/src/foo.js
(instead of /Users/scott/dist/foo.js
)
It looks like in your deploy()
function, you are hard coding Windows path separators (\\
):
nodes.forEach((node: fsConfigNode) => {
let subpath: string = path.substr(node.source.length);
let target: string = `${node.target}\\${subpath}`;
mkdirs(target);
fs.copySync(filePath, `${target}\\${fileName}`);
});
Any chance you could fix this so that it works cross-platform?
Hi there. Thanks for this nice and useful extension. I wanted to know if it is possible to setup an array of files inside of the exclude property.
Thanks in advance.
Alex
Getting "Unknown configuration settting" error when placing the config json on settings.json. I am on VS code version 1.10.2
Hi,
Is it possible to control deployment via save method to be optional. Sometimes you need to debug code locally and don't deploy it automatically on each save.
Also does target supports UNC locations?
there is a rmdir method available in the scp api which even supports a recursive delete. Should be easy to implement if required.
Command: 'fsdeploy: Deploy File' resulted in an error (Running the contributed command: 'fsdeploy.deployFile' failed
How to view the logs?
I have added following in settings.json file
"fsdeploy.nodes": [
{
"source":"/Users/user/test1",
"target":"/Users/user/test2",
}
],
"fsdeploy.deployOnSave": true,
"fsdeploy.deployWorkspaceOnSave": false,
I am using this plugin and found it useful, but for one of the case I need to update the file again so that it gets deployed.
consider you are editing a file in different editor and the related project is already opened in visual code. When you switch to visual code the file gets reloaded with the changes but to deploy the file I again have to make some change and save it.
Can this be handled?
Hi,
I am trying to exclude multiple folders:
"fsdeploy.nodes": [
{
"source": ".",
"target": "/Users/em/Desktop/untitled folder/",
"include": "{honeybee_ph,honeybee_energy_ph,honeybee_ph_rhino,honeybee_ph_standards,honeybee_ph_utils,}/**",
"exclude": "{diagrams,docs,tests,}/**",
"deleteTargetOnDeploy": false,
},
but it doesn't seem to be working. Is there an alternative syntax for the 'exclude' field? When I attempt to deploy the workspace with the above, I get a never ending 'Deploying...' popup:
I have tried every combination I can think of and can't determine what is going wrong?
Note, it works great to exclude ONE folder with something like:
"fsdeploy.nodes": [
{
"source": ".",
"target": "/Users/em/Desktop/untitled folder/",
"include": "{honeybee_ph,honeybee_energy_ph,honeybee_ph_rhino,honeybee_ph_standards,honeybee_ph_utils,}/**",
"exclude": "tests/**",
"deleteTargetOnDeploy": false,
},
but how can I exclude more than one?
thanks!
I have just installed this extension to help me with some automatic php file deployment.
When saving a particular file, I only wanted one of the node patterns to be applied to this file (note, I have multiple nodes in my configuration). It seems that the automatic file deploy on save feature does not look at the include / exclude patterns when deploying a file. Is this correct? And if so, is this a conscious design decision?
I have a work-around by putting this particular file in it's own source directory. I was just wondering if the include/exclude could be applied when saving / deploying a single file?
I guess the title is kinda self explaining. Would be a great feature, but i have no clue if this is possible. It would be like like a raid 1.
After reviewing the code and trying it on Windows. It appears it does not currently support relative paths. Our team has different absolute paths and potentially drives on their machines.
I will be submitting a pull request shortly for this.
Deploy on save appears to be broken in the latest version 0.1.12 on OSX e.g.
{ "include":"**/*.*", "source":"/Users/andy/workspace/web/project", "target":"/Users/andy/workspace/containers/vagrant-aws/server-data/www/project" }
The file never gets copied on save. I've reverted back to 0.1.10 and it works again.
This plugin does almost exactly what I need! Thanks for that!
Only a minor thing is missing for my workflow: first remove the target folder before deploying the workspace. Is it possible to add this (under a feature-flag)?
Is there a way to auto-deploy the complete workspace on save?
If not, is there a chance this feature could be implemented?
scp currently only supports username/password autentication where you are left putting your password into the settings.json. The scp api actually supports certificate authentication which would have to be implemented in the client.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.