Skip to content

Commit

Permalink
fix(cli): set node executable and dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed May 12, 2022
1 parent 62ef997 commit 1bfb46a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/cli",
"version": "1.0.6",
"version": "1.0.7",
"description": "Athenna CLI to create new projects and install components.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down Expand Up @@ -34,9 +34,6 @@
"type": "module",
"main": "./src/index.js",
"types": "./src/index.d.ts",
"exports": {
".": "./src/index.js"
},
"imports": {
"#src/*": "./src/*.js",
"#tests/*": "./tests/*.js"
Expand Down
8 changes: 7 additions & 1 deletion src/index.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env node

/**
* @athenna/cli
*
Expand All @@ -11,11 +13,14 @@ import figlet from 'figlet'
import chalkRainbow from 'chalk-rainbow'

import { Command } from 'commander'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { resolve, dirname } from 'node:path'
import { Config, File, Path } from '@secjs/utils'

import { New } from '#src/Commands/New'

const __dirname = dirname(fileURLToPath(import.meta.url))

export class Cli {
/**
* The path where the cli were called.
Expand Down Expand Up @@ -61,6 +66,7 @@ export class Cli {
* @return {Promise<void>}
*/
async main() {
console.log('hello')
await new Config().safeLoad(Path.config('logging.js'))

const newCommand = new New(this.#callPath)
Expand Down

0 comments on commit 1bfb46a

Please sign in to comment.