Giter Club home page Giter Club logo

imbaphomettt / rage-lua-types Goto Github PK

View Code? Open in Web Editor NEW
45.0 3.0 14.0 1.17 MB

What is JetbrainIDE-cfx.re ? It is a small tool that will allow any JetBrain software user to benefit from the self-completion of the natives of the cfx.re platform on their IDE. (RedM and FiveM)

Home Page: https://dylan-malandain.io/

License: GNU General Public License v3.0

TypeScript 100.00%
jetbrains-ides citizenfx fivem completion native typescript redm jetbrainide-citizenfx fivem-platform jetbrain

rage-lua-types's Introduction

JetbrainIDE-CFX.RE

TypeScript License OpenIssue LastReleases

How to use this tool to generate / regenerate CitizenFX native ?

Attention this project requires the installation of NodeJS on the machine where you want to run it

  1. Git clone projet

  2. Open a terminal in the folder where it is located JetbrainIDE-CitizenFX.

  3. Execute the following command npm i and wait.

  4. Execute npm install -g ts-node

  5. Execute npm install -g typescript

  6. Once the dependencies install install execute the following command to start the generation of natives npm run gta or npm run rdr3 or npm run cfx

  7. Wait a few minutes, once the generation is finished nothing more to be written to a in your terminal, you will find a new folder named build, it is in this one that you find what you need.

  8. Make a new project in Intellij using EmmyLUA as SDK image

  9. Click on "+" for classpath and browse to "build" folder from step 7. image

image

  1. Done. You can now access all the latest natives for FiveM directly into your code.

image

Special Thank

@CitizenFX (https://github.com/citizenfx/natives) @alloc8or (https://github.com/alloc8or/rdr3-nativedb-data)

rage-lua-types's People

Contributors

dependabot[bot] avatar imbaphomettt avatar xdope7137 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rage-lua-types's Issues

Error on install

Hey my friend,

I have a error when I execute the command

ts-node main.ts

return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/content-generate.ts:89:108 - error TS2339: Property 'name' does not exist on type 'JSON'.

89             this.generateDocs = this.template(this.nativeDescription(data), "NATIVE", category, jsonNative.name, this.nativeUsage(jsonNative, nativeParams.paramsWithType), nativeParams.luaDocs, jsonNative.results, "function " + nativeName + "(" + this.nativeParams(jsonNative).params + ") end");
                                                                                                              ~~~~
src/content-generate.ts:89:206 - error TS2339: Property 'results' does not exist on type 'JSON'.

89             this.generateDocs = this.template(this.nativeDescription(data), "NATIVE", category, jsonNative.name, this.nativeUsage(jsonNative, nativeParams.paramsWithType), nativeParams.luaDocs, jsonNative.results, "function " + nativeName + "(" + this.nativeParams(jsonNative).params + ") end");
                                                                                                                                                                                                                ~~~~~~~
src/content-generate.ts:104:18 - error TS2339: Property 'name' does not exist on type 'JSON'.

104         if (data.name !== undefined || natives !== undefined)
                     ~~~~
src/content-generate.ts:105:26 - error TS2339: Property 'name' does not exist on type 'JSON'.

105             return (data.name || natives).toLowerCase().replace('0x', 'n_0x').replace(/_([a-z])/g, (sub, bit) => bit.toUpperCase()).replace(/^([a-z])/, (sub, bit) => bit.toUpperCase());
                             ~~~~
src/content-generate.ts:124:35 - error TS2339: Property 'params' does not exist on type 'JSON'.

124         for (let i = 0; i <= data.params.length - 1; i++) {
                                      ~~~~~~
src/content-generate.ts:125:68 - error TS2339: Property 'params' does not exist on type 'JSON'.

125             luaDocs += ((i != 0 ? "\n" : "") + "--@params " + data.params[i].name + " " + data.params[i].type);
                                                                       ~~~~~~
src/content-generate.ts:125:96 - error TS2339: Property 'params' does not exist on type 'JSON'.

125             luaDocs += ((i != 0 ? "\n" : "") + "--@params " + data.params[i].name + " " + data.params[i].type);
                                                                                                   ~~~~~~
src/content-generate.ts:126:51 - error TS2339: Property 'params' does not exist on type 'JSON'.

126             params += ((i != 0 ? "," : "") + data.params[i].name);
                                                      ~~~~~~
src/content-generate.ts:127:59 - error TS2339: Property 'params' does not exist on type 'JSON'.

127             paramsWithType += ((i != 0 ? "," : "") + data.params[i].type + " " + data.params[i].name);
                                                              ~~~~~~
src/content-generate.ts:127:87 - error TS2339: Property 'params' does not exist on type 'JSON'.

127             paramsWithType += ((i != 0 ? "," : "") + data.params[i].type + " " + data.params[i].name);
                                                                                          ~~~~~~
src/content-generate.ts:141:18 - error TS2339: Property 'description' does not exist on type 'JSON'.

141         if (data.description !== undefined)
                     ~~~~~~~~~~~
src/content-generate.ts:142:25 - error TS2339: Property 'description' does not exist on type 'JSON'.

142             return data.description;
                            ~~~~~~~~~~~
src/content-generate.ts:158:30 - error TS2339: Property 'results' does not exist on type 'JSON'.

158         return template(data.results, data.name, nativeParams);
                                 ~~~~~~~
src/content-generate.ts:158:44 - error TS2339: Property 'name' does not exist on type 'JSON'.

158         return template(data.results, data.name, nativeParams);
                                               ~~~~

    at createTSError (C:\laragon\bin\nodejs\node-v10\node_modules\ts-node\src\index.ts:240:12)
    at reportTSError (C:\laragon\bin\nodejs\node-v10\node_modules\ts-node\src\index.ts:244:19)
    at getOutput (C:\laragon\bin\nodejs\node-v10\node_modules\ts-node\src\index.ts:359:34)
    at Object.compile (C:\laragon\bin\nodejs\node-v10\node_modules\ts-node\src\index.ts:392:11)
    at Module.m._compile (C:\laragon\bin\nodejs\node-v10\node_modules\ts-node\src\index.ts:438:43)
    at Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Object.require.extensions.(anonymous function) [as .ts] (C:\laragon\bin\nodejs\node-v10\node_modules\ts-node\src\index.ts:441:12)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

Have a good day.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.