Comments (13)
I've made a pull request #32 that should fulfill this issue. But it comes with one big caveat, it only works for files that have exactly one period (filename.ext)
from embeddedresourcevirtualpathprovider.
I will implement this in following days.
from embeddedresourcevirtualpathprovider.
Excellent, that sounds very useful.
On 19 Nov 2014 02:21, "cherrydev" [email protected] wrote:
Because the Vpp doesn't implement GetDirectory or DirectoryExists, the
Bundle.IncludeDirectory method doesn't work at all, which unfortunately
makes it rather limiting. I'm going to try to implement it, if that's
alright with you.—
Reply to this email directly or view it on GitHub
#11
.
from embeddedresourcevirtualpathprovider.
Yes, would also need this feature. Without, I cannot use "*"-Includes when using System.Web.Optimization bundles.
from embeddedresourcevirtualpathprovider.
Awesome work @thorgeir . I'll need a bit of time to review this.
WRT the caveat - would it be possible to change is so files which contain multiple periods can be found at multuiple paths? e.g.
\foo\bar.baz.js
, which would become a resource foo.bar.baz.js
would be available at all combinations of virtual paths from /foo.bar.baz.js
, /foo/bar.baz.js
, /foo.bar/baz.js
, /foo/bar/baz.js
, if you see what I mean?
I haven't really though this through yet, so there may be a very good reason why this won't work.
If not though, it might be better if you could make this change, as it will stop people who aren't aware of the caveat from raising issues.
from embeddedresourcevirtualpathprovider.
We could generate every possible combination. but the main usage for this would be with bundles and if you know about this limitation you should be able to adjust your filenames to fit the pattern. Right? :)
from embeddedresourcevirtualpathprovider.
Also, if we make files accessible through all combinations, including ~/foo/*.js
in a bundle would include all .js files in all sub-directories.
from embeddedresourcevirtualpathprovider.
So a big problem is it's pretty common for something to be called \js\jquery-1.5.1.min.js
, - could some client of (configurable?) heuristic be used, that works with version numbers and .min
?
Also, would my suggestion result in multiple identical files being returned? I'm not that familiar with the ins and outs of bundling.
from embeddedresourcevirtualpathprovider.
Some thing like this?
^(?<assembly>Assembly.Name)(\.(?<directory>.*?))?\.(?<filename>[^.]*([\.-](?<version>[0-9]\.[0-9]\.[0-9])(\.min)?)?\.[^.]*)$
Fiddle
from embeddedresourcevirtualpathprovider.
Very nice! Do you need the assembly name bit?
from embeddedresourcevirtualpathprovider.
Also, might be worth treating .less.css
, .ts.js
specially too... although that can be done later, .min
is by far the most common case
from embeddedresourcevirtualpathprovider.
The initial resource name includes the assembly name, but it could be remove that before running the regex.
Also we could also make this configurable like the CacheControl bit.
from embeddedresourcevirtualpathprovider.
Ok, i've pushed these changes to the pull request. Review this and let me know what you think.
from embeddedresourcevirtualpathprovider.
Related Issues (20)
- App_Code instead of App_Start HOT 9
- Trying to get working with MVC 4 HOT 6
- Does not work in IIS HOT 1
- Is this work for Asp.net 5? (Asp.net vNext, Asp.net MVC 6) HOT 3
- Files 'placeholder.txt' and content/RegisterVirtualPathProvider.cs in a config package
- Usage with MVC bundles HOT 2
- Simple support for a little diagnostics HOT 2
- Pull requests get deployed to NuGet HOT 1
- Repository contains binaries in sample projects HOT 4
- Does not support complicated folder structures HOT 1
- Using "Enabling debugging for embedded razor views" doesn't works HOT 6
- VPP Not Working on Integrated IIS7 Azure HOT 4
- Locked assembly file after Publish HOT 12
- Split the package onto two ones: core and bootstrapper HOT 3
- Bundling and filenames with dots HOT 1
- Load views from different assemblies based the URL
- Please remove content scripts HOT 10
- Publish Precompiled project not working HOT 2
- EmbeddedResourcePath Regex Parser Bug HOT 2
- How do I get the VPP to pick-up changes without restarting my web app? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embeddedresourcevirtualpathprovider.