Skip to content
a webpack plugin for annotating the code.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
build
src
test
.babelrc
.eslintignore
.eslintrc.js
.gitignore
README.md
README_CN.md
package.json

README.md

annotate-webpack-plugin

A webpack plugin for adding document annotations

中文文档

Install

npm install annotate-webpack-plugin

Usage

// webpack.config.js
const AnnotatePlugin = require("annotate-webpack-plugin");
module.exports = {
  plugins: [
    new AnnotatePlugin({
      author: "hanger",
      create: "2018/7/9"
    })
  ]
};

The following comments will appear in the packaged file

/**
 * author: hanger
 * create: 2018/7/4
 * update: 2018/7/17
 */
...

Options

new AnnotatePlugin(content, options)

content: An object that represents the annotation

options: An object that represents how to annotated

The following properties are acceptable for options

key value description
include Array Assign the file that to need annotated
exclude Array Assign the file that not to need annotated
hideUpdate Boolean Assign whether to hide update, is invalid when content has update
You can’t perform that action at this time.