Giter VIP home page Giter VIP logo

nen's People

Contributors

thomas-crane avatar

Watchers

 avatar  avatar

nen's Issues

Create a readme

The readme should explain what the project is, how to use it, and give some examples of usage.

Add `clean` command

$ nen clean

The clean command can be used to remove any node versions which are not being used by any environments.

Add `upgrade` command

$ nen upgrade env-name -v10

The upgrade command operates in a similar way to the new command. The user is prompted if the requested version does not exist. Unlike in the new command, this command will fail if the requested environment does not exist.

This command has the same options as the new command.

Add `new` command

The new command is used to create new Node environments

$ nen new env-name -v13

When the new command is invoked, the process is as follows.

  • nen checks if an environment with that name already exists. If it does, the process stops.
  • nen checks if the requested version of Node.js has already been downloaded
  • If it hasn't, the user is prompted if they want to download the node version.
  • If the user accepts the prompt, or if the --yes or -y flag is given, that version of node is downloaded.
  • If the user declines the prompt, the process is stopped.
  • Once the node binaries are downloaded, the process continues.
  • If the node version is present, a new folder is made for the environment.
  • An .npm-global folder is made in the environment folder.
  • A bin folder is made in the environment folder which contains symlinks to the node binaries.

Options can be given to change the behaviour of the command

Option Effect
--version, -v The node version to use for the new environment. Defaults to latest
--yes, -y Say yes to any prompt

Add `rm` command

$ nen rm my-env

Removes the environment with the name my-env. This command will fail if the requested environment does not exist.

Add `stop` command

$ nen stop

The stop command will attempt to deactivate the current environment if one is active. The process of deactivating an environment is as follows:

  • Check if either $NEN_ENV or $NEN_OLD_PATH are set.
  • If neither of them are set, assume there is no active environment and exit.
  • If at least one of them is set, then
    • Unset $NEN_ENV
    • If $NEN_OLD_PATH is set, copy it into $PATH and then unset it.

Add more intelligent version support

Instead of just being able to specify the specific version of node (a.k.a. v13) you should be able to specify "lts" or "current" to have the environment be set to whatever the corellated version is when it's created (aka "lts" would at this time of posting be converted to "12.16.2").

Add `list` command

$ nen list

This command should print the list of environments. Some useful and quick to gather information should be included such as the node version and name.

e.g.

$ nen list
ts @ v13.9.0
ts-legacy @ v10.18.0

It should be possible to give some options to the command to change how it behaves

$ nen list --version 10
ts-legacy @ v10.18.0

Available options

Option Effect
--version, -v Only show environments with that major version.

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.