From 17ef98cbd291b5d92b1de6c82d949582c6e3ec81 Mon Sep 17 00:00:00 2001 From: Oleksandr Honcharov <0976053529@ukr.net> Date: Tue, 11 Jun 2024 21:34:35 +0300 Subject: [PATCH] cef implementation --- cef/package.json | 23 +++++++++++++++++++++++ cef/src/index.ts | 15 +++++++++++++++ cef/src/types/index.ts | 0 cef/tsconfig.json | 25 +++++++++++++++++++++++++ cef/tsup.config.ts | 12 ++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 cef/package.json create mode 100644 cef/src/index.ts create mode 100644 cef/src/types/index.ts create mode 100644 cef/tsconfig.json create mode 100644 cef/tsup.config.ts diff --git a/cef/package.json b/cef/package.json new file mode 100644 index 0000000..126e214 --- /dev/null +++ b/cef/package.json @@ -0,0 +1,23 @@ +{ + "name": "rage-fw-cef", + "version": "0.0.16-alpha.0", + "main": "dist/index.js", + "types": "dist/src/index.d.ts", + "files": [ + "dist/**/*" + ], + "scripts": { + "build": "tsup" + }, + "dependencies": { + "rage-fw-shared-types": "workspace:^", + "rage-rpc": "^0.4.0" + }, + "peerDependencies": { + "@ragempcommunity/types-cef": "^2.1.8" + }, + "keywords": [], + "author": "SashaGoncharov19", + "license": "MIT", + "description": "CEF side for rage-fw" +} diff --git a/cef/src/index.ts b/cef/src/index.ts new file mode 100644 index 0000000..b3404d3 --- /dev/null +++ b/cef/src/index.ts @@ -0,0 +1,15 @@ +import rpc from 'rage-rpc' + +class Cef { + public register() {} + + public trigger() {} + + public triggerServer() {} + + public triggerClient() {} +} + +export const fw = { + event: new Cef(), +} diff --git a/cef/src/types/index.ts b/cef/src/types/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/cef/tsconfig.json b/cef/tsconfig.json new file mode 100644 index 0000000..ad221cb --- /dev/null +++ b/cef/tsconfig.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Base", + "exclude": [ + "node_modules" + ], + "compilerOptions": { + "incremental": false, + "composite": false, + "target": "ES2022", + "experimentalDecorators": true, + "moduleDetection": "auto", + "module": "CommonJS", + "resolveJsonModule": true, + "declaration": true, + "declarationMap": false, + "sourceMap": false, + "downlevelIteration": false, + "inlineSourceMap": false, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} diff --git a/cef/tsup.config.ts b/cef/tsup.config.ts new file mode 100644 index 0000000..af724fb --- /dev/null +++ b/cef/tsup.config.ts @@ -0,0 +1,12 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + entry: ['src/index.ts'], + outDir: './dist', + format: ['cjs'], + noExternal: ['rage-rpc'], + experimentalDts: true, + splitting: false, + sourcemap: false, + clean: true, +})