vuepress-plugin-lastest-version

0.2.6 • Public • Published

vuepress-plugin-lastest-version

npm npm GitHub

Get lastest version of artifact for your vuepress doc

Install

yarn add -D vuepress-plugin-lastest-version
# OR npm install -D vuepress-plugin-lastest-version

Use

module.exports = {
  plugins: [
    "lastest-version",
    {
      repos: [
        {
          keywords: "mybatis-plus-latest-version",
          type: "maven",
          repo: "com.baomidou/mybatis-plus",
        }
      ]
    }
  ]
};

repos.keywords

  • type: string
  • requried: true
  • value: your keywords

The keywords which will be replaced

repos.type

  • type: string
  • requried: true
  • value: maven | npm

Choose which artifact type need get lastest version

repos.repo

  • type: string
  • requried: true
  • value: your repo

When type is maven, your repo value is :groupId/:artifactId When type is npm, your repo value is :packageName

e.g.

module.exports = {
  plugins: [
    "lastest-version",
    {
      repos: [
        {
          keywords: "mybatis-plus-latest-version",
          type: "maven",
          repo: "com.baomidou/mybatis-plus",
        }
      ]
    }
  ]
};

module.exports = {
  plugins: [
    "lastest-version",
    {
      repos: [
        {
          keywords: "vuepress-plugin-latest-version",
          type: "npm",
          repo: "vuepress-plugin-lastest-version",
        }
      ]
    }
  ]
};

After configuration, the plugin will replace all keywords character to really lastest version.

So, don't forgot to add keywords placeholder to your document so that this plugin can change version normally.

Package Sidebar

Install

npm i vuepress-plugin-lastest-version

Weekly Downloads

3

Version

0.2.6

License

MIT

Unpacked Size

10.2 kB

Total Files

13

Last publish

Collaborators

  • dyang