Skip to content

Commit

Permalink
feat: show module imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Saganic committed Mar 20, 2023
1 parent 2439fda commit 9eeacb3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/get-package-json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// get-package-json.ts
import fs from "fs"

// read package.json and return its contents
export default () => fs.readFileSync('package.json', 'utf8')
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// main.ts
import fs from "fs"
import getPackageJson from "./get-package-json.js"

// log the contents of package.json
console.log('Working', fs.readFileSync('package.json', 'utf8'))
console.log('Working', getPackageJson())
Empty file removed src/other-file.ts
Empty file.

0 comments on commit 9eeacb3

Please sign in to comment.