@codefimba/babel-logger-plugin

This babel plugin creates a log statement on your functions by replace the key `$log` with an actual `console.log` statement.

Usage no npm install needed!

<script type="module">
  import codefimbaBabelLoggerPlugin from 'https://cdn.skypack.dev/@codefimba/babel-logger-plugin';
</script>

README

Babel Plugin 🔀

Playing with Babel Plugins and trying to hackly replace the key $log with an actual console.log statement.

Pair programming with: Bruno Kiafuka

It converts this:

function add(a, b) {
  $log;
  const result = a + b;

  return result;
}
add(2, 3);

Into this:

function add(a, b) {
  const result = a + b;

  console.log("Final Result 😛 ==> ", result);

  return result;
}
add(2, 3);

Set up ⚙️

  • Clone the repo
  • Navigate into your folder directory. cd babel-fimba-plugin
  • Run yarn to install dependencies
  • Run yarn build to run the project

Todo 📕

  • Improve Docs
  • Add code linters
  • Write tests
  • Write production ready version

Roadmap 🛣

  • Publish to NPM

Useful links