You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why a .vscodeignore file? Use the files property instead #12
Where .vscodeignore is a blacklist of files that should not be installed, the files property is a whitelist of files that should be installed.
In my opinion, it would be way better to use the files property. Node package developers (should) already know about this setting and no extra file is used.
Yes, blacklisting is error prone: whenever I add another file to my project that should not end up in the extension, I have to add it to the .vscodeignore. It would be much simpler to have a whitelist (BOM).
Even though Bower is somewhat dead already, I do like how it does component referencing in old days. When you try to install bower packages, it will save the package in bower_components and inject the main js file of the newly added component to your index.html. Meanwhile you can specific a mapping for the bower components like below
This way you can specific which file is the main file for each component if you don't like the default one bower picks for you. If we can similar experience, I don't need to write any glob expressions in the vscodeignore file as it's always difficult to say which files are necessary and which are not in each npm_component folder.
Another thing is, we can always put debugger, code snippet or linters together in one extension, which means there might be multiple entry points for a single extension. In this case, we can't merge all javascript code to one file.
Above is just my draft idea and it should be carefully reconsidered, but I think a workable solution for now adding some grunt/gulp sample to the yeoman generator?
Neither vsce nor its source code look like the files section of package.json is respected.
Do you still plan to support both?
I prefer whitelists to blacklists too, as they explicitly state what is being included and what not.
Besides, I know what I want to include, but I don't know all the temp/dev files various tools create that I don't want to include.
Reacted by Dave, Steve Baker, Sam Verschueren, Kirill Pertsev, Dario Vladović, Daniel Bayley, Loren ☺️, dbreese and Zhennan LI
This might be incredibly ignorant or shortsighted of me, but would ignoring everything and unignoring what you want, accomplish the same thing?
VS Code Ignore
# Ignore everything
*
# Whitelist what you need
!.vscodeignore
!src/*
Reacted by Tam Jordan, Steve Baker, Carl Mueller-Roemer, Roman Nuritdinov, James Greenaway, Dario Vladović, Roman Lo, Loris Bettazza, Charles, Gesugao-san and 12 more
Reacted by AxelEric, Toby Cm, Juan Campa and Zhennan LI
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
Activity
joaomoreno commentedon Oct 19, 2015
We'll just support both.
SamVerschueren commentedon Oct 19, 2015
That would be great!
weinand commentedon Nov 11, 2015
Yes, blacklisting is error prone: whenever I add another file to my project that should not end up in the extension, I have to add it to the
.vscodeignore. It would be much simpler to have a whitelist (BOM).felixfbecker commentedon Jan 17, 2016
There is also
.npmignoreunional commentedon Jan 30, 2016
Should the
.vscodeignorefile includesREADME.mdby default?rebornix commentedon Jun 2, 2016
Put my thoughts here and hope it help :)
Even though Bower is somewhat dead already, I do like how it does component referencing in old days. When you try to install bower packages, it will save the package in
bower_componentsand inject the main js file of the newly added component to yourindex.html. Meanwhile you can specific a mapping for the bower components like belowThis way you can specific which file is the main file for each component if you don't like the default one bower picks for you. If we can similar experience, I don't need to write any glob expressions in the vscodeignore file as it's always difficult to say which files are necessary and which are not in each npm_component folder.
Another thing is, we can always put debugger, code snippet or linters together in one extension, which means there might be multiple entry points for a single extension. In this case, we can't merge all javascript code to one file.
Above is just my draft idea and it should be carefully reconsidered, but I think a workable solution for now adding some grunt/gulp sample to the yeoman generator?
hediet commentedon Dec 11, 2016
Neither vsce nor its source code look like the
filessection ofpackage.jsonis respected.Do you still plan to support both?
I prefer whitelists to blacklists too, as they explicitly state what is being included and what not.
Besides, I know what I want to include, but I don't know all the temp/dev files various tools create that I don't want to include.
selvinortiz commentedon Mar 12, 2017
This might be incredibly ignorant or shortsighted of me, but would ignoring everything and unignoring what you want, accomplish the same thing?
VS Code Ignore
weinand commentedon Mar 12, 2017
Selvin Ortiz (@selvinortiz) yes, that approach works fine. I'm using it here: https://github.com/Microsoft/vscode-mono-debug/blob/master/.vscodeignore
selvinortiz commentedon Mar 12, 2017
Andre Weinand (@weinand) Cool. I guess most people would say that it's not the most elegant solution?!
adamvoss commentedon Jun 5, 2017
Selvin Ortiz (@selvinortiz) Semantics are different from .gitignore. You need the following for the ignore part:
joaomoreno commentedon Sep 20, 2018
This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!
gjsjohnmurray commentedon Jun 7, 2021
Andre Weinand (@weinand) wrote:
I just discovered that 1.92 broke this technique. See #576
Seems it's not going to be reinstated 😞
danielbayley commentedon Sep 6, 2023
João Moreno (@joaomoreno) So why does the
package.jsonfilesproperty not work, as it should?To clarify, Sam Verschueren (@SamVerschueren) Andre Weinand (@weinand) Selvin Ortiz (@selvinortiz) Adam Voss (@adamvoss) John Murray (@gjsjohnmurray), and for anyone else running into this… The following
.vscodeignoredoes work: