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

allow installing multiple modules from a single package #33

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

kubouch
Copy link
Contributor

@kubouch kubouch commented Oct 15, 2023

related to

this will supersede #28

Description

Adds support for $.modules field to package.nuon. Similar to $.scripts, this allows installing modules (both files and directories) from custom locations.

Note
for Nupm, a package can be a collection of modules and scripts, this PR comes closer to that goal

Another change is that the default package module (package-name/ dir) and script (package-name.nu file) are not required. You can have a package that has only the $.modules: and $.scripts: fields in package.nuon.

@amtoine amtoine changed the title Allow 'modules' field in packages.nuon allow installing multiple modules from a single package Oct 16, 2023
@amtoine
Copy link
Member

amtoine commented Oct 16, 2023

Note
might supersede #28

Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

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

let's roll with this and mainly try to fix nu_scripts 🙏
thanks @kubouch 🥳

@amtoine amtoine merged commit f428826 into nushell:main Oct 19, 2023
3 checks passed
amtoine added a commit to nushell/nu_scripts that referenced this pull request Oct 23, 2023
related to
- nushell/nupm#33

## description
with nushell/nupm#33, Nupm can now install
separate modules from a single package 🥳

the `nu_scripts` are a package and looks like they contain a few
potential standalone modules:
- the themes
- the hooks
- the custom completions
- ...

this PR is a proposal to move `themes/` to `nu-themes/` and add
`./nu-themes/` as a module to the `nu-scripts` package.
that way when running `nupm install --path .` in the root of the
`nu_scripts`, a `nu-themes` module will be installed in
`$env.NUPM_HOME/modules`.

then one can run
```nushell
use nu-themes/themes/nushell-dark.nu
```
and next get the theme with
```nushell
nushell-dark
```
@kubouch kubouch deleted the install-modules branch November 21, 2023 19:21
@amtoine amtoine mentioned this pull request Dec 11, 2023
4 tasks
amtoine added a commit to amtoine/nushell-nupm that referenced this pull request Dec 11, 2023
maxim-uvarov pushed a commit to maxim-uvarov/nu_scripts_reduced_size that referenced this pull request Oct 12, 2024
related to
- nushell/nupm#33

## description
with nushell/nupm#33, Nupm can now install
separate modules from a single package 🥳

the `nu_scripts` are a package and looks like they contain a few
potential standalone modules:
- the themes
- the hooks
- the custom completions
- ...

this PR is a proposal to move `themes/` to `nu-themes/` and add
`./nu-themes/` as a module to the `nu-scripts` package.
that way when running `nupm install --path .` in the root of the
`nu_scripts`, a `nu-themes` module will be installed in
`$env.NUPM_HOME/modules`.

then one can run
```nushell
use nu-themes/themes/nushell-dark.nu
```
and next get the theme with
```nushell
nushell-dark
```
maxim-uvarov pushed a commit to maxim-uvarov/nu_scripts_reduced_size that referenced this pull request Oct 13, 2024
related to
- nushell/nupm#33

## description
with nushell/nupm#33, Nupm can now install
separate modules from a single package 🥳

the `nu_scripts` are a package and looks like they contain a few
potential standalone modules:
- the themes
- the hooks
- the custom completions
- ...

this PR is a proposal to move `themes/` to `nu-themes/` and add
`./nu-themes/` as a module to the `nu-scripts` package.
that way when running `nupm install --path .` in the root of the
`nu_scripts`, a `nu-themes` module will be installed in
`$env.NUPM_HOME/modules`.

then one can run
```nushell
use nu-themes/themes/nushell-dark.nu
```
and next get the theme with
```nushell
nushell-dark
```
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