diff --git a/packages/eastern-arabic/package.json b/packages/eastern-arabic/package.json index 5cbff91..222b2ff 100644 --- a/packages/eastern-arabic/package.json +++ b/packages/eastern-arabic/package.json @@ -1,6 +1,6 @@ { "name": "@numerals/eastern-arabic", - "version": "0.0.1", + "version": "0.0.1-next.0", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "files": [ diff --git a/packages/numerals-client/package.json b/packages/numerals-client/package.json new file mode 100644 index 0000000..291a789 --- /dev/null +++ b/packages/numerals-client/package.json @@ -0,0 +1,17 @@ +{ + "name": "numerals-client", + "private": true, + "version": "0.0.1", + "main": "dist/index.js", + "scripts": { + "build": "rm -rf dist && tsc", + "start": "node dist/index.js", + "test": "echo \"Error: no test specified\" && exit 0", + "dev": "npx ts-node src/index.ts", + "lint": "npx eslint . --max-warnings 0", + "lint:fix": "npx eslint . --fix" + }, + "dependencies": { + "@numerals/eastern-arabic": "workspace:^" + } +} diff --git a/packages/numerals-client/src/index.ts b/packages/numerals-client/src/index.ts new file mode 100644 index 0000000..3df1e52 --- /dev/null +++ b/packages/numerals-client/src/index.ts @@ -0,0 +1,21 @@ +import { convert } from '@numerals/eastern-arabic' + +log('@numerals/eastern-arabic') + +log(calmConvert(123)) +log(calmConvert(123.456)) + +log('Done') + +function calmConvert(source: number): string { + try { + return convert(source) + } catch (e: any) { + return e.message + } +} + +function log(message: string): void { + // eslint-disable-next-line no-console + console.log(message) +} diff --git a/packages/numerals-client/tsconfig.json b/packages/numerals-client/tsconfig.json new file mode 100644 index 0000000..9f0325b --- /dev/null +++ b/packages/numerals-client/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + } +}