From 376313ec945f320b1e85d18041807d2703b43320 Mon Sep 17 00:00:00 2001 From: Amer Harb Date: Mon, 11 Mar 2024 21:59:17 +0100 Subject: [PATCH] eastern-arabic/version/0.0.1-next.0 --- packages/eastern-arabic/package.json | 2 +- packages/numerals-client/package.json | 17 +++++++++++++++++ packages/numerals-client/src/index.ts | 21 +++++++++++++++++++++ packages/numerals-client/tsconfig.json | 6 ++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 packages/numerals-client/package.json create mode 100644 packages/numerals-client/src/index.ts create mode 100644 packages/numerals-client/tsconfig.json 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", + } +}