superlogs-loader
v1.7.0
Published
webpack loader for superlogs
Downloads
11
Maintainers
Readme
🦄 superlogs-loader
SuperLogs webpack loader for webpack
Superlogs is a super logical logging solution.
This package will find and replace doccomments with superlogs at build time.
Install:
$ npm install --save-dev superlogs-loader
or using yarn
$ yarn add superlogs-loader --dev
Configuration:
In your webpack.config.js
:
module.exports = {
// ...
module: {
rules: [
{
test: /\.ts?$/,
loader: 'superlogs-loader',
options: {
}
}
]
}
}
or for razzle
module.exports = {
// ...
modify: (config, { target, dev }, webpack) => {
config.module.rules.push(
{
test: /\.ts?$/,
loader: 'superlogs-loader',
options: {
}
}
);
}
}
Usage
method
In your target file
/**
* @method method description
*/
This will be replaced after build with superlogs
logs.addMethod('method description');
step
In your target file
/**
* @step step description
*/
This will be replaced after build with superlogs
logs.addStep('step description');
data
In your target file
/**
* @data debugVar
*/
This will be replaced after build with superlogs
logs.addData('debugVar', debugVar);
mongo
In your target file
/**
* @mongo mongo description
*/
This will be replaced after build with superlogs
logs.addMongo('mongo description');
dispatch
In your target file
/**
* @dispatch dispatch type
* @payload setPayload(true)
*/
This will be replaced after build with superlogs
logs.addDispatch('dispatch description', setPayload(true));
Contributing:
Feel free to open issues to propose stuff and participate.
Pull requests are also welcome.
Licence:
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!