npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hexo-filter-cleanup

v1.2.2

Published

Bunble cleanup, including minifying HTML, CSS, JS and Image files, and do `useref` on HTML files.

Downloads

34

Readme

Hexo-filter-cleanup

npm version NPM Dependencies NPM DevDependencies npm download

This project is inspired by hexo-all-minifier.

I completely re-wrote this hexo filter plugin because hexo-all-minifier has certain issues as below which sucks my hexo project on mac osx platform. Besides that i have added some other cool features like useref and performance improvements.

All in one. Minifier & Optimization plugin for Hexo.

Installation

$ npm install hexo-filter-cleanup --save

or with yarn,

yarn add hexo-filter-cleanup

Features

Integrate all the official minifier plugins of HEXO and some other optimization plugins:

Thanks for their works.

Options

hfc_useref:
  enable: true
  concat: true
  exclude: 
  • enable - Enable the plugin. Defaults to true.
  • exclude: Exclude files
  • concat: concat the referenced files automatically.

hfc_html:
  enable: true
  exclude: 
  • enable - Enable the plugin. Defaults to true.
  • exclude: Exclude files

hfc_css:
  enable: true
  exclude: 
    - '*.min.css'
  • enable - Enable the plugin. Defaults to true.
  • exclude: Exclude files

hfc_js:
  enable: true
  mangle: true
  compress:
  exclude: 
    - '*.min.js'
  • enable - Enable the plugin. Defaults to true.
  • mangle: Mangle file names
  • compress: Compress options
  • exclude: Exclude files

hfc_img:
  enable: true
  interlaced: false
  multipass: false
  optimizationLevel: 2
  pngquant: false
  progressive: false
  webp: true
  webpQuality: 75
  gifslice: true
  jpegtran: true
  jpegrecompress: false
  jpegrecompressQuality: 'medium'
  optipng: true
  svgo: true
  • enable - Enable the plugin. Defaults to true.
  • interlaced - Interlace gif for progressive rendering. Defaults to false.
  • multipass - Optimize svg multiple times until it’s fully optimized. Defaults to false.
  • optimizationLevel - Select an optimization level between 0 and 7. Defaults to 2.
  • pngquant - Enable imagemin-pngquant plugin. Defaults to false.
  • progressive - Lossless conversion to progressive. Defaults to false.
hfc_favicons:
  enable: true
  src: img/logo.png
  target: img/
  html: true
  opts: false
  icons:
    android: true
    appleIcon: true
    appleStartup: false
    coast: false
    favicons: true
    firefox: false
    opengraph: false
    windows: true
    yandex: false
  • enable - Enable the plugin. Defaults to true.
  • src - Favicon file path.
  • target - Where we put the generated files. Defaults to img folder.
  • html - Whether generate the html data in the _data folder for further usage. Defaults to true. See an example.
  • opts - Extra favicons configurations. Defaults to false
  • icons - Icons configurations.

Debug Mode

The debug mode will disable all the optimizations.

You can active the debug mode by using hexo's --debug switch as below.

hexo s --watch --debug

Todo: Tests