Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ my-addon/
│ ├── behavior_pack/
│ └── resource_pack/
├── pack/ # .mcaddon output
├── quick-start.json # Project configuration
├── mcbe.config.json # Project configuration
├── package.json
└── tsconfig.json # Only for TypeScript projects
```
Expand Down
2 changes: 1 addition & 1 deletion src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const TS_FILTER = (src: string) => !src.endsWith('.ts')
export async function buildCommand(options: { package?: boolean }) {
const projectDir = getProjectDir()
if (!projectDir) {
console.error(pc.red(' ✗ No quick-start.json found'))
console.error(pc.red(' ✗ No mcbe.config.json found'))
process.exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function syncDir(src: string, dest: string, label: string) {
export async function devCommand(options: DevOptions = {}) {
const projectDir = getProjectDir()
if (!projectDir) {
console.error(pc.red(' ✗ No quick-start.json found'))
console.error(pc.red(' ✗ No mcbe.config.json found'))
process.exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { getProjectConfig, getProjectDir } from '../core/project.js'
export async function manifestCommand() {
const projectDir = getProjectDir()
if (!projectDir) {
console.error(pc.red(' ✗ No quick-start.json found'))
console.error(pc.red(' ✗ No mcbe.config.json found'))
process.exit(1)
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getMcPaths, getMcProjectDir } from '../utils/mcpath.js'
export async function syncCommand() {
const projectDir = getProjectDir()
if (!projectDir) {
console.error(pc.red(' ✗ No quick-start.json found'))
console.error(pc.red(' ✗ No mcbe.config.json found'))
process.exit(1)
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { QuickStartConfig } from '../types.js'
import { existsSync, readFileSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'

const CONFIG_FILE = 'quick-start.json'
const CONFIG_FILE = 'mcbe.config.json'

export function getProjectDir(): string | null {
let dir = process.cwd()
Expand All @@ -16,7 +16,7 @@ export function getProjectDir(): string | null {

export function getProjectConfig(projectDir?: string): QuickStartConfig {
const dir = projectDir || getProjectDir()
if (!dir) { throw new Error('No quick-start.json found. Are you in a project directory?') }
if (!dir) { throw new Error('No mcbe.config.json found. Are you in a project directory?') }

const configPath = join(dir, CONFIG_FILE)
if (!existsSync(configPath)) { throw new Error(`Config file not found: ${configPath}`) }
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mcpath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function getMcPaths(projectDir?: string): McPaths | null {
}

if (projectDir) {
const configPath = join(projectDir, 'quick-start.json')
const configPath = join(projectDir, 'mcbe.config.json')
if (existsSync(configPath)) {
try {
const config: QuickStartConfig = JSON.parse(readFileSync(configPath, 'utf-8'))
Expand Down
Loading