yui-compressor

How to properly use minify maven plugin to minify js and css in Angularjs app?

余生颓废 提交于 2019-12-07 00:22:44
问题 I am trying to minify javascripts and css files in my angularjs app using samaxes minify maven plugin. I am able to get all js & css minified and build a war file with maven, but while trying to open app url I get Error: [$injector:unpr] Unknown provider: aProvider <- a and my app does not work. Below I am providing my pom plugin configuration <plugin> <groupId>com.samaxes.maven</groupId> <artifactId>minify-maven-plugin</artifactId> <version>1.7.4</version> <executions> <execution> <id>min-js

How to use YUI Compressor in Ant build script for javascript

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 11:45:51
问题 I have ANT script which compresses .js files into their own files, but i want to compress all .js files into one .js file. How to make it work using below ANT script. <echo message="Compressing Javascript files at location: ${build.root}/resources/js/*.js" /> <java jar="c:/dev/lib/yuicompressor-2.4.7/build/yuicompressor.jar" fork="true"> <arg value="${build.root}/resources/js/*.js" /> <!-- input path for JS files --> <!--<arg value="-v" /> --><!-- Turn on verbose --> <arg value="-o" /> <arg

How to use YUI Compressor.Net MSBuild Task 2.3.0.0

谁说我不能喝 提交于 2019-12-06 03:31:24
I have tried searching the web for a solution to this problem but it seems very unclear. It sounds like people are seeing this but the solutions don't seem to work for me. I have downloaded and installed YUICompressor.NET.MSBuild 2.3.0.0 from NuGet into my project. I have created an MSBuild target file that closely resembles the example file included and exists as part of my .csproj file so I can run it in the AfterBuild step. I am getting the following error everytime I try to build my VS project: The "JavaScriptCompressorTask" task could not be loaded from the assembly SolutionDir\packages

Compressing assets in Ruby on Rails 3

删除回忆录丶 提交于 2019-12-06 02:29:57
问题 I have following configurations in production.rb # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false # Compress JavaScripts and CSS config.assets.compress = true # Choose the compressors to use config.assets.js_compressor = :uglifier config.assets.css_compressor = :yui # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = true # Generate digests for assets URLs. config.assets.digest = true But

YUI compressor - compress multiple input files into one output file [duplicate]

早过忘川 提交于 2019-12-05 18:12:06
This question already has answers here : Closed 6 years ago . Possible Duplicate: How can I combine and compress multiple script and css files for production use? I would like to compress multiple javascript files into one minified file. I'm using YUI Compressor . On their page it says that it can do it like so (their example uses css files but I replaced it with js): java -jar yuicompressor.jar -o '.js$:-min.js' *.js When I try to execute this I get an empty file named .js$ What am I missing? The following works for me: java -jar yuicompressor.jar *.js > combined.js 来源: https://stackoverflow

How to properly use minify maven plugin to minify js and css in Angularjs app?

纵饮孤独 提交于 2019-12-05 04:20:25
I am trying to minify javascripts and css files in my angularjs app using samaxes minify maven plugin . I am able to get all js & css minified and build a war file with maven, but while trying to open app url I get Error: [$injector:unpr] Unknown provider: aProvider <- a and my app does not work. Below I am providing my pom plugin configuration <plugin> <groupId>com.samaxes.maven</groupId> <artifactId>minify-maven-plugin</artifactId> <version>1.7.4</version> <executions> <execution> <id>min-js</id> <phase>prepare-package</phase> <goals> <goal>minify</goal> </goals> </execution> </executions>

Compressing assets in Ruby on Rails 3

痞子三分冷 提交于 2019-12-04 06:58:44
I have following configurations in production.rb # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false # Compress JavaScripts and CSS config.assets.compress = true # Choose the compressors to use config.assets.js_compressor = :uglifier config.assets.css_compressor = :yui # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = true # Generate digests for assets URLs. config.assets.digest = true But when the ruby on rails application on production server I get following error: Error compiling CSS asset

YUICompressor or similar in PHP?

China☆狼群 提交于 2019-12-03 07:49:25
I've been using yuicompressor.jar on my test server for on-the-fly minimisation of changed JavaScript files. Now that I have deployed the website to the public server, I noticed that the server's policies forbid the use of exec() or its equivalents, so no more java execution for me. Is there a decent on-the-fly JS compressor implemented in PHP? The only thing resembling this that I was able to find was Minify, but it's more of a full-blown compression solution with cache and everything. I want to keep the files separate and have the minimised files follow my own naming conventions, so Minify

Minify inline javascript during build for ASP.net?

半城伤御伤魂 提交于 2019-12-03 07:20:51
We have a handful of ASP.net pages that include more than 50+ lines of javascript specific to that page. We'd like to minify that javascript during our CruiseControl build process. We already use the YUI Compressor to compress our full javascript and css files. But we can't figure out how to do the Inline javascript. Is there an MSBuild task to spin through asp.net pages and minify the javascript? Stephen Montgomery There is an interesting blog and NuGet package called undleMinifyInlineJsCss to handle this http://weblogs.asp.net/imranbaloch/archive/2012/07/25/bundling-and-minifying-inline-css

Why is Google PageSpeed Insights telling me to minify javascript & CSS (using Rails 3.2 with JS & CSS compression) and how to fix?

≡放荡痞女 提交于 2019-12-03 06:15:57
I know it's not a lot I could save in KB, but to achieve a better score in Google PageSpeed Insights, and thus probably better SEO ranking, how can I fix this? From https://developers.google.com/speed/pagespeed/insights/?hl=en&url=www.tradebench.com : Minify JavaScript for the following resources to reduce their size by 2.8KiB (2% reduction). Minifying http://d2bfamm4k6zojq.cloudfront.net/…tion-ea806932c941fb875b7512a557ebead3.js could save 2.8KiB (2% reduction) after compression. It tells me the same thing for my CSS file. From my production.rb file: config.assets.compress = true config