npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kvinc/loadingv2md

v0.1.12

Published

vue转换markdown

Downloads

23

Readme

vue转换markdown文件, 为vuepress简便处理

插件作用

  • 将vue转换为markdown文件
  • 压缩vue文件里的template里img src应用到了的图片和styles里background运用的图片

安装

  cnpm i @kvinc/loadingv2md@latest -g
  或者
  npx @kvinc/loadingv2md@latest

配置项

| 参数名 | 类型 | 说明 | | :----: | :----:| :----:| | config | string | 指定配置文件, 必须是v2md.config.js | |component| boolean| 是否展示组件 | |ignore| array or string | 忽略某个文件下的vue转换 | |entry| string | 入口文件夹 | |compress| boolean | 是否压缩图片 |

命令行用法

npx @kvinc/loadingv2md@latest --config v2md.config.js --component  --ignore dir
=== OR ===
loadingv2md --config v2md.config.js --component  --ignore dir

参数使用可以参考:
  loadingv2md -h
  npx @kvinc/loadingv2md@latest -h

配置文件

  {
    entry: 'src', 默认是src
    component: true,
    ignore: [dir, ...] || dir
  }

转换格式

methods

  /** 
  * @param {string} # 参数名称 - 参数说明
  * @returns {string} # 返回名称 - 返回说明
  * @author {作者名称}
  * @description {描述}
  */

=== 转换 ===

作者: 作者名称

描述

  描述内容

参数

| 方法名 | 参数 | 类型 | 说明 | | :----: | :----:| :----:| :----:| | 方法名 | 参数名称 | 参数类型 | 参数说明

返回

| 方法名 | 参数 | 类型 | 说明 | | :----: | :----:| :----:| :----:| | 方法名 | 参数名称 | 参数类型 | 参数说明

配置了component

 name: 'BaseComponent'

=== 转换 ===

 <base-component></base-component>

根据vue component name来配置title

 name: 'BaseComponent'

=== 转换 ===

 ---
  BaseComponent
 ---

压缩图片

template

  <div>
    <img src="/path/to" />
  </div>

  说明: template是以上这种, 会根据/path/to来查找当前目录下图片并且进行压缩覆盖, 注意, 图片暂时只能在src下的assets里, 生成也会在src下的assets

styles

  background: url(/path/to)

  说明: 与template类似

markdown生成

  每个vue文件在自己的目录下都会生成一个md