I'm trying to configure a VSCode's setting that define a list of directories to exclude from a glob pattern.
Here is the default setting: {node_modules,doc,docs,.bundle,vendor}/**.
I would like to be able to exclude the directory node_modules excepts the following subfolders: animate.css and bootstrap.
I tried this {node_modules/!(animate.css|bootstrap),doc,docs,.bundle,vendor}/** but looks like the whole node_modules directory is not excluded anymore...
Thank you for any help!
Related
Prettier is using fast-glob to resolve glob patterns to match the files to format. I would like to include all the files in the current directory but the ones ending with either .php or .html.
I've tried several patterns but none of them is working:
**/*.[^php,html]
**/*.!{php,html}
How can I achieve this behavior?
You can use this pattern:
**/!(*.php|*.html)
Is it possible to specify a list of files or directories that one would like copied to the _site directory? I would like to copy those files as is, in the way the webpack-copy-plugin lets one use webpack to copy files from on place to another.
The files I want to copy are in _includes, in case this complicates things. I know I could make a top level directory in my project for these files I want copied to _site, but I want to keep things tidy and place everything in _includes (Jekyll already makes lots of files and folders in my project root, and I don't want any more).
I tried specifying the value for include in _config.yml, but this doesn't seem to be copying file to _site.
Any suggestions others can offer would be helpful!
Curious, specifying in _config.yml:
include:
- _includes
Copies over everything from _includes, while specifying:
include:
- _includes/assets
does not copy over anything. I'll just use the former.
How can I have one .hgignore file include another .hgignore file by using a relative path?
The include methodology that I know (include:<path-to-hgignore>) requires <path-to-hgignore> to be rooted.
e.g., If I have the following files:
.hgignore
hgignore/all.hgignore
hgignore/eclipse.hgignore
hgignore/idea.hgignore
e.g., the following include in my root .hgignore works:
include:hgignore/all.hgignore
The only includes that I could get to work from inside all.hgignore had to be rooted, e.g.:
include:hgignore/eclipse.hgignore
include:hgignore/idea.hgignore
Trying to include any of the following paths from inside all.hgignore always results in No such file or directory errors:
include:eclipse.hgignore
include:./eclipse.hgignore
include:/eclipse.hgignore
Is there anything like the following that would work from inside all.hgignore?
include-relative:eclipse.hgignore
I have a folder structure like this
ProjectX
.......|_____node_modules
.......|_____src
.......|_____build
.......|_____app
.......|_____libraries
I have written a glob pattern in grunt browserify something like this
src:['**/*.js','!node_modules','!build'],
dest:'build/build.js'
What i want from above code is, all .js files in my project should be browserified except the .js files in 'node_modules' and 'build' folder.
But what actually is happening is still the files from node_modules and build folder are browserified in my 'build/build.js' destination.
And i do not want to specify folder names of the .js file i require. I do not want to do something like this
['src/**/*.js' ... etc]
How can i solve this problem?
I am new to gulp.
I have a directory in /src which I want to move to /dist.
My directory looks like this with a depth of more than 1.
folder1
- folder2
-folder4
-folder5
-folder6
-folder7
-folder8
-folder10
-folder9
- folder3
I have declared src path as /src/folder1/* in gulp file and it has moved only folder1,folder2,folder3 to the destination path.folder2 and folder3 are empty folders which is perfectly fine.
I have declared src path as /src/folder/** in gulp file and it has moved all the folders as expected to the destination path.And while I was going through all the folders in destination path after running gulpfile, it crashed with segmentation11.What is the reason for this?
And what is the actual method to move all the folders of above structure in gulp?
This is the behavior of node-glob which gulp uses under the hood. From their readme:
* Matches 0 or more characters in a single path portion
..
** If a "globstar" is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does
not crawl symlinked directories.
* will match everything in the same directory.
** will match everything recursively (subdirectories).
The segmentation fault is most likely due to a flaw in your script.