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

@tianqiubiao/vite-plugin-vue-intl

v0.1.2

Published

A vite plugin for Vue intl

Downloads

417

Readme

intl

一个 vite 插件,用于提取项目中的文案

安装方式

pnpm add @tqb/vite-plugin-vue-intl

import vueIntl from '@tqb/vite-plugin-vue-intl'

vueIntl()

params

  1. configPath vite.config.js 文件路径
  2. projectPath 项目目录 默认 src
  3. syncApi 同步文案接口
  4. langs 语言列表
vueIntl({
  defaultLang: 'zh_CN',// 默认语言
  langs: [['英文', 'en_US', 'en']],// 语言列表 [语言描述,项目使用语言,对应翻译 api 需要的语言]
  translate: { // 翻译 api 配置
    baidu: {
      appid: '',// baidu appid
      secret: ''// baidu pass
    },
    ali:{
      appid: '', // ali accessKeyId
      secret: '' // ali accessKeySecret
    }
  },
  syncText(){// 同步数据
     return Promise.resolve()
  }
})

0.0.0

  1. 仅支持提取 Intl.get().d() 形式文案,不支持字符串拼接,仅提取字符串
  2. 仅支持整个项目提取,不支持单个文件提取
  3. 建议使用百度翻译,阿里翻译使用的sdk,报错服务会宕机

0.1.0

  1. 添加了删除
  2. 添加行同步
  3. 可以进行数据合并(仅合并数据,不增加语言,语言以配置为准)