Skip to content
Open
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
96 changes: 5 additions & 91 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,102 +76,16 @@
"url": "git+https://github.com/sandstone-mc/sandstone.git"
},
"scripts": {
"build": "tsup --tsconfig tsconfig.build.json --onSuccess \"pnpm run setup\"",
"watch": "tsup --tsconfig tsconfig.build.json --onSuccess \"pnpm run setup\" --watch",
"build-types": "tsc --project tsconfig.build.json",
"setup-package": "node ./scripts/setupPackage.mjs",
"setup": "pnpm run build-types && pnpm run setup-package && echo ✔️ Successfully built Sandstone.",
"build": "tsup --tsconfig tsconfig.json && echo ✔️ Successfully built Sandstone.",
"watch": "tsup --tsconfig tsconfig.json --onSuccess \"echo ✔️ Successfully built Sandstone.\" --watch",
"publishToNpm": "pnpm run build && pnpm publish",
"format": "biome format --write src",
"lint": "biome lint src",
"check": "biome check --write src",
"test": "vitest",
"test:run": "vitest run"
},
"type": "module",
"main": "index.js",
"module": "index.js",
"types": "index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"default": "./dist/index.js"
},
"./*": {
"types": "./dist/*.d.ts",
"import": "./dist/*.js",
"default": "./dist/*.js"
},
"./arguments": {
"types": "./dist/arguments/index.d.ts",
"import": "./dist/arguments/index.js",
"default": "./dist/arguments/index.js"
},
"./arguments/generated": {
"types": "./dist/arguments/generated/index.d.ts",
"import": "./dist/arguments/generated/index.js",
"default": "./dist/arguments/generated/index.js"
},
"./arguments/resources": {
"types": "./dist/arguments/resources/index.d.ts",
"import": "./dist/arguments/resources/index.js",
"default": "./dist/arguments/resources/index.js"
},
"./arguments/resources/criteria": {
"types": "./dist/arguments/resources/criteria/index.d.ts",
"import": "./dist/arguments/resources/criteria/index.js",
"default": "./dist/arguments/resources/criteria/index.js"
},
"./commands": {
"types": "./dist/commands/index.d.ts",
"import": "./dist/commands/index.js",
"default": "./dist/commands/index.js"
},
"./commands/implementations": {
"types": "./dist/commands/implementations/index.d.ts",
"import": "./dist/commands/implementations/index.js",
"default": "./dist/commands/implementations/index.js"
},
"./core": {
"types": "./dist/core/index.d.ts",
"import": "./dist/core/index.js",
"default": "./dist/core/index.js"
},
"./core/resources": {
"types": "./dist/core/resources/index.d.ts",
"import": "./dist/core/resources/index.js",
"default": "./dist/core/resources/index.js"
},
"./flow": {
"types": "./dist/flow/index.d.ts",
"import": "./dist/flow/index.js",
"default": "./dist/flow/index.js"
},
"./flow/conditions": {
"types": "./dist/flow/conditions/index.d.ts",
"import": "./dist/flow/conditions/index.js",
"default": "./dist/flow/conditions/index.js"
},
"./pack": {
"types": "./dist/pack/index.d.ts",
"import": "./dist/pack/index.js",
"default": "./dist/pack/index.js"
},
"./pack/visitors": {
"types": "./dist/pack/visitors/index.d.ts",
"import": "./dist/pack/visitors/index.js",
"default": "./dist/pack/visitors/index.js"
},
"./variables": {
"types": "./dist/variables/index.d.ts",
"import": "./dist/variables/index.js",
"default": "./dist/variables/index.js"
},
"./variables/nbt": {
"types": "./dist/variables/nbt/index.d.ts",
"import": "./dist/variables/nbt/index.js",
"default": "./dist/variables/nbt/index.js"
}
}
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts"
}
81 changes: 0 additions & 81 deletions scripts/setupPackage.mjs

This file was deleted.

7 changes: 2 additions & 5 deletions src/arguments/resources/datapack/itemModifier.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// @ts-nocheck

/* eslint-disable camelcase */
import type { JSONTextComponent, LootTableEntry } from 'sandstone/arguments'
import type { BASIC_COLORS, MAP_ICONS } from 'sandstone/arguments/basics'
import type { ATTRIBUTES, BLOCKS, ENCHANTMENTS, STRUCTURES } from 'sandstone/arguments/generated'
import type { LootTableClass } from 'sandstone/core'
import type { LiteralUnion } from 'sandstone/utils'
import type { DataInstance } from 'sandstone/variables/Data'
import type { DataPointClass } from 'sandstone/variables/Data'
import type { NumberProvider } from './criteria/utils.js'
import type { ObjectOrArray, PredicateCondition } from './predicate.js'

Expand Down Expand Up @@ -128,7 +125,7 @@ export type ItemModifierFunction = {
}
| {
type: 'minecraft:storage'
source: string | DataInstance<'storage'>
source: string | DataPointClass<'storage'>
}

/** A list of operations. */
Expand Down
2 changes: 1 addition & 1 deletion src/commands/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
MeCommand,
ParticleCommand,
PlaySoundCommand,
RandomCommand,
RawCommand,
RecipeCommand,
ReloadCommand,
Expand Down Expand Up @@ -61,7 +62,6 @@ import {
WeatherCommand,
WorldBorderCommand,
} from './implementations/index.js'
import { RandomCommand } from './implementations/server/random.js'

function bind<CLASS, METHOD extends string>(pack: SandstonePack, _class: CLASS, method: METHOD) {
/* @ts-ignore */
Expand Down
11 changes: 0 additions & 11 deletions tests/tsconfig.json

This file was deleted.

2 changes: 1 addition & 1 deletion tests/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MCFunction, sandstonePack, say } from 'sandstone'
import { SayCommandNode } from 'sandstone/commands'
import type { CommandNode, Node } from 'sandstone/core'
import { describe, expect, it } from 'vitest'
import { SayCommandNode } from '../dist/commands'

type ConstructorArgsWithoutFirst<T extends new (...args: any) => any> = T extends new (
first: any,
Expand Down
66 changes: 0 additions & 66 deletions tsconfig.base.json

This file was deleted.

17 changes: 0 additions & 17 deletions tsconfig.build.json

This file was deleted.

32 changes: 28 additions & 4 deletions tsconfig.json
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.build.json" },
{ "path": "./tests/tsconfig.json" }
"compilerOptions": {
"baseUrl": ".",
"paths": {
"sandstone": [
"./src/index.ts"
],
"sandstone/*": [
"./src/*"
]
},
"types": [
"node"
],
"module": "NodeNext",
"target": "ESNEXT",
"resolveJsonModule": true,
"isolatedModules": true,
"strict": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"rootDir": ".",
"stripInternal": true,
},
"include": [
"src",
"tests",
]
}
Loading