Skip to content

Pack Exclude does not work on sub folders #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devmondo opened this issue Dec 24, 2014 · 7 comments
Closed

Pack Exclude does not work on sub folders #248

devmondo opened this issue Dec 24, 2014 · 7 comments

Comments

@devmondo
Copy link

i am using the following pattern

"packExclude": [
        "node_modules",
        "bower_components",
        "**.kproj",
        "**.user",
        "**.vspscc",
        "wwwroot/lib",
        "!wwwroot/lib/angular"
    ]

everything works fine except for "lib" folder, which still get copied to publish folder with all its content, the way i want it is same as grunt or gulp, so i want to exclude all folders and files inside "lib" folder and only include "angular folder or js files that start with "angular"

@davidfowl
Copy link
Member

We don't support the ! syntax.

@devmondo
Copy link
Author

@davidfowl what is the alternative ?

keep in mind that "wwwroot/lib" also does not work

@Praburaj
Copy link

Right now the only way is to list the individual folders under lib except the angular folder. Something like below:

"packExclude": [
        "node_modules",
        "bower_components",
        "**.kproj",
        "**.user",
        "**.vspscc",
        "wwwroot/lib/*",
        "wwwroot/lib/excludeFolder1/**/*",
        "wwwroot/lib/excludeFolder2/**/*",
        "wwwroot/lib/excludeFolder3/**/*",
        "wwwroot/lib/excludeFolder4/**/*",
    ]

@devmondo
Copy link
Author

@Praburaj thank you but this is so inconvenient

@davidfowl
Copy link
Member

Yep it is. Why are you excluding everything except for angular?

@devmondo
Copy link
Author

@davidfowl that is just a test, what i want in future is if i want to exclude any directory that has sub directory to just do this

"packExclude": [
        "wwwroot/ToBeExcludedDirectory"
    ]

or to keep the Directory and sub directory but exclude sub directory sub directories or files like this

"packExclude": [
        "wwwroot/Directory/SubDirectory/TobeExcludedFilesOrFolders"
    ]

basically to make it work same like Node.JS Globbing Pattern, or any way that you guys decide that is compatible with Cross Platforms.

@danroth27
Copy link
Member

Tracking this request with aspnet/dnx#1352.

jkotalik pushed a commit that referenced this issue Nov 1, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 19, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 19, 2018
ryanbrandenburg pushed a commit that referenced this issue Nov 20, 2018
* Correcting path separator to ;

* Using the proper API from System.IO to get path separator
natemcmaster pushed a commit that referenced this issue Nov 30, 2018
Remove NETStandard.Library.NETFramework and update Moq
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants