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.2.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

lektor_jsminify-1.2.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lektor-jsminify-1.2.1.tar.gz
  • Upload date:
  • Size: 3.3 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.2.1.tar.gz
Algorithm Hash digest
SHA256 c3740f2f6c0f860be9daefcc890d29716cfcb4f6c1341ed474d959061a650e47
MD5 d51b85c24b1a74695d73d65527082a97
BLAKE2b-256 c0b2971b13a776903aed5a6d6cee455127460c58bc6681d7511b3bc55e11ddf8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lektor_jsminify-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6f7d92bf78666f3cb2ae32918265fb7c182af8fbdbb680e1dde1239e9b8b903
MD5 2ec00d6530cf0510da73b7cd54ea2d31
BLAKE2b-256 aefca898a8b8e5e918741a3cf2dc5fff28e62fe5f19ff2e469e658643836c170

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