chore: configure dependencies and project conf
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -80,7 +80,7 @@ out
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
dist
|
||||
lib
|
||||
.output
|
||||
|
||||
# Gatsby files
|
||||
|
1
dist/check_datapack.d.ts
vendored
Normal file
1
dist/check_datapack.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function checkDatapack(rootDir: String, version: String): Promise<void>;
|
1
dist/check_datapack.d.ts.map
vendored
Normal file
1
dist/check_datapack.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/check_datapack.ts"],"names":[],"mappings":"AAAA,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF"}
|
1
dist/index.d.ts
vendored
Normal file
1
dist/index.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
1
dist/index.d.ts.map
vendored
Normal file
1
dist/index.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/louis/Documents/spyglassmc-action/src/index.ts"],"names":[],"mappings":""}
|
27454
dist/index.js
vendored
Normal file
27454
dist/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/package.json
vendored
Normal file
3
dist/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
1420
package-lock.json
generated
1420
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@@ -5,12 +5,23 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"package": "ncc build src/index.ts -o dist",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"type": "module",
|
||||
"keywords": [],
|
||||
"author": "LordBaryhobal",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.3.1",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/github": "^6.0.1",
|
||||
"@spyglassmc/core": "^0.4.34",
|
||||
"@spyglassmc/java-edition": "^0.3.45",
|
||||
"@spyglassmc/mcdoc": "^0.3.38"
|
||||
}
|
||||
}
|
||||
|
3
src/check_datapack.ts
Normal file
3
src/check_datapack.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export async function checkDatapack(rootDir: String, version: String): Promise<void> {
|
||||
console.log(`Checking datapack in director ${rootDir} for Minecraft version ${version}`)
|
||||
}
|
21
src/index.ts
21
src/index.ts
@@ -1 +1,20 @@
|
||||
console.log("Hello World!")
|
||||
import * as core from "@actions/core"
|
||||
import { checkDatapack } from "./check_datapack.js"
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const rootDir = core.getInput("dir")
|
||||
let version = core.getInput("version")
|
||||
if (version === "") {
|
||||
version = "auto"
|
||||
}
|
||||
await checkDatapack(rootDir, version)
|
||||
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run()
|
@@ -3,12 +3,13 @@
|
||||
"compilerOptions": {
|
||||
// File Layout
|
||||
// "rootDir": "./src",
|
||||
"outDir": "dist",
|
||||
"outDir": "lib",
|
||||
|
||||
// Environment Settings
|
||||
// See also https://aka.ms/tsconfig/module
|
||||
"module": "commonjs",
|
||||
"target": "es2019",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"target": "es2024",
|
||||
"types": [],
|
||||
// For nodejs:
|
||||
// "lib": ["esnext"],
|
||||
|
Reference in New Issue
Block a user