Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export amd module #382

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Thumbs.db
*.pyo
build
esm
amd
lib
lib2
node_modules
Expand Down
2 changes: 1 addition & 1 deletion README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Convert Han to pinyin. useful for phonetic notation, sorting, and searching.
via npm:

```bash
npm install pinyin@alpha --save
npm install pinyin --save
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion README.ko-KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ README: [简体中文](README.md) | [English](README.en-US.md) | 한국어
via npm:

```bash
npm install pinyin@alpha --save
npm install pinyin --save
```

## 사용법
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ README: 简体中文 | [English](README.en-US.md) | [한국어](README.ko-KR.md)
via npm:

```bash
npm install pinyin@alpha --save
npm install pinyin --save
```

## 用法
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pinyin",
"version": "3.0.0-alpha.7",
"version": "3.1.0",
"description": "汉语拼音转换工具。",
"main": "./lib/pinyin.js",
"module": "./esm/pinyin.js",
Expand All @@ -23,7 +23,8 @@
"scripts": {
"start": "dumi dev",
"prepublishOnly": "npm run build",
"build": "tsc --downlevelIteration -p tsconfig-es5.json & tsc --downlevelIteration -p tsconfig.json",
"build": "tsc --downlevelIteration -p tsconfig-es5.json & tsc --downlevelIteration -p tsconfig.json & npm run build:amd",
"build:amd": "tsc --downlevelIteration -p tsconfig-amd.json",
"doc:build": "rm -rf ./src/.umi && dumi build",
"doc:deploy": "npm run doc:build && cp CNAME docs-dist/dist && gh-pages -d docs-dist/dist",
"lint": "eslint ./src/ ./test/",
Expand All @@ -46,6 +47,7 @@
"@typescript-eslint/parser": "^5.14.0",
"aurl": "^1.2.0",
"aws-sdk": "^2.1011.0",
"beautify-benchmark": "^0.2.4",
"benchmark": "~1.0.0",
"dumi": "^1.1.30",
"eslint": "^8.11.0",
Expand Down Expand Up @@ -74,6 +76,7 @@
"data",
"lib",
"esm",
"amd",
"index.js"
],
"keywords": [
Expand All @@ -87,5 +90,8 @@
"example": "examples",
"test": "test"
},
"engines": {
"install-node": "^18.0.0"
},
"license": "MIT"
}
8 changes: 8 additions & 0 deletions tsconfig-amd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outFile": "./amd/pinyin.js",
"module": "amd",
"target": "ES5"
}
}