Giter Site home page Giter Site logo

cli's Issues

Installing from git

npm can install packages directly from git (see https://linux.how2shout.com/how-to-install-a-npm-package-directly-from-github/).

For example we can install the private repo I modified for this test with:

npm install [email protected]:razcore-rad/godot-colorpicker-presets.git[#branch/tag/commit]

And the public repo with:

https://github.com/razcore-rad/godot-colorpicker-presets.git[#branch/tag/commit]

Where the #branch, #tag, #commit specification is optional.

For example:

code/razcore-rad/godot-4-dbg via ๐Ÿ v3.11.2 (default) 
โฏ npm i git@github.com:razcore-rad/godot-colorpicker-presets.git#npm-test

added 1 package in 4s

code/razcore-rad/godot-4-dbg via ๎œ˜ v20.1.0 via ๐Ÿ v3.11.2 (default) 
โฏ ls node_modules/@razcore-rad/colorpicker_presets/
โ•ญโ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ # โ”‚                                 name                                 โ”‚ type โ”‚  size  โ”‚   modified    โ”‚
โ”œโ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 0 โ”‚ node_modules/@razcore-rad/colorpicker_presets/LICENSE                โ”‚ file โ”‚ 1.1 KB โ”‚ 5 minutes ago โ”‚
โ”‚ 1 โ”‚ node_modules/@razcore-rad/colorpicker_presets/README.md              โ”‚ file โ”‚ 1.4 KB โ”‚ 5 minutes ago โ”‚
โ”‚ 2 โ”‚ node_modules/@razcore-rad/colorpicker_presets/addons                 โ”‚ dir  โ”‚ 4.1 KB โ”‚ 5 minutes ago โ”‚
โ”‚ 3 โ”‚ node_modules/@razcore-rad/colorpicker_presets/colorpicker_presets.gd โ”‚ file โ”‚  722 B โ”‚ 5 minutes ago โ”‚
โ”‚ 4 โ”‚ node_modules/@razcore-rad/colorpicker_presets/package.json           โ”‚ file โ”‚  669 B โ”‚ 5 minutes ago โ”‚
โ”‚ 5 โ”‚ node_modules/@razcore-rad/colorpicker_presets/plugin.cfg             โ”‚ file โ”‚  238 B โ”‚ 5 minutes ago โ”‚
โ”‚ 6 โ”‚ node_modules/@razcore-rad/colorpicker_presets/presets.hex            โ”‚ file โ”‚  288 B โ”‚ 5 minutes ago โ”‚
โ”‚ 7 โ”‚ node_modules/@razcore-rad/colorpicker_presets/project.godot          โ”‚ file โ”‚  408 B โ”‚ 5 minutes ago โ”‚
โ”‚ 8 โ”‚ node_modules/@razcore-rad/colorpicker_presets/readme                 โ”‚ dir  โ”‚ 4.1 KB โ”‚ 5 minutes ago โ”‚
โ•ฐโ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

code/razcore-rad/godot-4-dbg via ๎œ˜ v20.1.0 via ๐Ÿ v3.11.2 (default) 
โฏ bat package.json
         File: package.json
     1   {
     2     "dependencies": {
     3       "@razcore-rad/colorpicker_presets": "github:razcore-rad/godot-colorpicker-presets#npm-test"
     4     }
     5   }

This is a feature request for gpm so we can use:

code/razcore-rad/godot-4-dbg via ๎œ˜ v20.1.0 via ๐Ÿ v3.11.2 (default) took 2s 
โฏ bat godot.package
         File: godot.package
     1   packages: {
     2       @bendn/remap: 5.1.0,
     3       [email protected]:razcore-rad/godot-colorpicker-presets.git: npm-test
     4   }

Right now I'm getting this error if I run gpm update with the above godot.package file:

code/razcore-rad/godot-4-dbg via ๎œ˜ v20.1.0 via ๐Ÿ v3.11.2 (default) took 20s 
โฏ gpm update
       Error called `Result::unwrap()` on an `Err` value: missing field `dist` at line 1 column 21 (@src/config_file.rs:63)

I also tried:

code/razcore-rad/godot-4-dbg via ๎œ˜ v20.1.0 via ๐Ÿ v3.11.2 (default) 
โฏ bat godot.package
         File: godot.package
     1   packages: {
     2       @bendn/remap: 5.1.0,
     3       @razcore-rad/colorpicker_presets: github:razcore-rad/godot-colorpicker-presets#npm-test
     4   }

code/razcore-rad/godot-4-dbg via ๎œ˜ v20.1.0 via ๐Ÿ v3.11.2 (default) took 27s 
โฏ gpm update
       Error called `Result::unwrap()` on an `Err` value: missing field `dist` at line 1 column 3656 (@src/config_file.rs:63)

Scoped packages are placed under a deep folder structure and global classes don't register

A bit of background: at GDQuest we're trying to find a solution for dependencies since we have a lot of assets shared between projects, including custom global classes etc.

I think we're kind of stretching the possibilities of the Godot addon-system here, but today I experimented with a few plugins and scoped NPM packages:

They are installed under the @razcore-rad folder in this case and although Godot detects the plugins, I don't think the system was meant to work this way:

โฏ tree -L 2 addons/
addons/
โ””โ”€โ”€ @razcore-rad
    โ”œโ”€โ”€ colorpicker_presets
    โ””โ”€โ”€ kenny_prototype_material

They seem to work fine if there are no global classes (class_name) definitions, but in this case kenny_prototype_material should register a resource material. This works if I move the folder one level above:

โฏ tree -L 2 addons/
addons/
โ”œโ”€โ”€ kenny_prototype_material
โ”‚ย ย  โ”œโ”€โ”€ ...
โ””โ”€โ”€ @razcore-rad
    โ””โ”€โ”€ colorpicker_presets

But not if it's nested under @razcore-rad.

It would be nice to install the project at @razcore-rad.addon_name instead and this should solve the scoped packages problem. What do you think of this case?

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.