1.1.3 • Published 3 years ago

@alu0101265704/addlogging v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm version

Addlogging

Module that provides an addlogging method, which from a given JavaScript function,adds logging messages before the entire code declaration begins.

Installation

Install globally

npm install -g @alu0101265704/addlogging

Install locally

npm install @alu0101265704/addlogging

Usage

Importing it to the project

For the module to be used, you will only need it to be imported into your development project, like for example:

const test = require('@alu0101265704/addlogging');
...
const result = test.addLogging(inputCode, patternName);
...

Execution options

IMPORTANT: If you want to execute directly from your command line, you must have installed this package as globally in your system, in that case you be able to execute add-logging with differents arguments as follows:

  • add-logging -h, --help

Using the option help, will show how many options you will be able to use with the executable and how it works.

add-logging -h

Usage: add-logging add-logging [options]

Options:
  -V, --version                                            output the version number
  -o, --output <output_file>                               output file of the program
  -p, --pattern <pattern_name> <output_file> <input_file>  function pattern name and output file of the program
  -h, --help                                               display help for command
  • add-logging -V, --version

Using the option version, will show the version of the module.

add-logging --version

1.1.2
  • add-logging -p, --pattern

Using the option pattern followed by a pattern name (string), output file path and input file path, the program will be executed but only by adding lines in those functions which are the same as the pattern name, and finally write those results in the output file.

add-logging -p 'multiply' output/output.js input/input1.js 

Output in file 'output/output.js
  • add-logging -o, --output

Using the option output followed by the output file path and the input file path, the program will be executed as usual, that is to say, will add a log message into the function and write the result in the output file.

add-logging --output output/output.js input/input1.js 

Output in file 'output/output.js'

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago