Skip to main content

JS minifier for Lektor. Based on rjsmin.

Project description

JSminify

PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lektor-jsminify-1.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

lektor_jsminify-1.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file lektor-jsminify-1.3.tar.gz.

File metadata

  • Download URL: lektor-jsminify-1.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for lektor-jsminify-1.3.tar.gz
Algorithm Hash digest
SHA256 279c05b1e875997b11a9839913ebb6f51f29733463cb2cabbf53074735757eef
MD5 08b3a7e01bf6f70ab2e04122ae37523a
BLAKE2b-256 b9b09742d54dccb085b44001a3cbcaeede847383888b9ddd5758ccfbc2e7a416

See more details on using hashes here.

File details

Details for the file lektor_jsminify-1.3-py3-none-any.whl.

File metadata

  • Download URL: lektor_jsminify-1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for lektor_jsminify-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c5c4cef80a0d201341a8389237c312c1fd350717258bba8d2e73352ce6eddf2a
MD5 47da6726465873acc43bcec319e34bc4
BLAKE2b-256 5e884a9f6d495e9e5db7bb17db8af3078e42ff43e92628a09dffedc76a3365f4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page