Skip to content
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

Engine does not search folders in views. #1

Open
matthewamarlin opened this issue Feb 15, 2015 · 4 comments
Open

Engine does not search folders in views. #1

matthewamarlin opened this issue Feb 15, 2015 · 4 comments

Comments

@matthewamarlin
Copy link

Hi, great engine.

My only concern is that it does not seem to search folders within views for css/js files. - is this by design While i can work around this with the dependencies.nuspec file, it would be nice to add this functionality to the engine.

I use the folders to Organize the diferent files i need, for example the _Layout has alot of content files i need to serve (JQuery, Plugins, Custom, Fonts [Css], etc) which are organised into folders.

Edit:

I've noticed now that the engine seems to fail if the dependency does not lie within the view folder. So i cannot reference files in the regular Mvc Content folder. I've also noticed that i cannot look forward in folder for dependencies. For example if the dependencies.nuspec file is in _LayoutContainer, and the dependency lies in _LayoutContainer/SomeDirectory the engine fails.
In the first case i get a "The path is not of a legal form." error and in the second cases The @DynamicBundlesTopRender() has a stackOverflowException.

Im also having issues with ordering the scripts and css and such. How would you suggest this is best done.

Thanks Matt

@RudeySH
Copy link

RudeySH commented Jan 27, 2017

You could always manually define one or more bundles just for the _Layout, and use Dynamic Bundles for everything else.

@MrCsabaToth
Copy link

@rlenders , so basically I can still combine the classic bundling together with the dynamic bundling? I'd us classic bundling for the common layout bundles, and use the Dynamic Bundles for my single CSS and JS files per View.

@RudeySH
Copy link

RudeySH commented Mar 24, 2017

Yes you can do that. That's exactly how I'm using bundles right now!

@MrCsabaToth
Copy link

@rlenders Do you happen to have a GitHub repo which does that? Once you take out BundleConfig.RegisterBundles(BundleTable.Bundles); and add ViewEngines.Engines.Add(new DynamicBundles.DynamicBundlesViewEngine()); I thought you loose all the classic bundling capabilities and have to reorganize everything. I'd need to get rid of all of my JS library NuGet packages and transition to bower, since right now they all install JS files into the Scripts directory directly. With Dynamic Bundles you can refer to that directory as external directory but all JS files in there would be bundled. In my case I don't use Jquery, knockout, ... etc on all of my pages, so I need granularity there. Can we chat somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants