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

auto-command

v1.8.0-alpha.2

Published

Automatic command

Downloads

6

Readme

auto-command

An efficiency tool to reduce copy and paste operations

Function

  • Support both command line interface and command usage
  • Automatic translation
    • Supports automatic generation of ant-design/pro-components (single file layer) internationalization files
    • Supports automatic generation of ant-design/ant-design-pro (directory level) internationalization files
    • Supports automatic generation of internationalization files for React Intl projects
  • Branch diff comparison and export diff file | git diff

automatic translation

Instructions

You have to configure the .autocmd.ts file

import { defineConfig } from 'auto-command/lib';

export default defineConfig({
  translate: {
    // path (required): absolute or relative path to the locales file
    outDir: '/xxx/xxx/xxx/src/locales',
    // Whether to keep the previous translation unchanged (optional), enabled by default
    keep: true,
    // type (optional): defaults to directory (antd-pro mode)
    type: 'dir',
    // Hook function (optional): custom output
    hook: {
      filter: () => {},
      convertContent: { input: () => {}, out: () => {} },
      handleData: () => {},
    },
    // Language conversion (optional): Convert from Chinese to English by default, the output file name is related to this configuration
    language: {
      from: 'zh-CN',
      to: ['en-US'],
    },
    // Separator (optional): The default is -, if your file name is not separated by -, you need to configure
    separator: '-',
    // Configure your .prettier.js file path (absolute path or relative path). After translation, the output file will be formatted with your configuration to avoid useless changes
    prettierPath: '/xxx/.prettierrc.js',
    // Translator type (optional): default youdao
    translatorType: 'youdao',
    // google translator configuration (optional): empty by default
    google: {
      proxy: {
        host: '127.0.0.1',
        port: 7890,
      },
    },
    // youdao translator configuration (optional): there is a value by default, if the translation fails, the balance may be insufficient, please configure
    youdao: {
      key: 'xxx',
      secret: 'xxx',
    },
  },
});
$ npm i auto-command
$ npx ac
**** Please select the task to be performed **** (Use arrow keys)
  git diff
❯ translate
or
$ npx ac -t=translate

achievement

  • 500 pieces of data translation in 4 seconds
  • 54 languages supported
  • Support configuration file prompts
  • Support for supplementary translations on already translated projects
  • Support custom delimiter
  • Support multiple translators: Google Translate (recommended abroad), Youdao Translator (recommended in China)

Branch diff comparison and export diff file

Instructions

$ npm i auto-command
$ npx ac
**** Please select the task to be performed **** (Use arrow keys)
❯ git diff
  translate
or
$ npx ac -t=diff

In this way, you can compare two branches (by default, the current branch is compared with the master branch) and export the comparison result file

LICENSE

MIT