Does YUI compressor have support for rewriting relative paths? - yui-compressor

The problems is that when I run YUI compressor (.NET MsBuild task) the minified css file preserves the same relative paths as in the original ones and given my content structure, this results incorrect paths to images and other resources. Does YUI have an option to configure it to rewrite this URLs? If it doesn't, are there other tools that do could help with this?

Related

Correct url's to asset files generated by webpack in express

How do you handle links to asset files generated by webpack, when you use .ejs templating engine, if file includes [contenthash] for caching files in browser?
Thanks in advance

How are polymerDart components deployed in Dartium versus their Source tree

When i am making PolymerElements in Dart and have folders organized to store css/html/dart files, when i run index.html in Dartium and look at the sources it seems that everything is shifted around and stored in the packages folder.
Im trying to find these custom PolymerElement dart files I have written, but to no avail. It seems when looking at index.html at runtime, it will paste the css/html as required into the custom elements i had created, but im still not sure where the dart files themselves are stored.
Right now I have a SRC structure that looks like:
.pub/
lib/
common/
...
tw_datagrid/
a.css
a.html
a.dart
packages/
web/
packages/
index.html
main.dart
and for the deployment to Index, i look at the source and see the following:
proj_name/web
packages/
it seems that packages in the web sources has a more robust set of information. My logic tends to lean towards it containing the imported libraries as well.
Still though, i cant find the new location of: a.dart within the packages/ folder
Html, CSS and JS is inlined into index.html. For CSS files this can be disabled.
Source files from the library directory can be found in Dartium (in the Sources tab in the dev-tools) under the (no domain) node under package:proj_name/tw_datagrid/a.dart

YUI Compressor - compress from one directory to another

I am on Win 7 and I want to compress my js/css files with YUI Compressor.
It uses require.js so I would like to keep the file names and folder structure same, before and after the compress.
I put the original js files into oldjs/ folder and want minified js files to be outputted into js/ folder.
Is there any way to do that?

Minifying and inlining tool for less

I am looking for a tool to minify a website to one file.
I found inliner but it also inclue my less client script and I would like my less to by compiled to css and be included.
I want to inline javascript, stylsheet and images.
Is there any tool I could use ?
A quick search led me to these options:
Node-AMS - minify js (using uglifyjs), minify css (using cssmin from yahoo), inline small images in css using base64 data encoding, etc.
Bundler - compiles, minifies and combines your websites less, sass, css, coffeescript and js
Node-minify - compress javascript and css files with Yui Compressor / Google Closure Compiler / UglifyJS
I recommend Opra
*O*ne *P*age to *R*ule them *A*ll
Provides functions for serving and building html-files for single page applications.
Handles such tedious things as concatenating, compressing and compiling files before putting them into the html file.
Supports coffeescript and less out of the box.
For the moment, I didn't find a perfect tool, and I don't have more time to spent looking for one.
I think what I was looking for was something like Node-AMS or grunt.
Node-AMS seems to be very similar to grunt, but grunt have a bigger community.
I might in the future create some of the tools I need as grunt plugins.

How to gzip individual files with maven and replace the original ones?

I need to gzip individual files that are part of my java project and replace the original file with the gzipped files.
So basically convert a directory /bla containing stylesheets, js, xml files to /bla with the same files but then all gzipped.
I can't find a simple way to do this with maven, please some advice?
I looked at the assembly plugin but that package files in to one gzip..
Should I use ant for this and run it from maven?
Ed
I am not aware of any plugin which is capable of this. I would write the Ant and execute it with the Maven Antrun Plugin.
The following blog post covers this topic: http://jorgetown.blogspot.com.br/2007/06/rhino-maven-automagic-compression.html
Alternatively you could use the YUI Compressor Maven plugin which also has an option to gzip compress the files.