Skip to content

feaswcy/author-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author Webpack Plugin

给html打上带有author的meta 标签

使用

安装

npm install author-webpack-plugin

在webpack的配置文件中,引入

 const AuthorWebpackPlugin = require('author-webpack-plugin')

在插件中使用

plugins : [
    ...
    new AuthorWebpackPlugin()
]

注意事项

为了更好统一页面的作者信息,author plugin对作者信息进行了强约束,使用该插件配合需添加作者的信息,添加作者信息的方式有:

  1. 在项目package.json里添加author的选项
  2. 在webpack配置里传入option: {author: 'xxx'}

如果从以上都没有获得,那么会从git loggit remote 相关信息中猜测 author 与 group,猜测仍没有结果时将会直接报错

Change Log

0.0.1

  • init

0.0.2

  • 增加强校验author
  • 修改插入meta的位置

0.0.3

  • 增加从commit自动获取author
  • 增加从repository获得group名称,没有时从git remote中获取

About

Add author information in gererated html template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published