Skip to content

KOLANICH-libs/ClosureCompiler.py

Repository files navigation

ClosureCompiler.py

wheel (GHA via nightly.link) GitHub Actions Libraries.io Status Code style: antiflash

We have moved to https://codeberg.org/KOLANICH-libs/ClosureCompiler.py, grab new versions there.

Under the disguise of "better security" Micro$oft-owned GitHub has discriminated users of 1FA passwords while having commercial interest in success and wide adoption of FIDO 1FA specifications and Windows Hello implementation which it promotes as a replacement for passwords. It will result in dire consequencies and is competely inacceptable, read why.

If you don't want to participate in harming yourself, it is recommended to follow the lead and migrate somewhere away of GitHub and Micro$oft. Here is the list of alternatives and rationales to do it. If they delete the discussion, there are certain well-known places where you can get a copy of it. Read why you should also leave GitHub.


Python bindings to Google Closure Compiler.

Contains sources derived from Closure Compiler source code. See ./.reuse/dep5 for more info.

Usage

from ClosureCompiler import *

c = Compiler(createCompilerOptions(level=CompilationLevel.ADVANCED_OPTIMIZATIONS))
res = c({
	"index.js": "const asdf = 'aaaa'; alert('1 ' + asdf);",
})
print(repr(res.js)) # '\'use strict\';\nalert("1 aaaa");\n'

WiP. Even the API is unstable and is subject to change.