feat(template): initialize Roblox TypeScript tooling
This commit is contained in:
parent
d8bfccd6ef
commit
3a850924ca
|
|
@ -0,0 +1,11 @@
|
|||
node_modules/
|
||||
out/
|
||||
include/
|
||||
build.rbxlx
|
||||
game.rbxl
|
||||
.rbxts-build/
|
||||
*.rbxl.lock
|
||||
*.rbxlx.lock
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
|
@ -0,0 +1 @@
|
|||
pnpm lint
|
||||
|
|
@ -0,0 +1 @@
|
|||
assets/**/*.gltf
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"printWidth": 100,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"files.exclude": {
|
||||
"**/.git": true,
|
||||
"**/.svn": true,
|
||||
"**/.hg": true,
|
||||
"**/.jj": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/Thumbs.db": true,
|
||||
"**/node_modules": true,
|
||||
"**/out": true,
|
||||
"**/include": true,
|
||||
"**/build.rbxlx": true,
|
||||
"**/game.rbxl": true,
|
||||
"**/.rbxts-build": true,
|
||||
"**/*.rbxl.lock": true,
|
||||
"**/*.rbxlx.lock": true,
|
||||
"**/.env": true,
|
||||
"**/.env.*": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "CrownStudioTemplate",
|
||||
"globIgnorePaths": ["**/package.json", "**/tsconfig.json"],
|
||||
"tree": {
|
||||
"$className": "DataModel",
|
||||
"ServerScriptService": {
|
||||
"$className": "ServerScriptService",
|
||||
"TS": { "$path": "out/server" }
|
||||
},
|
||||
"ReplicatedStorage": {
|
||||
"$className": "ReplicatedStorage",
|
||||
"rbxts_include": {
|
||||
"$path": "include",
|
||||
"node_modules": {
|
||||
"$className": "Folder",
|
||||
"@rbxts": { "$path": "node_modules/@rbxts" },
|
||||
"@rbxts-js": { "$path": "node_modules/@rbxts-js" },
|
||||
"@flamework": { "$path": "node_modules/@flamework" }
|
||||
}
|
||||
},
|
||||
"TS": { "$path": "out/shared" }
|
||||
},
|
||||
"StarterPlayer": {
|
||||
"$className": "StarterPlayer",
|
||||
"StarterPlayerScripts": {
|
||||
"$className": "StarterPlayerScripts",
|
||||
"TS": { "$path": "out/client" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import js from "@eslint/js";
|
||||
import prettier from "eslint-config-prettier";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ["node_modules/**", "out/**", "include/**", "build.rbxlx"] },
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
{
|
||||
files: ["src/**/*.ts", "src/**/*.tsx"],
|
||||
rules: { "no-undef": "off" },
|
||||
},
|
||||
prettier,
|
||||
);
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"version": 1,
|
||||
"flameworkVersion": "1.3.2",
|
||||
"identifiers": {
|
||||
"crownstudio-roblox-ts-template:out/server/services/startup-service@StartupService": "server/services/startup-service@StartupService"
|
||||
},
|
||||
"metadata": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[tools]
|
||||
node = "24.16.0"
|
||||
pnpm = "11.21.0"
|
||||
uv = "0.13.0"
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"name": "crownstudio-roblox-ts-template",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@11.21.0",
|
||||
"engines": {
|
||||
"node": ">=24"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "rbxtsc",
|
||||
"watch": "rbxts-build watch",
|
||||
"build": "pnpm compile && pnpm build:rojo",
|
||||
"build:rojo": "rbxts-build build",
|
||||
"start": "rbxts-build start",
|
||||
"open": "rbxts-build open",
|
||||
"stop": "rbxts-build stop",
|
||||
"serve": "rojo serve default.project.json",
|
||||
"lint": "eslint .",
|
||||
"format:check": "prettier --check .",
|
||||
"format": "prettier --write .",
|
||||
"check": "pnpm lint && pnpm compile",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"rbxts-build": {
|
||||
"names": {
|
||||
"build": "build:rojo"
|
||||
},
|
||||
"rojoBuildArgs": [
|
||||
"default.project.json",
|
||||
"--output",
|
||||
"game.rbxl"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@flamework/components": "1.3.2",
|
||||
"@flamework/core": "1.3.2",
|
||||
"@flamework/networking": "1.3.2",
|
||||
"@rbxts-js/roblox-lua-promise": "3.5.0-ts.2",
|
||||
"@rbxts/cmdr": "1.12.1",
|
||||
"@rbxts/gamejoy": "1.1.4",
|
||||
"@rbxts/lapis": "0.3.8",
|
||||
"@rbxts/log": "0.6.3",
|
||||
"@rbxts/net": "3.0.10",
|
||||
"@rbxts/object-cache": "1.4.5",
|
||||
"@rbxts/react": "17.3.13-ts.1",
|
||||
"@rbxts/react-roblox": "17.3.13-ts.1",
|
||||
"@rbxts/reflex": "4.3.1",
|
||||
"@rbxts/ripple": "0.10.2",
|
||||
"@rbxts/services": "1.6.0",
|
||||
"@rbxts/sift": "0.0.11",
|
||||
"@rbxts/sound-manager": "2.3.4",
|
||||
"@rbxts/t": "3.2.1",
|
||||
"@rbxts/timer": "0.0.9",
|
||||
"@rbxts/trove": "1.3.0",
|
||||
"@rbxts/tween": "1.0.5",
|
||||
"@rbxts/ui-labs": "2.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
"@rbxts/compiler-types": "3.0.0-types.0",
|
||||
"@rbxts/types": "1.0.957",
|
||||
"eslint": "10.12.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"husky": "9.1.7",
|
||||
"prettier": "3.9.10",
|
||||
"rbxts-build": "2.6.0",
|
||||
"rbxts-transformer-flamework": "1.3.2",
|
||||
"roblox-ts": "3.0.0",
|
||||
"typescript": "5.5.3",
|
||||
"typescript-eslint": "8.71.2"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,12 @@
|
|||
minimumReleaseAgeExclude:
|
||||
- "@typescript-eslint/eslint-plugin@8.71.2"
|
||||
- "@typescript-eslint/parser@8.71.2"
|
||||
- "@typescript-eslint/project-service@8.71.2"
|
||||
- "@typescript-eslint/scope-manager@8.71.2"
|
||||
- "@typescript-eslint/tsconfig-utils@8.71.2"
|
||||
- "@typescript-eslint/type-utils@8.71.2"
|
||||
- "@typescript-eslint/types@8.71.2"
|
||||
- "@typescript-eslint/typescript-estree@8.71.2"
|
||||
- "@typescript-eslint/utils@8.71.2"
|
||||
- "@typescript-eslint/visitor-keys@8.71.2"
|
||||
- typescript-eslint@8.71.2
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["config:recommended"],
|
||||
"rangeStrategy": "pin",
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackageNames": [
|
||||
"@flamework/core",
|
||||
"@flamework/components",
|
||||
"@flamework/networking",
|
||||
"rbxts-transformer-flamework"
|
||||
],
|
||||
"groupName": "Flamework"
|
||||
},
|
||||
{
|
||||
"matchPackageNames": ["roblox-ts", "@rbxts/compiler-types"],
|
||||
"groupName": "roblox-ts compiler"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# This file lists tools managed by Rokit, a toolchain manager for Roblox projects.
|
||||
# For more information, see https://github.com/rojo-rbx/rokit
|
||||
|
||||
# New tools can be added by running `rokit add <tool>` in a terminal.
|
||||
|
||||
[tools]
|
||||
rojo = "rojo-rbx/rojo@7.7.1"
|
||||
asphalt = "jackTabsCode/asphalt@2.0.2"
|
||||
darklua = "seaofvoices/darklua@0.19.0"
|
||||
mantle = "blake-mealey/mantle@0.11.18"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import { Flamework } from "@flamework/core";
|
||||
import { TEMPLATE_NAME } from "shared/template-name";
|
||||
|
||||
Flamework.ignite();
|
||||
print(`${TEMPLATE_NAME} ready (client)`);
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
import { Flamework } from "@flamework/core";
|
||||
import { TEMPLATE_NAME } from "shared/template-name";
|
||||
|
||||
Flamework.addPaths("src/server/services");
|
||||
Flamework.ignite();
|
||||
print(`${TEMPLATE_NAME} ready (server)`);
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import { OnStart, Service } from "@flamework/core";
|
||||
|
||||
@Service()
|
||||
export class StartupService implements OnStart {
|
||||
public onStart(): void {
|
||||
print("CrownStudio template ready (server)");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
export const TEMPLATE_NAME = "CrownStudio template";
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"incremental": true,
|
||||
"jsx": "react",
|
||||
"jsxFactory": "React.createElement",
|
||||
"jsxFragmentFactory": "React.Fragment",
|
||||
"module": "commonjs",
|
||||
"moduleDetection": "force",
|
||||
"moduleResolution": "Node",
|
||||
"noLib": true,
|
||||
"outDir": "out",
|
||||
"baseUrl": "src",
|
||||
"resolveJsonModule": true,
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"target": "ESNext",
|
||||
"tsBuildInfoFile": "out/tsconfig.tsbuildinfo",
|
||||
"typeRoots": ["node_modules/@rbxts", "node_modules/@flamework"],
|
||||
"types": ["types", "compiler-types"],
|
||||
"plugins": [{ "transform": "rbxts-transformer-flamework" }]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
||||
}
|
||||
Loading…
Reference in New Issue