Skip to content

Commit 86cd33c

Browse files
committed
improve config, remove lib
npm need no lib
1 parent 44b8520 commit 86cd33c

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/asset/
22
/dist/
33
/test/
4+
lib.js
45
webpack.config.js

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
[![Build Status][travis]][travis-url]
55
[![npm][npm-download]][npm-dl-url]
6+
[![Webpack][webpack-check]][webpack-url]
67
![Mocha][test-mocha]
7-
![Webpack][webpack-check]
88

99

10-
> Web
10+
> web
1111
1212
```html
1313
<script src="https://unpkg.com/myanmar-notation@latest/lib.js"></script>
@@ -72,11 +72,11 @@ notation.get('27,000,000.00');
7272
```
7373

7474
> Note
75-
7675
[![License: MIT][license]][license-url]
7776

7877
[test-mocha]: https://img.shields.io/badge/test-mocha-green.svg?longCache=true
7978
[webpack-check]: https://img.shields.io/badge/webpack-yes-green.svg?longCache=true
79+
[webpack-url]: https://unpkg.com/myanmar-notation@latest/lib.js
8080
[travis]: https://travis-ci.com/khensolomon/myanmar-notation.svg
8181
[travis-url]: https://travis-ci.org/khensolomon/myanmar-notation
8282
[npm-download]: https://img.shields.io/npm/dt/myanmar-notation.svg

asset/configuration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
export const configuration: any = {
22
name:["သုည","တစ်","နှစ်","သုံး","လေး","ငါး","ခြောက်","ခုနစ်","ရှစ်","ကိုး"],
33
digit:["၀","၁","၂","၃","၄","၅","၆","၇","၈","၉"],
4-
// 1:"ခု",
5-
tone:{1:"", 2:"ဆယ်", 3:"ရာ", 4:"ထောင်", 5:"သောင်း", 6:"သိန်း", 7:"သန်း", 8:"ကု​ဋေ​"},
4+
tone:{1:""/*"ခု"*/, 2:"ဆယ်", 3:"ရာ", 4:"ထောင်", 5:"သောင်း", 6:"သိန်း", 7:"သန်း", 8:"ကု​ဋေ​"},
65
creaky:{2:"ဆယ့်",3:"ရာ့",4:"ထောင့်"},
76
conjunction:{space:" ",comma:"၊ ",and:"နှင့်",plus:"ပေါင်း",over:"ကျော်",times:"ကြိမ်",dot:"ဒဿမ"}
87
};

asset/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Notation from './notation';
1+
import myanmarNotation from './notation';
22
export const Note:any = {
33
get:function(query: string){
4-
return new Notation(query).get();
4+
return new myanmarNotation(query).get();
55
}
66
};
77
export default Note;

asset/notation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ strIntersect = (str:string,from:number=0,to:number=0) => {
8989
return str.split('');
9090
}
9191
},
92-
requestObject = (str:string,callback:any) => {
92+
requestTone = (str:string,callback:any) => {
9393
let strCount:number = str.length, e:any[]=[];
9494
for (let index = 0; index < strCount;++index){
9595
let position:number = strCount - index;
@@ -104,7 +104,7 @@ requestObject = (str:string,callback:any) => {
104104
},
105105
requestCreakyTone = (num:string,from:number=0,to:number=0,pair:string='') => {
106106
let str:any = strIntersect(num,from,to);
107-
return requestObject(str,(position:number,next:number,tone:string)=>{
107+
return requestTone(str,(position:number,next:number,tone:string)=>{
108108
if (str.hasOwnProperty(next) && str[next] > 0){
109109
return configuration.creaky.hasOwnProperty(position)?configuration.creaky[position]:tone;
110110
}
@@ -115,7 +115,7 @@ requestCreakyTone = (num:string,from:number=0,to:number=0,pair:string='') => {
115115
},
116116
requestWrittenTone = (num:string,from:number=0,to:number=0,pair:string='') => {
117117
let str:any = strIntersect(num,from,to);
118-
return requestObject(str,(position:number,next:number,tone:string)=>{
118+
return requestTone(str,(position:number,next:number,tone:string)=>{
119119
return tone;
120120
}).map((k,index,e)=>{
121121
// k:any,index:number,e:any
@@ -127,7 +127,7 @@ requestWrittenTone = (num:string,from:number=0,to:number=0,pair:string='') => {
127127
},
128128
requestCreakyTail = (num:string,from:number=0,to:number=0,pair:string=' ') => {
129129
let str:any = strIntersect(num,from,to);
130-
return requestObject(str,(position:number,next:number,tone:string)=>{
130+
return requestTone(str,(position:number,next:number,tone:string)=>{
131131
if (str.hasOwnProperty(next) && configuration.creaky.hasOwnProperty(position) && str[next] > 0){
132132
return {normal:tone, creaky:configuration.creaky[position]};
133133
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "myanmar-notation",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "get Myanmar digital and notation",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
88
"test": "mocha -r ts-node/register test/index.spec.ts",
99
"test:js": "node test/test",
10-
"build:mod": "tsc",
11-
"build:web": "webpack",
12-
"build": "npm run build:web && npm run build:mod"
10+
"build:node": "tsc",
11+
"build:lib": "webpack",
12+
"build": "npm run build:lib && npm run build:node"
1313
},
1414
"repository": {
1515
"type": "git",

0 commit comments

Comments
 (0)