lee-fs-utility-debugger v1.10.1
Lee FS Utility Debugger
This is a simple NPM package that uses Winston to create a custom logging utility for my Node app. The purpose is to defer logging from the console.log() function.
Installation
To install, npm install lee-fs-utility-debugger
Use
Info Logging
To log to the info log, use
logger.info('Logged Text');
which will return
info: Logged Text
in the console.
Error Logging
To log to the info log, use
logger.error('Logged Text');
which will return
error: Logged Text
in the console.
Unit Testing
To unit test the package, run mocha
Version Increaser Testing
This application uses a version increaser.
.updateVersion(current, release)
This method receives a semantically incremented version number.
.updateVersion('1.2.3', 'major')
This will return 2.0.0
. It resets minor and patch to 0 and increments the major version
.updateVersion('1.2.3', 'minor')
This will return 1.3.0
. It resets patch to 0 and increments the minor version.
.updateVersion('1.2.3', 'patch')
This will return 1.2.4
. It increments only the patch version.
Entering an invalid version number will return Invalid version number!
.
Entering an invalid release will return Invalid release type!
.
Building with Gulp
In order to build the app to the build folder, run the command gulp run -r [releaseType]
.
The -r
flag is for release, and accepts a value of major
, minor
, or patch
.
Example usage: gulp run -r major
, which will bump the version in package.json to the next major version in this example.
If your current version is 1.10.0
,
major
will bump it to2.0.0
minor
will bump it to1.11.0
patch
will bump it to1.10.1
Code Deploy
Master: Dev:
The repo will auto deploy to Codeship and run CI tests once a branch is pushed.