This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): Add deno.json and mod.ts, update the build workflows an…
…d config files This commit includes the addition of deno.json and mod.ts files to better structure the project and also enhances the build processes by implementing an updated jsr-publish workflow in GitHub. This update ensures the version in deno.json is updated during the build. Additionally, changes have been made to tsconfig.json file to include 'mod.ts' and 'renovate.json' file to enhance versioning practices.
- Loading branch information
Showing
5 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish JSR Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish-jsr: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
registry-url: https://npm.pkg.github.com/ | ||
- name: Build commonjs, es6, esnext and amd | ||
run: | | ||
yarn build:cjs | ||
yarn build:es | ||
yarn build:types | ||
- name: Install jq | ||
uses: dcarbone/[email protected] | ||
- name: Update version in deno.json | ||
run: | | ||
VERSION_NUMBER="$(node -p "require('./package.json').version")" | ||
jq '.version = "'$VERSION_NUMBER'"' deno.json > temp.json | ||
mv temp.json deno.json | ||
- name: Install Deno | ||
uses: denoland/[email protected] | ||
- name: Publish to jsr | ||
run: deno publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "@hckhanh/read-vn-number", | ||
"version": "0.0.0-development", | ||
"exports": "./mod.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* This is a helper that convert a number to a string like the way a real Vietnamese read it. | ||
* | ||
* @example | ||
* ```ts | ||
* import readNumber from 'read-vn-number' | ||
* | ||
* readNumber('19990000') // or readNumber(19990000) | ||
* // output: mười chín triệu chín trăm chín mươi nghìn | ||
* ``` | ||
* | ||
* @module | ||
*/ | ||
export * from './src' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters