Visual Studio Code with sftp plugin upload ignored .git folder and .gitignore file - visual-studio-code

I have this sftp.json file:
{
"name": "projectname",
"remotePath": "/htdocs/",
"host": "myhostdomain",
"protocol": "ftp",
"username": "user",
"password": "pass",
"passive": true,
"watcher": {
"files": "**/*",
"autoUpload": true,
"ignore": [
".vscode",
".git",
".gitignore",
"config.php"
]
}
}
It's really ignore the .vscode folder and config.php file, but not the .git and .gitignore
How can I fix this? The .git folder's changes generate massive network usage.

It's been three years since this question and I'm not sure if anyone still needs this answer.
Since I also fell into the same trap, leaving a possible solution here hoping it helps others. :)
According to the project's wiki page on github
The developer has updated setting field name, So your sftp settings need to be changed to
{
"name": "projectname",
"remotePath": "/htdocs/",
"host": "myhostdomain",
"protocol": "ftp",
"username": "user",
"password": "pass",
"passive": true,
"watcher": {
"files": "**/*",
"autoUpload": true,
},
"remoteExplorer": {
"filesExclude": [
".vscode",
".git",
".gitignore",
"config.php"
]
}
}
I have tried this, and it works for me.

The following configuration is valid for me:
{
"name": "My Server",
"uploadOnSave": true,
"ignore": [
".git",
".gitignore"
]
}

Related

VSCode Multiple-Folder Workspace Search references

Going through a project that start to be quite huge, we've got a workspace with 10+ folders.
Into those 10+ folders we have 9 folders that have the same code base in Node.js & the 10th one that is a private NPM package that we build and that all 9 others rely on.
We're trying to make things easier for all the devs to find some other usage of a function they want to explore and for that, we wanted to be able to find some function references / implementations across all the folders of the workspace.
For instance, if I go in one of the folder, in one of the source file :
and I right-click on the authorize method that is custom and implemented into the NPM private package. If I look up for References I'll get results like this :
But those are only the result of the reference of this method into this folder and not into others project that also use this express middleware.
You can see that I also get the result of the dist folder of the NPM package which seems logical but also seems to be the problem that I am facing.
I don't really know what can also be useful so feel free to ask me any kind of content and find attached the workspace configuration :
{
"folders": [
{
"name": "Docs",
"path": "./repositories/Docs"
},
{
"name": "Frontend",
"path": "./repositories/project_pwa"
},
{
"name": "Service A",
"path": "./repositories/project_A"
},
{
"name": "Service B",
"path": "./repositories/project_B"
},
{
"name": "Project C",
"path": "./repositories/project_C"
},
{
"name": "Project D",
"path": "./repositories/project_D"
},
{
"name": "Project E",
"path": "./repositories/project_E"
},
{
"name": "Project F",
"path": "./repositories/project_F"
},
{
"name": "Project G",
"path": "./repositories/project_G"
},
{
"name": "Project H",
"path": "./repositories/project_H"
},
{
"name": "project I",
"path": "./repositories/project_I"
},
{
"name": "Project J",
"path": "./repositories/project_J"
},
{
"name": "Project K",
"path": "./repositories/project_K"
},
{
"path": "./repositories/project_L",
"name": "Project L"
},
{
"path": ".",
"name": "Master"
}
],
"settings": {
"markdown.extension.print.imgToBase64": true,
"editor.multiCursorModifier": "alt",
"editor.renderWhitespace": "boundary",
"editor.wordWrap": "on",
"diffEditor.ignoreTrimWhitespace": false,
"git.autofetch": true,
"markdown.extension.print.absoluteImgPath": false,
"markdown.extension.print.validateUrls": false,
"markdown.extension.toc.levels": "2..6",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.exclude": {
"node_modules": true,
"dist": true,
"repositories": true
},
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"editor.tabSize": 2,
},
"extensions": {
"recommendations": [
"yzhang.markdown-all-in-one",
"stamminger.vscode-markdown-preview-include",
"DavidAnson.vscode-markdownlint",
"Arjun.swagger-viewer",
"bierner.markdown-checkbox",
"bierner.markdown-mermaid",
"christian-kohler.path-intellisense",
"dbaeumer.vscode-eslint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"FredJeck.fav",
"markvincze.code-fragments",
"mhutchie.git-graph",
"mikeburgh.xml-format",
"ms-vscode.js-debug",
"ms-vscode.references-view",
"ms-vscode.vscode-js-profile-table",
"ms-vsliveshare.vsliveshare",
"redhat.vscode-yaml",
"telesoho.vscode-markdown-paste-image",
"vespa-dev-works.jestRunIt",
"VisualStudioExptTeam.vscodeintellicode"
]
}
}

How to ignore non minified file upload?

I'm using Visual Studio Code with the plugin FTP-KR and I would like to ask a question on the ignore module, I actually have this configuration:
{
"host": "x.x.x.x",
"username": "foo",
"password": "foofoo",
"remotePath": "/public_html/test",
"protocol": "ftp",
"port": 0,
"fileNameEncoding": "utf8",
"autoUpload": true,
"autoDelete": true,
"autoDownload": false,
"ignoreRemoteModification": true,
"ignore": [
".git",
"/.vscode"
]
}
as you can see I setup as ignore the following directories:
.git
./vscode
is possible ignore the javascript file which does not end with .min.js? So all the files that just and with .js?
Kind regards.

sources assets files in js-debug missing with visual studio code on Apache Royale

I use visual studio code and setup it following theses instructions :
https://github.com/apache/royale-asjs/wiki/Visual-Studio-Code
Everythings worked fine.
For now I deleted bin folder in main project, and when launch debug, then bin and js-debug and others stuffs are right generated, but my assets dir with used jpg are not copied.
For exemple in the code I use <j:Image src="assets/logo.png" percentHeight="100"/> but the is no assets/logo.png in js-debug. So I must copy it manualy...
Here is my asconfig.json :
{
"compilerOptions": {
"targets": [
"JSRoyale"
],
"theme": "${royalelib}/themes/JewelTheme/src/main/resources/defaults.css",
//"html-template": "src/main/resources/jewel-example-index-template.html",
"source-map": true,
"source-path": [
"src"
],
},
"files":
[
"src/main/royale/App.mxml"
]
}
and tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"type": "actionscript",
"clean": true,
"problemMatcher": []
},
{
"label": "build",
"type": "actionscript",
"debug": true,
"problemMatcher": []
}
]
}
Could someone tell me how to copy assets folder automatically ?
thanks
Regards
Add to your asconfig.json file:
"copySourcePathAssets": true

How to use multiple tmLanguage files in vscode extension

I am creating a language extension in vscode for myself. Because it will associate with different file types, I plan to make different tmlanguge files for specific rules. According to this, I could extend the scopeName to achieve that.
So I created in my ./package.json files something like this:
{
"name": "tst",
"displayName": "Test Language",
"description": "A test for language extension",
"version": "0.0.1",
"engines": {
"vscode": "^1.34.0"
},
"contributes": {
"languages": [{
"id": "tst",
"aliases": ["Test", "tst"],
"extensions": [".tst",".type1",".type2"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "tst",
"scopeName": "source.tst",
"path": "./syntaxes/tst.tmLanguage.json"
},
{
"scopeName": "source.tst.type1",
"path": "./syntaxes/type1.tmLanguage.json"
},
{
"scopeName": "source.tst.type2",
"path": "./syntaxes/type2.tmLanguage.json"
}]
}
}
Then I create the base rules in ./syntaxes/tst.tmLanguage.json and both .type1 and .type2 have been applied with my grammars.
{
"name": "Test",
"patterns": [
{
"match": "test",
"name": "constant.character"
}
],
"scopeName": "source.tst"
}
Afterwards I also make ./syntaxes/type1.tmLanguage.json something like this:
{
"name": "type1",
"patterns": [
{
"match": "type1",
"name": "constant.language"
}
],
"scopeName": "source.tst.type1"
}
Nothing works for any rules in .type1.
I hope both file in the picture can recognize test and type1.
I checked the vscode pre-installed cpp language extension.
They also use scopeName for source.c and source.c.platform.
I guess it is for the similar purpose?
Did I overlook something?
Thanks for the help.
If you want to use these scopes from different tmLanguage files in the main grammar, you have to explicitly include them:
{
"name": "Test",
"patterns": [
{
"match": "test",
"name": "constant.character"
},
{
"include": "source.tst.type1"
},
{
"include": "source.tst.type2"
}
],
"scopeName": "source.tst"
}
Regarding the built-in cpp extension and platform.tmLanguage.json - as far as I can tell, it's not actively being used by the c and cpp grammars. There's this comment in cpp/build/update-grammars.js:
// `source.c.platform` which is still included by other grammars
So that sounds more like a backwards-compatibility measure in case any third-party grammars still use it.

How do you make a custom task to TFS 2015 on premises avaliable [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have followed multiple guides and created a VSIX for my build steps. I had an admin upload them and install them to my team project collection. The problem is when I look at the build they aren't available to pull in as tasks. What do I need to do to make them show up?
I have attached the screen shot below of it uploaded. And also a redacted copy of my json config files. I have no idea what is wrong. I also tried using the tfx tool to upload it but it is asking for a personal access token.
I don't believe it is available in 2015. I tried using the workaround but fiddler was giving me a bad header error. If anyone can point out my error it would be greatly appreciated.
vss-extension.json
{
"manifestVersion": 1,
"id": "Archive-Source-Task",
"name": "Archive Source",
"public": false,
"version": "1.0.1",
"publisher": "redacted",
"description": "Copy the source",
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"categories": [
"Build and release"
],
"files": [
{
"path": "Task"
},
{
"path": "bin"
}
],
"contributions": [
{
"id": "Archive Source",
"type": "ms.vss-distributed-task.task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "task"
}
}
],
"tags": [
"Build",
"Release",
"Management",
"Utility",
"Tasks"
]
}
task.json
{
"id": "27203bc5-f3f1-4f80-b2ea-8f62dd4790f1",
"name": "Archive Source",
"description": "Copies your source",
"helpMarkDown": "",
"category": "Utility",
"author": "",
"version": {
"Major": 1,
"Minor": 0,
"Patch": 0
},
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"instanceNameFormat": "Archive Source",
"visibility": [
"Build"
],
"execution": {
"PowerShell": {
"target": "$(currentDirectory)\\ArchiveSource.ps1",
"argumentFormat": "",
"workingDirectory": "$(currentDirectory)"
}
}
}
According to the files section in your vss-extension.json file:
"files": [
{
"path": "Task"
},
{
"path": "bin"
}
],
I suspect that the folder you use to place the task files is named as "Task" instead of "task", so in the contribution section, you should also use "Task" in properties:
"contributions": [
{
"id": "Archive Source",
"type": "ms.vss-distributed-task.task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "Task"
}
}
],
When we were using TFS 2015 we deployed our task like described in this article: https://blogs.infosupport.com/custom-build-tasks-in-tfs-2015/
The main difference is that you don't need vss-extension.json and you deploy it with the power shell script that is provided in this link.
Later when we migrated to TFS 2017 we had to change our build tasks to deploy it like you do.