yui-compressor

tinymce build script to compress all js files

三世轮回 提交于 2019-12-13 02:13:06
问题 I am looking for a way to compress all tinymce js files into one single file. I would like to use ant, yui-compressor and a build script. There seems to exist something like this already: https://github.com/tinymce/tinymce But i have not been able to make it work. Can anybody with experience give me some assistance? 回答1: Solution from the tinymce forum (Spocke): Install Java. Install ant Add ant to environment variable "path" Open a console cd to the tinymce dir and type "ant build_full" 回答2:

Google Closure compiler not compressing string values?

房东的猫 提交于 2019-12-12 15:16:05
问题 Having something like this: (function ($, window, document, undefined) { 'use strict'; $.fn.demo = function (options) { var active = "active"; var section = ".bb-demo"; $(section).addClass(active); $(section).addClass(active); $(section).addClass(active); $(section).addClass(active); }; })(jQuery, window, document); Closure Simple mode results in 200 bytes : (function(a,b,c,d){a.fn.demo=function(b){a(".bb-demo").addClass("active");a(".bb-demo").addClass("active");a(".bb-demo").addClass(

YUI Compressor: What are micro optimizations?

这一生的挚爱 提交于 2019-12-10 18:26:04
问题 YUI Compressor, in its (not very extensive) documentation states this as an option: --disable-optimizations Disable all the built-in micro optimizations. Does anyone know what this means? What will this turn on/off? I haven't found any documentation about it. Thanks! 回答1: Looking at the source of JavaScriptCompressor: lines 548- if (!disableOptimizations) { optimizeObjectMemberAccess(this.tokens); optimizeObjLitMemberDecl(this.tokens); } lines 467 - /* * Transforms obj["foo"] into obj.foo

Reliable and convenient JavaScript minifier [closed]

删除回忆录丶 提交于 2019-12-10 17:28:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I occasionally write JavaScript code. I am interested in minifying it for better performance, but I don't plan to spend to much time

How to remove comments with BundleTransformer YuiJsMinifier

一笑奈何 提交于 2019-12-10 14:44:32
问题 I am using BundleTransformer to minify css and js resources <yui> <css compressionType="Standard" removeComments="true" lineBreakPosition="-1" /> <js compressionType="Standard" obfuscateJavascript="true" preserveAllSemicolons="false" disableOptimizations="false" ignoreEval="false" severity="0" lineBreakPosition="-1" encoding="UTF8" threadCulture="en-us" /> </yui> As you can see for css it is possible to specify removeComments="true" But in js there is no such option. I red that YUI js

Minify inline javascript during build for ASP.net?

核能气质少年 提交于 2019-12-09 06:04:06
问题 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? 回答1: There is an interesting blog and NuGet package called undleMinifyInlineJsCss to handle this

yui compressor maven: A required class is missing: org.mozilla.javascript.ErrorReporter

蹲街弑〆低调 提交于 2019-12-08 12:13:50
问题 I am not able to use yui-compressor maven plugin in my web app. When I run maven I get following error [INFO] Internal error in the plugin manager executing goal 'net.sf.alchim:yuicompressor-maven-plugin:0.7.1:compress': Unable to load the mojo 'net.sf.alchim: yuicompressor-maven-plugin:0.7.1:compress' in the plugin 'net.sf.alchim:yuicompressor-maven-plugin'. A required class is missing: org.mozilla.javascript.ErrorReporter Later I found that rhino js plugin contains this class org.mozilla

YUI Compressor Maven plugin executed at wrong time and tomcat plugin not using yui-compressor output

て烟熏妆下的殇ゞ 提交于 2019-12-08 05:57:28
问题 I am trying to use the YUI Compressor plugin for maven to compress my CSS and JavaScript, but I'm experiencing two problems. My configuration properly compresses and aggregates the JavaScript files, but if I run mvn package to make a war file, maven will compress the JavaScript files BEFORE it copies over the src/main/webapp folder. This overwrites all of the compressed css and JavaScript files. How can I fix this? How do I get the tomcat maven plugin to use the compressed JavaScript files

How to use YUI Compressor.Net MSBuild Task 2.3.0.0

守給你的承諾、 提交于 2019-12-07 16:21:40
问题 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

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

时光毁灭记忆、已成空白 提交于 2019-12-07 12:53:48
问题 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?