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

khala

v1.2.7

Published

**Khala** is a Node.js-based tool for processing and optimizing mobile graphics files.

Downloads

16

Readme

Khala npm version

Khala is a Node.js-based tool for processing and optimizing mobile graphics files.

Installation

Docker:

docker run islinhey/khala  -c ./config.yaml 

Node:

npm -g install khala

or

yarn global add khala

CLI usage

khala -c ./config.yaml

Configuration

Report

| Optional | Parameters | Description | | Default | | --- | ---- | ---- | ------- | ---- | | ✅ | mode | Report file mode | json, human | json | | ❌ | path | Report file output path | string | |

Tasks

| Optional | Parameters | Description | | Default | | ------------ | -------------- | --------------- | ----------- | ----------- | | ❌ | inputs | | string[] | | | ✅ | ignore | | string[] | [] | | ✅ | fileLints | | string[] | [] | | ✅ | coverters | | Coverters[] | |

Coverters

| Optional | Parameters | Description | | Default | | ------------ | --------------- | --------------------------- | ---------------- | ----------- | | ❌ | type | gif, icon,svg, file | string | | | ✅ | icon_scale | | number | 3 | | ✅ | output | CoverterOutput | CoverterOutput | | | ✅ | minimum_quality | minimum png file quality | number | 0.8 | | ✅ | maximum_quality | maximum png file quality | number | 0.9 |

CoverterOutput

| Optional | Parameters | Description | | Default | | ------------ | -------------------- | ------------------------------------------------------------ | ------ | --------------------------- | | ✅ | type | gif, icon,svg, file,vector_drawable,pdf,iconfont | string | same coverter: type | | ❌ | path | output folder path | | | | ✅ | iconfont_family_name | [iconfont] font family name | string | iconfont | | ✅ | iconfont_font_name | [iconfont] font name | string | iconfont | | ✅ | icon_scale | | number | same coverter: icon_scale | | ✅ | icon_suffix | | string | | | ✅ | enable_compression_minimum_size | 该数值以下大小的 png 文件不会经过压缩 | string | 0 |

Example:

---
report:
  mode: 'json'
  path: "./report/report.json"
tasks:
- inputs:
  - "./assets/icons"
  ignore:
  - "./assets/icons/dui_analysis_icon.svg"
  fileLints:
  - name: "文件名只能使用大小写字母下划线"
    pattern: "^[a-zA-Z][0-9a-zA-Z\\_]*$"
  coverters:
  - type: gif
    output:
      path: "./products/android/x3"
  - type: gif
    output:
      path: "./products/ios/icon"
  - type: icon
    icon_scale: 3
    output:
      minimum_quality: 0.7
      maximum_quality: 0.8
      path: "./products/android/x2"
      icon_scale: 2
  - type: icon
    icon_scale: 3
    output:
      path: "./products/android/x3"
  - type: icon
    icon_scale: 3
    output:
      path: "./products/ios/icon"
      icon_scale: 2
      icon_suffix: "@2x"
  - type: icon
    icon_scale: 3
    output:
      path: "./products/ios/icon"
      icon_suffix: "@3x"
  - type: svg
    output:
      type: vector_drawable
      path: "./products/android/vector_template"
  - type: svg
    output:
      type: pdf
      path: "./products/ios/vector_template"
  - type: svg
    output:
      type: iconfont
      path: "./products/flutter/iconfont"
  - type: svg
    output:
      type: iconfont
      path: "./products/ios/iconfont"
      iconfont_family_name: khala_iconfont
      iconfont_font_name: khala_iconfont
- inputs:
  - "./assets/patch9_2x"
  coverters:
  - type: file
    output:
      file_excludes_same_name_with_different_suffixes: true
      path: "./products/android/x2"
- inputs:
  - "./assets/patch9_3x"
  coverters:
  - type: file
    output:
      file_excludes_same_name_with_different_suffixes: true
      path: "./products/android/x3"

Donators

License and Copyright

This software is released under the terms of the Apache license.