MichaelRFox / fxStripJsDoc

A small utility to strip out jsDoc-style comments from a JavaScript file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fxStripJsDoc

npm version npm bundle size npm GitHub last commit GitHub top language NPM

Description

fxStripJsDoc is used to strip out jsDoc-style comments from a JavaScript file. One may want to do this to reduce the size of a distribution file while retaining jsDoc comments in the source file. This utility will not strip out inline comments.

Example:

/**
 * @desc The fxStripJsDoc utility will strip out comments
 * like this one.
 */

/** Or single line comments like this one */

// but not comments like this

Installation

npm install fxstripjsdoc --save-dev

Usage

The fxStripJsDoc utility takes one required argument, the path to the file to be stripped. To use the the fxStripJsDoc utility simply add a script to your package.json file like this:

"scripts": {
	"stripComments": "fxstripjsdoc ./dist/myFile.js"
}

About

A small utility to strip out jsDoc-style comments from a JavaScript file

License:MIT License


Languages

Language:JavaScript 100.0%