summaryrefslogtreecommitdiffstats
path: root/minify_web_js.py
Commit message (Collapse)AuthorAge
* Update javascript minifying scriptCalum Lind2018-10-16
| | | | | | | - When both minifying modules are missing, creating a copy of the debug file is not actually desirable, a missing file is more obvious than a copy. WebUI can handle a missing 'normal' script and fallback to 'debug' script so modified script to skip and warn instead.
* [WebUI] Copy non-minified JS file if slimit missingDjLegolas2018-10-08
| | | | | | | This will remove the setup dependency in "slimit" package. In case "slimit" is missing, the non-minified JS files will be copied as is to the build. "slimit" is marked as a dependency for development process only.
* [Lint] Use Black to auto-format codeCalum Lind2018-10-03
| | | | | | | | | | | | | | | | | The move to using auto-formatter makes it easier to read, submit and speeds up development time. https://github.com/ambv/black/ Although I would prefer 79 chars, the default line length of 88 chars used by black suffices. The flake8 line length remains at 120 chars since black does not touch comments or docstrings and this will require another round of fixes. The only black setting that is not standard is the use of double-quotes for strings so disabled any formatting of these. Note however that flake8 will still flag usage of double-quotes. I may change my mind on double vs single quotes but for now leave them. A new pyproject.toml file has been created for black configuration.
* [Py2to3] Force unicode_literals and fix related issuesCalum Lind2017-02-22
| | | | | | | | | | | | | | | | | | * Added `from __future__ import unicode_literals` to every file so now all strings in code are forced to be unicode strings unless marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`. This is a large change but we have been working towards the goal of unicode strings passed in the code so decoding external input and encoding output as byte strings (where applicable). Note that in Python 2 the `str` type still refers to byte strings. * Replaced the use of `str` for `basestring` in isinstance comparison as this was the original intention but breaks code when encoutering unicode strings. * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly related to gobject signal names.
* Fix a typo in minify scriptCalum Lind2016-11-28
|
* Cleanup up minify js scriptCalum Lind2016-11-28
| | | | | | | - The slimit package is now widely available so make the script only rely on it and closure. Keeping closure as it makes the most compact and lints the javascript but it is not as easy to install as slimit.
* [Lint] Fix files to pass Flake8 v3.2.0Calum Lind2016-11-17
|
* [WebUI] Print error if minify script encounters error with closureCalum Lind2016-05-19
|
* [Lint] Cleanup helper scripts to pass PyLintCalum Lind2015-10-30
|
* Fix pep8 across codebaseCalum Lind2015-10-21
| | | | | | | | | * Further whitespace fixes by autopep8 * Using pep8 v1.6.2 (not currently used by pyflakes) * Update config for pep8 and flake8 in tox.ini * A separate pep8 entry for running autopep8. The ignores prevent blank lines being added after docstrings. * .tox and E133 are ignored in flake8 by default.
* [WebUI] Refactor server.get_scriptsCalum Lind2015-09-04
| | | | | * The directory list is now sorted so will always produce the same output. * Code is now shared with minify script, with some minor changes.
* Update minify script to use closureCalum Lind2015-08-25
|
* Updates to helper scriptsCalum Lind2015-08-25
| | | | | * Python 3 compatible * Consistent quote symbol
* [WebUI] Improve the minify scriptCalum Lind2015-08-22
|
* Minor cleanup of minify js scriptCalum Lind2015-08-14
|
* Fix the output of minify js scriptCalum Lind2015-08-13
| | | | | | | | The order of the js files matters when minifying. * Use the '.order' files to put specified files top of the file list. * Sub-directory files inserted in list before root directory files. * Sort everything else alphabetically for consistant ordering.
* Update headers and isort importsCalum Lind2014-09-23
|
* Remove unneeded ez_setup and 'isort' importsCalum Lind2014-09-04
|
* Rewrite the webui minify js script in pythonCalum Lind2014-07-10
Also replaced minifier 'yui-compressor' with pure-python 'slimit'.