Skip to content

Loading…

Minify code #15

Closed
kurtextrem opened this Issue · 1 comment

2 participants

@kurtextrem

If you know Node a little bit, you could use gulp for that. I'm using Node to minify html, css and js in my own projects, feel free to use the gulpfile and the package.json... You just need to install node, install gulp using "npm -g install gulp" (in your cmd), you switch to your dir where this project is, add the package.json and the gulpfile.js to the dir and run "npm update" in the cmd, with the folder as "target" / location. A simple "gulp" will minify the whole code then. Note: The script is configured to have a "src" (source code) and a "dist" (distribute code) folder.. not sure if you want that too. Just tell me if you need help configuring it for your needs :)

https://gist.github.com/kurtextrem/79da2dc2061d880088de

Oh, before I forget it: Thanks for this extension. Finally a good adblocker.

@gorhill

Well minifying is kind of pointless for an extension as it is loaded once only, so the size is not really an issue. As for speed, there is not really any gain to be had.

I prefer the code to be easy to read for whomever wants to step into it using a debugger, and in general I prefer extensions which do not make it difficult to read their code, as it is important often to check what they are really doing.

(Though admittedly for a external libs, I usually use the minified version)

@gorhill gorhill closed this
@andre-hub andre-hub pushed a commit to andre-hub/uBlock that referenced this issue
@gorhill gorhill this (indirectly) fixes #15: let uBlock block remote fonts globally o…
…r on a site-basis
113c2e1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.