0.0
Low commit activity in last 3 years
Jekyll support for Terser: compress and mangle JS files.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 4.4
~> 1.2
 Project Readme
RubyGems Logo
jekyll-terser

Jekyll support for Terser

Installation

Add one of these lines to your Gemfile:

# always use the latest version
gem 'jekyll-terser'

# use pessimistic lock
gem 'jekyll-terser', '~> 1.0'

# fetch gem from git
gem 'jekyll-terser', git: 'https://github.com/Strappazzon/jekyll-terser.git', tag: '1.0.0'

Then execute bundle install to install the Gem.

Getting Started

No additional steps are required. All JS files inside the destination directory are overwritten with the output of Terser.

You can also specify the options inside your configuration:

jekyll-terser:
  terser_opts:
    compress: {}
    mangle: {}
    parse: {}

All available options are available on Terser Docs.

You can also specify that Terser should only work in production mode:

jekyll-terser:
  only_production: true