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 Textin the console.
Error Logging
To log to the info log, use
logger.error('Logged Text');which will return
error: Logged Textin 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,
- majorwill bump it to- 2.0.0
- minorwill bump it to- 1.11.0
- patchwill bump it to- 1.10.1
Code Deploy
Master: Dev:
The repo will auto deploy to Codeship and run CI tests once a branch is pushed.