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

vue3-directive-image-previewer

v2.1.1

Published

## 功能简介

Downloads

10

Readme

Vue 3 + TypeScript + Vite

功能简介

参考:vue-directive-image-previewer 支持 vue3 的指令式 图片点击预览
无任何多余参数 例子:

能使用,简陋版npmjs 包地址

//设置淘宝源
npm config set registry https://registry.npm.taobao.org

//设置公司的源
npm config set registry 公司的源

//查看源,可以看到设置过的所有的源
npm config get registry

//本次从淘宝仓库源下载
npm --registry=https://registry.npm.taobao.org install

打包步骤

pnpm adduser
pnpm config set registry https://registry.npm.taobao.org
pnpm config set registry https://registry.npmjs.org/

修改版本号
pnpm build
pnpm publish --no-git-checks

使用

npm install vue3-directive-image-previewer@latest -D
import directiveImagePreviewer from 'vue3-directive-image-previewer'
const app = createApp(App)
app.use(directiveImagePreviewer.components.install)
app.directive('directiveImagePreviewer',directiveImagePreviewer.directive.vDirectiveImagePreviewer)
app.mount('#app')

import directiveImagePreviewer from 'vue3-directive-image-previewer'
console.log(directiveImagePreviewer.composables.useInc(ref(1)))

<Counter />

<img v-directive-image-previewer src='https://pic1.zhimg.com/80/v2-f920346b7269e801ab93dc87e0e18ba4_720w.jpg?source=1940ef5c' />

vue3-exports

开箱即用的 vite + vue3 + vitest + ts 库模板,用来打包 vue3.vue 组件与 composition-api

特性

开发时

  • typeScript
  • 构建工具 👉 vite
  • 测试工具 👉 vitest
  • 包管理工具 👉 pnpm
  • 原子 css 引擎 👉 unocss
  • vue3,支持 sfcsetup 语法糖

生产时

  • 支持 vue3.vue 组件
  • 并行地打包 js 和打包类型声明
  • 支持同时导出 commonjsesmodule 两种规范
  • 支持导出 .vue 组件也支持的完全 dts 类型声明

动机

开发 vue3 相关的 npm 库时,可以直接用该模板进行快速开发,而不需要重新构建繁杂的开发环境。

使用

初始化

更改模板中的 package.jsonLICENSEREADME.md 为自己的信息 😜

注意

由于用到 pnpmworkspace,所以 examples/vite/package.json 也需要改 👇

{
	...
	"devDependencies": {
-           "vue3-exports": "workspace:*",
+           "your-package-name": "workspace:*"
	}
    ...
}

命令

pnpm i # 安装依赖

pnpm dev # 开发

pnpm build # 打包

pnpm build-js # 仅打包 js

pnpm build-types # 仅打包类型

pnpm release # 发布

pnpm play # 启动 example

pnpm play:build # 打包 example

pnpm play:preview # 预览 example

pnpm test # 单元测试

pnpm test:ui # 单元测试(ui)

pnpm test:update # 单元测试(持续更新)

导出

src/exports 里导出即可

// 导出 composition-api
export { useInc } from "./composables/inc";

// 导出 .vue 组件
export { default as Hello } from "./components/Hello.vue";

License

Made with name

Published under MIT License.