Skip to content

Commit

Permalink
Add typescript example
Browse files Browse the repository at this point in the history
Reproduction case for uuidjs/uuid#466
  • Loading branch information
ctavan committed Jun 8, 2020
0 parents commit 83d0670
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { v4 } from 'uuid';
console.log(v4());
19 changes: 19 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "uuid-example-typescript",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc --build tsconfig.json",
"test": "npm run build && node dist/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"uuid": "^8.1.0"
},
"devDependencies": {
"typescript": "^3.9.5"
}
}
15 changes: 15 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true
},
"exclude": ["node_modules", "dist"]
}

0 comments on commit 83d0670

Please sign in to comment.