Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor, added fxmanifest stubs, added lua support #3

Merged
merged 1 commit into from
Apr 10, 2021
Merged

refactor, added fxmanifest stubs, added lua support #3

merged 1 commit into from
Apr 10, 2021

Conversation

nnsdev
Copy link
Contributor

@nnsdev nnsdev commented Apr 9, 2021

  • Refactored multiple components of cfa
    • I created fxmanifest stubs for each language, I felt having a string with \n\n right in the file is rather ugly. This is a bit more maintainable
    • I added a new package sprintf-js to parse some strings nicely, as an example here I have added the name information to all the manifest files
    • I have added a file for types, for now just including a type of all supported languages, and what languages have packages
    • Refactored createEssentials and installTemplate to allow for more languages easier and made specific files for their "copiers" and "creators". This format should probably be the first step in allowing unique(r) template support for cfa, for example how the vue-cli works.

I have also added Lua support, it is very basic and cfa automatically generates all files for it, as there isn't really packages for it.

import fs from "fs";

export const copyFiles = (resourcePath: string): void => {
// lua does not need to copy any files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this file at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on paper, no. But if we delete it we have to do some annoying "does file exists" check right here: https://github.com/itschip/create-fivem-app/pull/3/files#diff-829eff2e0611772913dffeeae499783591e9b75b26b22b4d7d7283e06cf8e656R30

And I think that might be uglier than just having this empty file :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@itschip itschip merged commit dbbf3cf into project-error:master Apr 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants