wnpmtools
v0.3.271
Published
Collection of tools to use npm programmatically.
Downloads
2,097
Readme
module::NpmTools
Collection of tools to use npm programmatically.
Try out from the repository
git clone https://github.com/Wandalen/wNpmTools
cd wNpmTools
will .npm.install
node sample/trivial/Sample.s
Make sure you have utility willbe
installed. To install willbe: npm i -g willbe@stable
. Willbe is required to build of the module.
To add to your project
npm add 'wnpmtools@stable'
Willbe
is not required to use the module in your project as submodule.
Examples
Fixate version of dependencies
File package.json
;
{
"dependencies" : {
"wTools" : "",
"wnpmtools" : ""
}
}
Script Script.s
:
const _ = require( 'wnpmtools' );
_.npm.fileFixate
({
localPath : __dirname,
tag : 'stable',
});
Write both files in a directory. Run command npm i
and then run node Script.s
.
Check file package.json
( in Unix-like system run cat package.json
). File should look like.
{
"dependencies" : {
"wTools" : "stable",
"wnpmtools" : "stable"
}
}
Logging of package versions
Printing of package tag versions.
File package.json
;
{
"name" : "wTools",
"version" : "0.8.200",
"dependencies" : {
"wnpmtools" : ""
}
}
Script Script.s
:
const _ = require( 'wnpmtools' );
_.npm.versionLog
({
localPath : __dirname,
remotePath : 'wTools',
tags : [ 'stable', 'dev' ],
});
Write both files in a directory. Run command npm i
and then run node Script.s
. Output should look like :
Stable version of wTools : 0.8.1171
dev version of wTools : -no-
Current version : 0.8.200