Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Sep 30, 2024
1 parent c1a8a4e commit 6edd589
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 116 deletions.
46 changes: 1 addition & 45 deletions examples/TypeScriptExample/.gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
package-lock.json
yarn.lock
.pnpm-debug.log

# Typescript
dist/
*.tsbuildinfo

# Logs
logs
*.log
logs/*

# OS generated files
.DS_Store
Thumbs.db

# IDEs and Editors
.vscode/
.idea/
*.suo
*.ntvs*
*.njsproj
*.sln

# Testing
coverage/

# Optional npm cache directory
.npm/
.npmrc

# TypeScript cache
*.tsbuildinfo

# Mac system files
.DS_Store

# Environment variables
.env
.env.*
*.log
4 changes: 0 additions & 4 deletions examples/TypeScriptExample/index.js

This file was deleted.

2 changes: 0 additions & 2 deletions examples/TypeScriptExample/index.ts

This file was deleted.

28 changes: 28 additions & 0 deletions examples/TypeScriptExample/package-lock.json

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

33 changes: 14 additions & 19 deletions examples/TypeScriptExample/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
{
"name": "typescriptexample",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"start": "node dist/index.js"
},
"keywords": [],
"author": "",
"type": "module",
"license": "ISC",
"description": "",
"dependencies": {
"web5": "../../bound/typescript"
},
"devDependencies": {
"typescript": "^5.6.2"
"name": "web5-example",
"version": "1.0.0",
"description": "A simple Hello World in TypeScript as an ES Module",
"type": "module",
"main": "./dist/index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {},
"devDependencies": {
"typescript": "^5.0.0"
}
}
}
34 changes: 0 additions & 34 deletions examples/TypeScriptExample/pnpm-lock.yaml

This file was deleted.

3 changes: 3 additions & 0 deletions examples/TypeScriptExample/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { generate_ed25519_key } from '../../../bound/typescript/dist/web5_wasm';

console.log(generate_ed25519_key());
25 changes: 13 additions & 12 deletions examples/TypeScriptExample/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./",
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"include": ["./**/*.ts"],
"exclude": ["node_modules"]
}
"compilerOptions": {
"target": "ES2020", // Output ES2020 code
"module": "ESNext", // Use ES modules
"moduleResolution": "node", // Resolve modules like Node.js
"outDir": "./dist", // Output directory for compiled JS
"strict": true, // Enable strict type-checking
"esModuleInterop": true, // Ensure interoperability between CommonJS and ES modules
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"include": ["src/**/*"]
}

0 comments on commit 6edd589

Please sign in to comment.