Skip to content

Omelyan/babel-plugin-transform-console-comments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-transform-console-comments

Transforms special comments to console.* calls, so that:

// > Start loading application...
await appLoading();
// > The application has been loaded.

becomes:

console.log("Start loading application...");
await appLoading();
console.log("The application has been loaded.");

I thought it might be a little bit prettier in some cases 🤷‍♂️.

The very first version; only console.log with string literal is currently supported; I plan to add template literals and additional options in the future.

Installation

npm install babel-plugin-transform-console-comments --save-dev

Add it to your plugins array in your babel config (e.g. babel.config.js file):

module.exports = {
  plugins: [
    "transform-console-comments",
    // ...
  ],
};

About

Transform special comments // > to console.* calls.

Resources

License

Stars

Watchers

Forks

Packages

No packages published