ayecue / greybel-js

GreyScript transpiler/minifier/interpreter for Grey Hack written in JS.
http://editor.greyscript.org
MIT License
28 stars 7 forks source link

TextMesh Pro feature not showing color #96

Closed Crater44 closed 1 year ago

Crater44 commented 1 year ago

Hi @ayecue Im trying to use this feature like this: print("Text message") \ And it gives me this output: \Text message\ \ The same happens with the other TextMesh Pro supported features

ayecue commented 1 year ago

Hey @Crater44 that seems strange I worked on the related text-mesh-pro package yesterday and I updated the versions a bunch of times and due to the way text-mesh-pro is included into the package json it could have caused the issue you are experiencing.

Which greybel-js version are you using at the moment? With 2.0.5 it works for me now.

If you are already using the newest version could you please execute npx howfat greybel-js and add the output to a comment? The command will collect all the dependencies used within greybel-js.

Or a less intrusive alternative is just to get the package.json content of the dependency within greybel-js. cat $(npm root -g)/greybel-js/node_modules/text-mesh-transformer/package.json.

Crater44 commented 1 year ago

I am using the version 2.0.4 because it gives me a hard time updating.

I have to edit the shebangs of the 4 bin files of greybel-js in /usr/local/lib/node_modules/greybel-js/bin from #!/usr/bin/env node --no-warnings to #!/usr/bin/node --no-warnings

I though about dockerizing it. Maybe I do a pull request if you like the idea.

However the cat output is this:

{
    "name": "text-mesh-transformer",
    "version": "1.3.0",
    "description": "Transformer for TextMesh Rich Text tags",
    "homepage": "https://github.com/ayecue/text-mesh-transformer",
    "main": "dist/index",
    "typings": "dist/index",
    "repository": {
        "type": "git",
        "url": "git@github.com:ayecue/text-mesh-transformer.git"
    },
    "author": {
        "name": "ayecue",
        "email": "soerenwehmeier@googlemail.com"
    },
    "licenses": [
        {
            "type": "MIT",
            "url": "https://github.com/ayecue/text-mesh-transformer/blob/master/LICENSE-MIT"
        }
    ],
    "bugs": {
        "url": "https://github.com/ayecue/text-mesh-transformer/issues"
    },
    "scripts": {
        "prepublishOnly": "npm run build",
        "build": "npm run clean && tsc -p .",
        "watch": "tsc -w -p .",
        "clean": "rm -rf dist",
        "test": "jest ./tests",
        "lint": "eslint ./src/**/*.ts",
        "lint:fix": "eslint --fix ./src/**/*.ts"
    },
    "directories": {},
    "keywords": [],
    "devDependencies": {
        "@types/jest": "^27.0.3",
        "@types/node": "^17.0.0",
        "@types/uuid": "^8.3.3",
        "@typescript-eslint/eslint-plugin": "^5.27.1",
        "@typescript-eslint/parser": "^5.27.1",
        "ansi-styles": "^6.2.1",
        "eslint": "^8.17.0",
        "eslint-config-prettier": "^8.5.0",
        "eslint-config-standard": "^17.0.0",
        "eslint-plugin-import": "^2.26.0",
        "eslint-plugin-jest": "^26.5.3",
        "eslint-plugin-node": "^11.1.0",
        "eslint-plugin-prettier": "^4.0.0",
        "eslint-plugin-promise": "^6.0.0",
        "eslint-plugin-security": "^1.5.0",
        "eslint-plugin-simple-import-sort": "^7.0.0",
        "jest": "^27.4.5",
        "nodemon": "^2.0.15",
        "ts-node": "^10.4.0",
        "typescript": "^4.5.4"
    }
}
ayecue commented 1 year ago

Thank you for sharing the package content. So as I can see greybel-js is using text-mesh-transformer version 1.3.0. Sadly 2.0.4 does not support the output of 1.3.0. Originally it was using 1.1.1 but due to using ^ it will always get the newest version which is a mistake on my part.

So the only thing I can suggest sadly is to install the latest version.

I have to edit the shebangs of the 4 bin files of greybel-js in /usr/local/lib/node_modules/greybel-js/bin from #!/usr/bin/env node --no-warnings to #!/usr/bin/node --no-warnings

That is interesting. Using #!/usr/bin/env node is usually the recommend way https://nodejs.dev/en/learn/run-nodejs-scripts-from-the-command-line/. I know that #!/usr/bin/node is an alternative but usually not recommended since node might not be installed on that path.

I though about dockerizing it. Maybe I do a pull request if you like the idea.

Sure I am open to any kind of improvements. 😄

ayecue commented 1 year ago

Issue got resolved by reporter. Therefore closing issue for now.