synchronize python version with a property inside of package.json #4
Labels
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: valerie/portapy#4
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
when portapy is installed, create a key for what version it is, if it doesn't exist. if it does, use that version.
have a command,
pvm, that allows you to change which version you are using locally, or be able to change it inpackage.json, and reinstall portapy, so it'll automagically be that version.just want to add some behaviour examples to this
pvm lssimply lists all available versions. call out latest for 3/2.
pvm use <version>This will first look for a package.json locally; it will ascend the file tree until it finds a package.json with portapy installed in it. For example, if the above was run in
/Users/Valerie/test/folder/src/types, it would search for:when it found where it was installed, it would do the installation. this process is important, because if a person installs portapy globally, for the pvm command, but only wants to have a particular version in one project, they'll still need to install it for the project, like you normally would, then use pvm to select and install a different version.
alternatively, they could use npm scripts, to link pvm locally installed. this would mean:
package.jsonor with yarn
pvm use --global <version>this will change the search array to just the global install location. this changes from system to system, but there should be a package.json for global installs, and the process should be mostly the same, but
--globalforces the global installation.Manually moving to the global install folder and running pvm should have a similar effect, though the flag wont search parent directories, just the right one.