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

lingascript-tw

v0.3.0

Published

LingaScript is TypeScript that support Traditional Chinese keywords

Downloads

7

Readme

LingaScript-tw

LingaScript-tw 是支援正體(繁體)中文關鍵字的 TypeScript 編譯器。語法衍生自 Typescript (和 Javascript)。

LingaScript-tw 可以將以正體中文撰寫的腳本編譯成 Javascript,可在任意支援Javascript的環境中執行。

歡迎探索非英語程式語言 的朋友一同參與,我們可以透過改進共用的核心,來提供更好用的非英語程式語言工具。具體請查看LingaScript專案網站

Non-english programming adventurers can easily add your local language, work together to improve the same core, and get benifit for the shared programming tools with better local language support. Check out the LingaScript repo.

支援的本地語言

LingaScript-tw 支援正體中文與英文關鍵字(Keywords),要支援別的語言需分別安裝不同套件。

使用說明

可使用npm命令安裝 LingaScript:

npm install -g lingascript-tw

安裝後可得到tsc命令. (和TypeScript相同)

建立測試.ts檔案如下

變數 一切都是 = 假的;

或加上 TypeScript 宣告

變數 一切都是:真假 = 假的;

然後使用以下命令編譯

tsc 測試.ts

則會輸出測試.js

var 一切都是 = false;

LingaScript 支援所有 TypeScript 編譯器的命令,所以也可以用如下指令

tsc examples/tw/src/測試.ts --outFile test.js

測試.ts輸出成test.js

要顯示中文的錯誤訊息,可以在執行tsc命令時加上--locale zh-tw參數, 如:

tsc --locale zh-tw test.ts

更多範例可參考 https://github.com/gasolin/lingascript/tree/master/examples/tw .

安裝到專案中 (而非安裝到全域)

先建立專案資料夾,並安裝 lingascript-tw

$ mkdir demo && cd demo && npm init
$ npm install lingascript-tw

編輯package.json加入以下設定

scripts: {
  "compile": "./node_modules/lingascript-tw/bin/tsc 測試.ts"
},
"devDependencies": {
  "lingascript-tw": "^0.2.0",
},

即可在專案中使用中文關鍵字開發程式,使用npm run compile命令進行編譯。

版本歷程

查看 https://github.com/gasolin/lingascript/blob/master/CHANGELOG.md

授權

Apache-2.0 License