path-editor
v0.1.0
Published
Configure your path windows path variable programmatically
Downloads
3
Readme
path-editor
A windows path variable editor
Installation
$ npm install --save path-editor
Usage
var pathEditor = require('path-editor');
/**
* Getting it
*/
var myPath = pathEditor.get() // => get your path variable parsed as an array
var myRawPath = pathEditor.getRaw() // => get your path variable as stored
/**
* Basic usage
*/
pathEditor
.delete('pathToRemove') // Could be an Array
.add('pathToAdd')
.replace('pathToRemove','pathToAdd')
.set() // => this do the job. it put sets your %PATH% variable
.get() //get what you did
/**
* Forcing the path
*/
pathEditor
.force('Dont-force-silly-things')
.set()
/**
* Using options
*/
pathEditor
.add('.',{relative:true}) // Resolves the path relative where you use it
.set()
pathEditor
.add('this/is/not/a/windows/path',{format:true}) // Resolves the path as windows store it
.set()
License
MIT © Fabian Gutierrez