ProductPromotion
Logo

Elm

made by https://0x3d.site

GitHub - zwilias/elm-json: Install, upgrade and uninstall Elm dependencies
Install, upgrade and uninstall Elm dependencies. Contribute to zwilias/elm-json development by creating an account on GitHub.
Visit Site

GitHub - zwilias/elm-json: Install, upgrade and uninstall Elm dependencies

GitHub - zwilias/elm-json: Install, upgrade and uninstall Elm dependencies

CI Workflow npm version

Deal with your elm.json

NOTE: This is very much a work in progress. May mess up your files completely. Use with care.

elm-json provides a bunch of tools to make common tasks involving your elm.json files a little easier: upgrading your dependencies, installing specific versions of packages, removing dependencies or initializing new packages, to name a few.

elm-json never writes to files used by the official toolchain, except elm.json itself. It may, however, read some files from your ELM_HOME when possible, to prevent downloading things you may already have on your filesystem.

Installation

Binaries are attached to the github releases and distributed for Windows, OS X and Linux (statically linked with musl).

For ease of installation, an npm installer also exists:

npm install --global elm-json

Usage

elm-json offers a bunch of subcommands to make life a little easier.

elm-json help

USAGE:
    elm-json [FLAGS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
        --offline    Enable offline mode, which means no HTTP traffic will
                     happen
    -V, --version    Prints version information
    -v, --verbose    Sets the level of verbosity

SUBCOMMANDS:
    help         Prints this message or the help of the given subcommand(s)
    install      Install a package
    new          Create a new elm.json file
    tree         List entire dependency graph as a tree
    uninstall    Uninstall a package
    upgrade      Bring your dependencies up to date

Gives a quick overview of the more common subcommands. This can also be used for finding documentation about specific subcommands.

Adding dependencies: elm-json install

USAGE:
    elm-json install [FLAGS] <PACKAGE>... [-- <INPUT>]

FLAGS:
    -h, --help       Prints help information
        --test       Install as a test-dependency
    -V, --version    Prints version information
        --yes        Answer "yes" to all questions

ARGS:
    <PACKAGE>...    Package to install, e.g. elm/core or elm/[email protected]
    <INPUT>         The elm.json file to upgrade [default: elm.json]

elm-json install allows installing dependencies, at the latest version that works given your existing dependencies, or a particular version if you so choose. By adding the --test flag, the chosen package(s) will be added to your test-dependencies rather than your regular dependencies.

Example: Installing the latest available version of a package

elm-json install elm/http

Adds the latest version of elm/http to your dependencies.

For packages, it will use the latest possible version as the lowerbound, and the next major as the exclusive upper bound. This mirrors the behaviour of elm install.

For applications, this will pick the latest available version, adding all indirect dependencies as well.

Example: Installing the latest available 2.x.x version of a package

elm-json install elm/http@2

Adds the latest version of elm/http with 2 as its major version number to your dependencies.

Example: Installing as a test-dependency

elm-json install --test elm/[email protected]

Adds version 2.0.0 of elm/http to your test-dependencies.

For packages, the provided version is used as the lower bound, with the next major being used as the exclusive upper bound.

For applications, this will install exactly the specified version.

Example: Installing multiple dependencies to a specified elm.json file

elm-json install elm/http elm/json -- elm/elm.json

Add the latest possible versions of elm/http and elm/json to ./elm/elm.json.

Removing dependencies: elm-json uninstall

USAGE:
    elm-json uninstall [FLAGS] <PACKAGE>... [-- <INPUT>]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information
        --yes        Answer "yes" to all questions

ARGS:
    <PACKAGE>...    Package to uninstall, e.g. elm/html
    <INPUT>         The elm.json file to upgrade [default: elm.json]

Uninstall dependencies. This is the inverse of elm-json install and its API is similar but slightly simpler.

Version bounds may not be specified and --test is not an allowed flag for this command.

Example: Uninstalling a package

elm-json uninstall elm/html

Removes the elm/html package from your dependencies.

Upgrading dependencies: elm-json upgrade

USAGE:
    elm-json upgrade [FLAGS] [INPUT]

FLAGS:
    -h, --help       Prints help information
        --unsafe     Allow major versions bumps
    -V, --version    Prints version information
        --yes        Answer "yes" to all questions

ARGS:
    <INPUT>    The elm.json file to upgrade [default: elm.json]

By default, this will only allow patch and minor changes for direct (test) dependencies.

When the --unsafe flag is provided, major version bumps are also allowed. Note that this may very well break your application. Use with care!

NOTE: This subcommand does not yet support elm.json files with type package.

Example: Safely updating all dependencies

elm-json upgrade

This command will check if any updates can safely be applied. In practice this means that for your direct dependencies and direct test-dependencies, we'll look for newer versions with the same major version number. Your indirect dependencies and indirect test-dependencies may be modified in more ways, depending on the constraints set by your direct dependencies.

Example: Major version upgrades for your dependencies

elm-json upgrade --unsafe

If major version changes are available, this will attempt to apply them. Note that this may still not update all dependencies to their latest release, if you have another dependency preventing to do so.

If you want to upgrade a specific package to a specific version, try running elm-json install author/project@version, which will tell you what package(s) are preventing this from happening.

Initializing applications/packages: elm-json new

USAGE:
    elm-json new

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

Create a new elm.json file, for applications or packages.

This is very rudimentary right now.

Deeply listing all dependencies: elm-json tree

USAGE:
    elm-json tree [FLAGS] [PACKAGE] [-- <INPUT>]

FLAGS:
    -h, --help       Prints help information
        --test       Promote test-dependencies to top-level dependencies
    -V, --version    Prints version information

ARGS:
    <PACKAGE>    Limit output to show path to some (indirect) dependency
    <INPUT>      The elm.json file to solve [default: elm.json]

Lists the entire dependency graph (with test-dependencies included when --test is passed) as a tree.

Example output:

project
├── elm/core @ 1.0.2
├── elm/http @ 1.0.0
│   ├── elm/core @ 1.0.2 *
│   └── elm/json @ 1.1.3
│       └── elm/core @ 1.0.2 *
├── elm-community/json-extra @ 4.0.0
│   ├── elm/core @ 1.0.2 *
│   ├── elm/json @ 1.1.3 *
│   ├── elm/time @ 1.0.0
│   │   └── elm/core @ 1.0.2 *
│   └── rtfeldman/elm-iso8601-date-strings @ 1.1.3
│       ├── elm/core @ 1.0.2 *
│       ├── elm/json @ 1.1.3 *
│       ├── elm/parser @ 1.1.0
│       │   └── elm/core @ 1.0.2 *
│       └── elm/time @ 1.0.0 *
└── lukewestby/elm-http-builder @ 6.0.0
    ├── elm/core @ 1.0.2 *
    ├── elm/http @ 1.0.0 *
    ├── elm/json @ 1.1.3 *
    ├── elm/time @ 1.0.0 *
    └── elm/url @ 1.0.0
        └── elm/core @ 1.0.2 *

Items marked with * have their dependencies ommitted since they've already
appeared in the output.

Specifying a package-name will filter the tree so only paths leading to the specified package, in direct and indirect dependencies, will be shown.

For tooling: elm-json solve

USAGE:
    elm-json solve [FLAGS] [OPTIONS] [--] [INPUT]

FLAGS:
    -h, --help        Prints help information
    -m, --minimize    Choose lowest available versions rather than highest
        --test        Promote test-dependencies to top-level dependencies
    -V, --version     Prints version information

OPTIONS:
    -e, --extra <PACKAGE>...    Specify extra dependencies, e.g. elm/core or
                                elm/[email protected]

ARGS:
    <INPUT>    The elm.json file to solve [default: elm.json]

Documentation TBD. Intended for other tooling to use, not meant for human consumption.

Generating shell completions: elm-json completions

USAGE:
    elm-json completions <SHELL>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <SHELL>    The shell to generate the script for [possible values: bash,
               fish, zsh]

Create completion scripts for elm-json for bash/fish/zsh.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory