Comments (15)
Many issues related to this:
#168 Image Optimization
#163 Image Optimization Broken on Linux/Mac
#147 OptiPNG with unix
#141 You have optipng installed and your version is: usage: grep (Mac OS Lion Mountain)
#156 Image optimization in subfolders
#37 Include pngquant in image optimization process
#149 - fix optipng version regex
#152 fix jpegtran metadata stripping
from ant-build-script.
Big +1. I installed the required dependencies, put them on my $PATH, verified with which
and they never get picked up by the build script.
from ant-build-script.
I'm actually working on it right now. I'm going to stop doing all the magic stuff and just make people be a bit more responsible for configuring the image tasks. A lot of the issues we experienced with this stuff was with trying to get too cute.
from ant-build-script.
Available for testing
https://github.com/h5bp/ant-build-script/tree/new-image-optimization
from ant-build-script.
The biggest difference is that you need to manually set your version of optipng. Right now the assumption is that it's greater than 7.0. If it's not you have to uncomment line 189 in project properties
https://github.com/h5bp/ant-build-script/blob/new-image-optimization/config/project.properties#L189
from ant-build-script.
Reworked again, based on some feedback. Tested on an unprimed Quantal Quetzal server install. With no dependencies the "tool not installed, yadda yadda" messages work. With Optipng and Jpegtran installed, the images are processed.
from ant-build-script.
Thanks Rob!
from ant-build-script.
@kevinSuttle have you had a chance to test it? I'm gathering as much feedback as I can before releasing this. It's hard to test these things since I would need about 40 systems.
from ant-build-script.
I haven't yet. I will play with it over the weekend though. Thanks!
from ant-build-script.
Just tested the new image-optimization branch under osx 10.8 and it looks like advpng is never called because it's never set to available.
If I'm correct, this needs to be added (line 1141 build.xml):
<else>
<var name="advpng.available" value="true"/>
</else>
from ant-build-script.
did it work when you tried that out?
from ant-build-script.
Did some more checks (with the mentioned change):
brew uninstall advancecomp
ant minify
Gives me the "advpng NOT INSTALLED. SKIPPING OPTIMIZATION OF PNGs." warning (as expected)
brew install advancecomp
ant minify
gives me the "echo Now, we run advpng on the .png files..." message
Without the change mentioned above I would always get the advpng not installed message
from ant-build-script.
Awesome. I'll add that in right now.
from ant-build-script.
For jpegtran (line 1213 build.xml) set value to true
<then>
<var name="jpegtran.available" value="true"/>
</then>
from ant-build-script.
Can you elaborate? That would make it always true.
<if>
<not>
<available file="jpegtran" filepath="${ENV.PATH}"/>
</not>
<then>
<var name="jpegtran.available" value="false"/>
</then>
<else>
<var name="jpegtran.available" value="true"/>
</else>
</if>
from ant-build-script.
Related Issues (20)
- Change docs to address confusion HOT 2
- Can't copy minified js directory over to publish HOT 2
- Concatenation after minifying and ADVANCED_OPTIMIZATIONS HOT 5
- Image Optimization Broken on Linux/Mac HOT 9
- Minifying any unconcatenated css files... FileNotFoundException HOT 2
- The gem-sass.jar throws an exception with Foundation 4 HOT 3
- Image Optimization HOT 5
- CSS reference not updating w/php includes on build HOT 6
- Mavericks Upgrade: Busted Macports for Ant HOT 2
- Unicode characters being inserted between css imports upon concatenation. HOT 5
- css-references not updating in html-file HOT 17
- working with sass stylesheets HOT 1
- problem with advpng and java.. HOT 5
- set language_in option for closure compiler? HOT 6
- Port to NodeJs HOT 1
- css does not minify/concat correctly when using default main.css HOT 7
- ant validate only validates single page HOT 1
- JS files vanished in publish/ directory HOT 1
- How to use this build script outside my project? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-build-script.