skroonenburg / rejuicer Goto Github PK
View Code? Open in Web Editor NEWFluent CSS & JavaScript minification tool for ASP.NET.
Home Page: http://rejuice.me
Fluent CSS & JavaScript minification tool for ASP.NET.
Home Page: http://rejuice.me
I have some code:
OnRequest.ForCss("~/Stylesheets-{0}.aspx")
.Compact
.FilesIn("~/Scripts/jquery-ui/themes/custom").Matching("jquery-ui.css")
.FilesIn("~/css").Matching("*.css")
.Configure();
I would like to specifically exclude certain files from this OnRequest, instead of including them.
I'd be happy to work on this issue, if this project is still watched over by the developer. But since rejuice.me is down and there is an open Pull Request, I'm uncertain that it's worth my time.
As far as I can see, FileResolver is an internal class so a custom/stub implementation of VirtualPathResolver can't be added. This may be beneficial for unit tests, as you've done in the Rejuicer tests (https://github.com/skroonenburg/Rejuicer/blob/master/Source/Rejuicer/Rejuicer-test/FluentConfigurerTests.cs)
In my case, we're hosting multiple sites with the same codebase and are using merge fields in a template (ie. {javascript} inserts references to generic JavaScript files used by every site). There are unit tests around these merge fields and hence Rejuicer is being invoked in the unit tests. I'm having issues stubbing Server.MapPath with Rhino Mocks so I think it'd be easier to just have a custom Virtual PathResolver in Rejuicer.
Could you please specify in your Rejuicer project a distribution license? Like, MIT, LGPL2, etc?
Thanks.
Hi,
When my css files are combined some weired character is added to the first line from each file. This makes the browser not recognize this line and the style is never added.
Take a look at: http://nixonnixon.apphb.com/nixonnixon-2421021430115041241691872925262219215129215.css
The css rule on line 2 and 4 are not recognized by the browser. If I past the content of a file in a texteditor (I use programmers notepad) I can see that some character has been added to these lines.
So I guess that there is some issue when the files are joined? it seems like this just happends for js files and not css files.
When I switched my MVC 3 project to use IIS Express rather than Cassini, I can no longer debug. I can however browse to the appropriate URL on localhost
and view the website without debugging.
In Application_Error(), I get
The remote host closed the connection. The error code is 0x800704CD.
There is no inner exception, and the stack is:
at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
at System.Web.HttpResponse.Flush(Boolean finalFlush)
at System.Web.HttpResponse.Flush()
at Rejuicer.RejuicerModule.context_BeginRequest(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Changing
to
resolves the issue.
Note though that there is no issue either way debugging under Cassini.
Hey, I have an application in .NET Framework 4.7.2 using Rejuicer for file compression. After updating my JQuery to the latest version, I'm getting the following error after the compression: [ERROR] missing name after . operator
.
Hi,
I have small asp.net-mvc4 project that uses Rejuicer. Everything works fine on with iis7 but when I switched to IIS8 I start getting 404's for all rejuiced scripts. When I build my solution in debug the scripts get served our without being rejuiced just fine.
Any clues as to what might be wrong? Maybe it's something else and not IIS, anything I could look for in your code?
Thanks so much
We have compression enabled in IIS for both dynamic & static files, however it appears the combined JS file returned from Rejuicer is not gzip compressed.
This is how compression is enabled in our web.config
<urlCompression doDynamicCompression="true" dynamicCompressionBeforeCache="true" doStaticCompression="true" />
When I review the response headers for all of the files returned from the server, all our static & dynamic pages have a content-encoding of gzip, however the Rejuiced file has no content-encoding.
This leads me to believe that the raw JS text is coming down, and not a compressed version.
Any ideas?
Thanks,
Anthony.
Hi Skroonenburg,
Is ImageMinificationProvider missing?
When I minify CSS files with
OnRequest.ForCss("/stylesheet/PB.css").Compact.File("/stylesheet/PB.css").Configure();
The response HTTP headers are like this:
Cache-Control no-cache
Content-Type text/css
Date Mon, 23 Jul 2012 14:12:31 GMT
Expires -1
Pragma no-cache
Server Microsoft-IIS/6.0
Transfer-Encoding chunked
X-AspNet-Version 4.0.30319
which results in the browser always requesting the CSS file (and js files as well). I looked in the decompiled code, and it seems you only care for the configuration of IIS 7.
Currently, Rejuicer only sends caching headers if a placeholder is specified in the URL:
https://github.com/skroonenburg/Rejuicer/blob/master/Source/Rejuicer/Rejuicer/Model/RejuicerConfigurationSource.cs#L146
It'd be nice to be able to override this on a per-asset basis, for example in the configuration:
OnRequest.ForJs("~/Combined/Widgets/v2.js")
.Compact
.File("~/Content/Core.js")
.File("~/Content/Widgets.js")
.CacheFor(TimeSpan.FromDays(1)) // This is new
.Configure();
In this case, the JavaScript file is linked from third-party sites, so putting a long hash in the URL or caching for 1 year isn't really feasible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.