lektor-JSminify
JS minifier for Lektor that automatically minifies javascript files
Uses rjsmin and looks for .js files, minifying them as part of the build process. It only rebuilds when it's needed (file changed or the config changed). When starting the the development server it watchs the files for changes in the background and rebuilds them when needed.
Installing
You can install the plugin with Lektor's installer::
lektor plugins add lektor-jsminify
Or by hand, adding the plugin to the packages section in your lektorproject file::
[packages]
lektor-jsminify = 1.4.1
Usage
To enable jsminify, pass the jsminify flag when starting the development
server or when running a build:
lektor server -f jsminify
lektor build -f jsminify
When the flag is present, jsminify will take all .js files from asset_sources/js, minifies them and places them in assets/js.
The Plugin has the following settings you can adjust to your needs:
| parameter | default value | description |
|---|---|---|
| source_dir | asset_sources/js/ | the directory in which the plugin searchs for js files (subdirectories are included) |
| output_dir | assets/js/ | the directory the minified js files get place at |
| name_prefix | prefix for output name e.g. test.js becomes to test<name_prefix>.js | |
| keep_bang_comments | False | keep comments starting with an exclamation mark |
| excluded_assets | exclude .js files using a comma separated list of unix shell style wildcards (fnmatch) | |
| included_assets | include .js files using a comma separated list of unix shell style wildcards (fnmatch) overrides excluded assets |
An example config can be found at configs/jscompile.ini
Metadata
Release files for lektor-jsminify 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lektor-jsminify-1.4.1.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lektor_jsminify-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / lektor-jsminify-1.4.1.tar.gz
| Download URL | lektor-jsminify-1.4.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8502b9abb19f0b56ebe6abeddf0f18528a3703ad2eda64c5c9cce7bd0e89bc1d
|
|
BLAKE2b-256 checksum How to use checksums |
136e29cae3ca6093b3df12049aba9d92063baa17b549365277c5efe96ad16ea3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.13.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|
Release files / lektor_jsminify-1.4.1-py3-none-any.whl
| Download URL | lektor_jsminify-1.4.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af0fb9aa0cd27f3e0eb27cc548de254c023e4228ba8da526d409a0f337eea46a
|
|
BLAKE2b-256 checksum How to use checksums |
f5c0a71e1844f9b6eee7fa9b99d7b376874efc0fc0e333a48cea2b43b7b94ee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.13.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.4
|