songlibo / pagespeed-chrome-extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I custom my own rule

jieyou opened this issue · comments

Hey , thanks for build such a useful extension.
There is the question : How can i custom my own rules? Or modify same rules ?
I noticed there is a pexe file , how do you develop / get/ build this file? Is there any open source for the file ?
Thanks again~

The pexe file is built based on https://github.com/pagespeed/page-speed
There are some changes to that repo to build, I have not made the change upstream.

For customizing rules, what specific do you want to customize? Some rules are configurable, such as the image compression.

Would you mind telling me the detail steps / doc to build the pexe file ?

Here is what I'd like to do with customizing rules. For examples, I am trying to punish js files that are not compressed, and give less punishment to the files that do not use E-tag/last-modify or ignore the "SpriteImages" rule.
Could you tell me the way or document to customize the configurable rules ? And is there any way to customize the unconfigurable rules by changing some code in the pexe file source code ?

I have planed to upload all the steps to build the pexe to this repo, but have not had the time to do it. Stay tuned.

For those you mentioned above, if that is for your own use, you can just simply ignore them. However, if the un-compressed js file is not marked, then that is a bug. You can file a separate bug for that. All the computation of the rules are in https://github.com/pagespeed/page-speed. Take a look at https://github.com/pagespeed/page-speed/tree/master/lib/trunk/src/pagespeed/rules.