@yookue/babel-plugin-remove-comment
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@yookue/babel-plugin-remove-comment

NPM version Software License NPM downloads

🏅 Removes script comments during babel compilation 👍

Features

✅ Support removing comments by option

Quickstart

You can install this package in your typescript project as follows:

$ npm install @yookue/babel-plugin-remove-comment --save-dev

Enjoy your coding journey with babel-plugin-remove-comment ✌️

Usage

  • Using in javascript/typescript
const plugin = require('@yookue/babel-plugin-remove-comment');
babel.transform(source_code, {
    plugins: [
        [plugin, {scope: 'all'}]
    ]
});
  • Using in babel.config.json or .babelrc.json of babel
{
    "plugin": [
        ["@yookue/babel-plugin-remove-comment", {
            "scope": "all"
        }]
    ]
}
  • Using in .fatherrc.ts of father
{
    extraBabelPlugins: [
        ['@yookue/babel-plugin-remove-comment', {
            scope: 'all'
        }]
    ]
}

Option

Here is the available option:

Param Name Param Value Value Type
scope all, block, line, none string

Document

References

License

This project is under the MIT License.

Website

Package Sidebar

Install

npm i @yookue/babel-plugin-remove-comment

Weekly Downloads

7

Version

0.1.3

License

MIT

Unpacked Size

8.41 kB

Total Files

5

Last publish

Collaborators

  • davidhsing