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

@mmxiong/cs-i18n

v1.0.1

Published

定位项目中 locales 文件夹并进行管理,功能:批量导入、修复冲突、清理垃圾

Downloads

3

Readme

【cs-i18n】多语言 locales 目录管理工具

自动对项目中 locales 目录进行定位并管理

一、使用方法

1. NPM 安装

  • 全局安装
npm i -g @mmxiong/cs-i18n

安装注意:

  1. npm 安装只需几秒,有时候会假死,其实已经安装好了 可以新开终端通过 npm -g list 查看是否安装成功,或输入cs-i18n看看能否运行

  2. 如果使用 yarn 或者 pnpm 安装,必须保证yarnpnpm的环境变量已配置

    yarn global bin,可以获得 yarn 的全局安装目录,将此目录添加到环境变量中

2. 运行命令

终端输入cs-i18n即可 。脚本拥有详细指引错误处理,放心使用。

cs-i18n

二、功能

1. 批量导入

  • 自动解压多语言 zip 压缩包
  • 批量导入解压后的文件到项目的 locales 目录
    • 自动将 %s 替换为 {0}, {1}, {2} ...
    • 重复的 key 自动去重,新导入 key 覆盖旧 key
  • 导入后,自动删除 zip 压缩包

2. 冲突解决

locales目录下的冲突,批量选择如下一种措施:

  • 采用当前更改
  • 采用传入更改
  • 保留双方更改

3. 垃圾清理

  • 检索并统计项目中未使用的 keys,自动排除 node_modules.git 目录
  • [可选] 清理无用 keys

三、联系方式

有任何问题,请联系 @mmx