0.2.11 • Published 5 years ago

nfvm v0.2.11

Weekly downloads
24
License
MIT
Repository
github
Last release
5 years ago

NFVM - Node File Version Manager

Concept

While writing code I often run into problem of fast switching between versions of local files which are ignored by git. This files for security reason can't be in repository or they are individual for each server. So when I want to start/test app in needed config (with specific set of files) the switching process is too slow.

The nfvm tool - is the first try to solve the problem of my daily pain.

Terminology

Pack

Is a set of files for the project or the part of it. Every file in this pack can have as many versions as you want.
For comfort controll of file versioning you can apply version ONLY for the pack. So when version of pack changes, all files in this pack switches to version of pack.

ParameterTypeDescriptionDefault Value
nameStringpack name''
defaultVersionStringname of default versiondefault
currentVersionStringname of current versiondefault
versionsString[]array of registered pack versions[]
filesFile[]array of File objects[]

File

ParameterTypeDescriptionDefault Value
filenameStringthe name of file in destination folder''
destinationPathStringfull path to destination folder''
removeFileIfVersionNotExistsBooleanif true then when file version does not exists removes the old version of file from the destination directory. Otherwise the old version stays.true
symlinkBooleanif true then creates symlink to file version in destination directory instead of replacing it.true
versionsFileVersion[]array of File Version objects[]

File Version

ParameterTypeDescriptionDefault Value
nameStringfile version name (also should be in Pack.versions)''
pathStringfull path to file''

Installing nfvm

$ npm i nfvm -g

CLI Commands

  • init - create local .nfvmrc.json config file
  • create <packname>
    • -f, --file <filename> - create file
    • -v <version> - create version of pack or file
    • -g, --global - create in global
  • remove <packname> - remove pack
    • -f, --file <filename> - remove file
    • -v <version> - remove version of pack or file
    • -g, --global - remove from global
  • set <packname> <version>
    • -g, --global - sets in global
  • list
    • -p, --pack <packname> - files list in pack
    • -g, --global - list from global

Resources

User Guide
TODO List

Examples

Create pack example

nfvm create example

Create version default for pack example

nfvm create example -v default

Create file 1 for pack example

nfvm create example -f 1

Create version default for file 1 for pack example

nfvm create example -f 1 -v default

Remove pack example

nfvm remove example

Remove version default for pack example

nfvm remove example -v default

Remove file 1 for pack example

nfvm remove example -f 1

Remove version default for file 1 for pack example

nfvm remove example -f 1 -v default

Set default version for example pack

nfvm set example default

List of all packs

nfvm list

List of all files in example pack

nfvm list -p example

Config File

Config file name is .nfvmrc.json with structure:

{
  "packs": [{
    "name": "String",
    "defaultVersion": "String",
    "currentVersion": "String",
    "versions": "String[]",
    "files": [{
      "filename": "String",
      "destinationPath": "String",
      "removeFileIfVersionNotExists": "Boolean",
      "symlink": "Boolean",
      "versions": [{
        "name": "String",
        "path": "String",
      }]
    }]
  }]
}
0.2.11

5 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0-1

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.1.0-17

6 years ago

0.1.0-16

6 years ago

0.1.0-15

6 years ago

0.1.0-14

6 years ago

0.1.0-13

6 years ago

0.1.0-12

6 years ago

0.1.0-11

6 years ago

0.1.0-10

6 years ago

0.1.0-9

6 years ago

0.1.0-8

6 years ago

0.1.0-7

6 years ago

0.1.0-6

6 years ago

0.1.0-5

6 years ago

0.1.0-3

6 years ago

0.1.0-2

6 years ago

0.1.0-1

6 years ago

0.1.0-0

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago