Skip to content

Strappazzon/jekyll-terser

Β 
Β 
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

About

πŸ’Ž Jekyll support for Terser: compress and mangle JS files.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Languages

  • Ruby 100.0%