Skip to content

Commit

Permalink
version undefined print fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
NazmusSayad committed Aug 20, 2024
1 parent 7051dc0 commit 57cfc64
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "npmize",
"description": "Let's create an npm package without worrying about anything.",
"version": "1.0.1",
"version": "1.0.2",
"bin": "./dist/index.js",
"scripts": {
"lab": "nodemon ./src/__lab.ts",
Expand Down
2 changes: 0 additions & 2 deletions src/__lab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ console.clear()

import app from './main'

app.start(['-v'])

// app.start(['init', '--name', '../npmize-test'])
// app.start(['dev', '../npmize-test', '--node'])
// app.start(['build', '../npmize-test'])
5 changes: 1 addition & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export function cleanDir(dir: string, createDir = true) {
}

export function getVersion() {
const { version } = packageJSON.read(path.join(__dirname, '../'))

if (version) console.log(`v${version}`)
else console.log('No version found in package.json')
return packageJSON.read(path.join(__dirname, '../')).version
}

export function moveFiles(
Expand Down

0 comments on commit 57cfc64

Please sign in to comment.