Giter Site home page Giter Site logo

cli's Introduction

Godot Package Manager rust client

discord aur

Installation

Note read the using packages quickstart first.

Manual
  1. Download the latest version
  2. Move the executable to your PATH as gpm
ArchLinux

There's an AUR package available: godot-package-manager-git

Note This package installs to /usr/bin/godot-package-manager to avoid conflicts with general purpose mouse. Assuming you have yay installed:

  1. yay -S godot-package-manager-git

Usage

gpm update # downloads the newest versions of packages
gpm purge # removes the installed packages
gpm tree # prints the tree of installed packages, looks like
# /home/my-package
# └── @bendn/[email protected]
#    └── @bendn/[email protected]

Compiling

  1. git clone --depth 5 https://github.com/godot-package-manager/client)
  2. cargo build -r
  3. Executable is target/release/godot-package-manager

cli's People

Contributors

bend-n avatar xananax avatar

Stargazers

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

Forkers

boyquotes bend-n

cli's Issues

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?

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 KB5 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 B5 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 B5 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 B5 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)

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.