Skip to content

Commit

Permalink
🐛 /mcdoc-cli: Remove java-edition, add cwd, fix shebang... (#1178)
Browse files Browse the repository at this point in the history
, revert mts nonsense, bump version

Co-authored-by: SPGoding <i@spgoding.com>
  • Loading branch information
MulverineX and SPGoding authored May 19, 2024
1 parent b95acbc commit 15961aa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions packages/mcdoc-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@spyglassmc/mcdoc-cli",
"version": "0.1.4",
"version": "0.1.5",
"type": "module",
"main": "lib/index.mjs",
"types": "lib/index.d.mts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"contributors": [
{
"name": "Misode",
Expand All @@ -19,7 +19,7 @@
"test": "test/"
},
"bin": {
"mcdoc": "lib/index.mjs"
"mcdoc": "lib/index.js"
},
"scripts": {
"release": "npm publish",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S tsx
#!/usr/bin/env -S node
import { dirname, join, parse, resolve } from 'path'
import { fileURLToPath, pathToFileURL } from 'url'

Expand All @@ -16,7 +16,6 @@ import {
VanillaConfig,
} from '@spyglassmc/core'
import { NodeJsExternals } from '@spyglassmc/core/lib/nodejs.js'
import * as je from '@spyglassmc/java-edition'
import * as mcdoc from '@spyglassmc/mcdoc'

const parentPath = dirname(fileURLToPath(import.meta.url))
Expand Down Expand Up @@ -100,7 +99,8 @@ await CLI.scriptName('mcdoc')
console.trace(message, ...params),
}

const projectPath = resolve(parentPath, args.source)
const projectPath = resolve(process.cwd(), args.source)

await fileUtil.ensureDir(NodeJsExternals, projectPath)

const service = new Service({
Expand All @@ -113,7 +113,7 @@ await CLI.scriptName('mcdoc')
env: { dependencies: [] },
}),
externals: NodeJsExternals,
initializers: [mcdoc.initialize, je.initialize],
initializers: [mcdoc.initialize],
projectRoot: fileUtil.ensureEndingSlash(
pathToFileURL(projectPath).toString(),
),
Expand Down

0 comments on commit 15961aa

Please sign in to comment.