Last active
July 8, 2024 23:47
-
-
Save Jaakkonen/4672efd87fcf2e58bd8f57067e743a42 to your computer and use it in GitHub Desktop.
NodeJs commonjs import challenge
This file contains hidden or 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
| import { UndirectedGraph } from "graphology"; | |
| const a = new UndirectedGraph(); |
This file contains hidden or 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
| { | |
| "name": "demo", | |
| "version": "1.0.0", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "description": "", | |
| "dependencies": { | |
| "@swc/core": "^1.6.13", | |
| "graphology": "^0.25.4", | |
| "ts-node": "^10.9.2", | |
| "typescript": "^5.5.3" | |
| }, | |
| "type": "module" | |
| } |
This file contains hidden or 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
| #!/bin/sh | |
| npx node --loader=ts-node/esm index.ts |
This file contains hidden or 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
Show hidden characters
| { | |
| "compilerOptions": { | |
| "target": "ES2022", | |
| "lib": ["ES2023"], | |
| "module": "NodeNext", | |
| "moduleResolution": "NodeNext", | |
| "outDir": "./dist", | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment