0.3.0 • Published 11 months ago

@libreservice/my-opencc v0.3.0

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
-
Last release
11 months ago

My OpenCC

npm.io

Convert between Simplified and Traditional Chinese.

https://my-opencc.vercel.app/

This is a STATIC website so you DON'T need to own a server to host it.

All computation is performed in browser, thanks to Web Assembly.

It's also a PWA, so you can install it like a native App and use it OFFLINE.

Transform matrix

源\目标sttwhkjp
s-s2ts2tw(p)s2hk-
tt2s-t2twt2hkt2jp
twtw2s(p)tw2t---
hkhk2shk2t---
jp-jp2t---

Self host

Download latest artifact built by GitHub Actions.

Development workflow

My OpenCC can be built on Linux and macOS.

For Windows, you may use WSL.

Install node

You may use nvm to install node.

Install pnpm and dev dependencies

npm i -g pnpm
pnpm i

Install emsdk

https://emscripten.org/docs/getting_started/downloads.html

Get submodule

git submodule init
git submodule update

Build wasm

pnpm run native
pnpm run lib
pnpm run wasm

Run develop server

pnpm run dev

Lint

pnpm run lint:fix

Check type

pnpm run check

Build

pnpm run build

Test

pnpm run test

Preview

pnpm run preview

Deploy

export LIBRESERVICE_CDN=https://cdn.jsdelivr.net/npm/@libreservice/my-opencc@VERSION/dist/ # optional
vercel build --prod
vercel deploy --prebuilt --prod

License

AGPLv3+

0.3.0

11 months ago

0.2.0

12 months ago

0.1.0

1 year ago