JS minifier for Lektor. Based on rjsmin.
Project description
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.
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.2
Usage
To enable jsminify, pass the jsminify
flag when starting the development
server or when running a build::
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.scss gets to test<name_prefix>.css | |
keep_bang_comments | False | keep comments starting with an exclamation mark |
An example file with the default config can be found at configs/jscompile.ini
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lektor_jsminify-1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5c4cef80a0d201341a8389237c312c1fd350717258bba8d2e73352ce6eddf2a |
|
MD5 | 47da6726465873acc43bcec319e34bc4 |
|
BLAKE2b-256 | 5e884a9f6d495e9e5db7bb17db8af3078e42ff43e92628a09dffedc76a3365f4 |