Skip to content

Commit

Permalink
docs(example): add example file to run lib from downloaded package
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoee committed Jul 26, 2023
1 parent 627555e commit 1dd601f
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README-cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export STRYKER_DASHBOARD_API_KEY=<the_project_api_token>
echo $STRYKER_DASHBOARD_API_KEY
npx stryker run
# test demo
node ./example/commonjs.js
ts-node ./example/es6.ts
(cd example && node remoteCommonjs.js)
(cd example && ts-node remoteEs6.ts)
## npm
npm run build
npm publish --dry-run
Expand Down
6 changes: 6 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "example",
"dependencies": {
"bahttext": "*"
}
}
28 changes: 28 additions & 0 deletions example/remoteCommonjs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const { bahttext } = require('bahttext')

console.log(bahttext(8.00))
console.log(bahttext(5678.00))
console.log(bahttext(63147.89))
console.log(bahttext(51000001.00))
console.log(bahttext(317.10))
console.log(bahttext(422.26))
console.log(bahttext(11.11))
console.log(bahttext(191415.11))
console.log(bahttext(1.01))
console.log(bahttext(5678.46))
console.log(bahttext(0.67))
console.log(bahttext(-3.00))
console.log(bahttext(-232.00))
console.log(bahttext(-44444.00))
console.log(bahttext(-5678934.00))
console.log(bahttext(-201.00))
console.log(bahttext(-317.10))
console.log(bahttext(-5723.00))
console.log(bahttext(-11.00))
console.log(bahttext(-45621.21))
console.log(bahttext(-191415.11))
console.log(bahttext(-282622.22))
console.log(bahttext(-1.04))
console.log(bahttext(-574.45))
console.log(bahttext(-345.23))
console.log(bahttext(-0.20))
28 changes: 28 additions & 0 deletions example/remoteEs6.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { bahttext } from 'bahttext'

console.log(bahttext(8.00))
console.log(bahttext(5678.00))
console.log(bahttext(63147.89))
console.log(bahttext(51000001.00))
console.log(bahttext(317.10))
console.log(bahttext(422.26))
console.log(bahttext(11.11))
console.log(bahttext(191415.11))
console.log(bahttext(1.01))
console.log(bahttext(5678.46))
console.log(bahttext(0.67))
console.log(bahttext(-3.00))
console.log(bahttext(-232.00))
console.log(bahttext(-44444.00))
console.log(bahttext(-5678934.00))
console.log(bahttext(-201.00))
console.log(bahttext(-317.10))
console.log(bahttext(-5723.00))
console.log(bahttext(-11.00))
console.log(bahttext(-45621.21))
console.log(bahttext(-191415.11))
console.log(bahttext(-282622.22))
console.log(bahttext(-1.04))
console.log(bahttext(-574.45))
console.log(bahttext(-345.23))
console.log(bahttext(-0.20))

0 comments on commit 1dd601f

Please sign in to comment.