mirror of
https://github.com/MincoMK/create-computercraft.git
synced 2025-12-10 06:33:18 +00:00
init
This commit is contained in:
3
templates/executable/.gitignore
vendored
Normal file
3
templates/executable/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
dist/**/*
|
||||
node_modules
|
||||
pnpm-lock.yaml
|
||||
25
templates/executable/package.json
Normal file
25
templates/executable/package.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "{{ PROJECT_NAME }}",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"license": "ISC",
|
||||
"author": "",
|
||||
"type": "commonjs",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tstl",
|
||||
"postbuild": "node scripts/postbuild.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.27.0",
|
||||
"computercraft-ts": "^1.0.0",
|
||||
"eslint": "^9.27.0",
|
||||
"globals": "^16.2.0",
|
||||
"luamin": "^1.0.4",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.33.0",
|
||||
"typescript-to-lua": "^1.31.1",
|
||||
"typescript-tstl-plugin": "^0.3.2"
|
||||
},
|
||||
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
|
||||
}
|
||||
14
templates/executable/scripts/postbuild.js
Normal file
14
templates/executable/scripts/postbuild.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const luamin = require("luamin");
|
||||
const fs = require("fs");
|
||||
const Path = require("path");
|
||||
|
||||
const c = fs.readFileSync(
|
||||
Path.resolve(__dirname, "../dist/bundle.lua"),
|
||||
"utf8",
|
||||
);
|
||||
const min = luamin.minify(c);
|
||||
fs.writeFileSync(
|
||||
Path.resolve(__dirname, "../dist/bundle.min.lua"),
|
||||
min,
|
||||
"utf8",
|
||||
);
|
||||
1
templates/executable/src/main.ts
Normal file
1
templates/executable/src/main.ts
Normal file
@@ -0,0 +1 @@
|
||||
print("Hello, world!");
|
||||
20
templates/executable/tsconfig.json
Normal file
20
templates/executable/tsconfig.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/TypeScriptToLua/TypeScriptToLua/master/tsconfig-schema.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"lib": ["ESNext"],
|
||||
"types": ["computercraft-ts"],
|
||||
"moduleResolution": "Node",
|
||||
"strict": true,
|
||||
"plugins": [{ "name": "typescript-tstl-plugin" }],
|
||||
"outDir": "dist",
|
||||
"noImplicitAny": false
|
||||
},
|
||||
"tstl": {
|
||||
"luaTarget": "5.4",
|
||||
"noHeader": true,
|
||||
"luaBundle": "bundle.lua",
|
||||
"luaBundleEntry": "src/main.ts"
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
Reference in New Issue
Block a user