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

@ibiz-template-plugin/antv-x6-design

v0.0.1-dev.1

Published

ibiz full-dynamic-vue 模板项目扩展插件示例

Downloads

2

Readme

VueR9 模板插件示例

此示例为 VueR9 全动模板插件编写示例。包含 .vue、.tsx 写法,并已配置好打包模式。可直接发布至 npm 或者 system 模式引用。

本地启动

// 安装依赖,在项目根目录执行
pnpm i
// 本地开发
pnpm dev

生产打包

pnpm build

本地开发外部引用

切记只可本地开发引用,线上插件模式还是使用 system 模式

插件项目

# 将本地项目设置为可外部依赖
pnpm link --global

模板主项目

# 将本地项目设置为可外部依赖
pnpm link --global "[组件包名称]"

在项目中按照标准 vue 插件引入即可。

import { VueConstructor } from 'vue';

export default {
  install(v: VueConstructor) {
    ibiz.plugin.setDevPlugin('[组件包名称]', () => import('[组件包名称]'));
  },
};

引用静态资源文件

  1. 创建global.ts文件

文件路径: [项目根目录]/src/global.ts

import { PluginStaticResource } from '@ibiz-template/runtime';

const resource = new PluginStaticResource(import.meta.url);

export { resource };
  1. index.ts入口文件第一行引入global.ts

文件路径: [项目根目录]/src/index.ts

import './global';
  1. 组件内导入global.ts的resource方法, 通过resource.dir方法引用静态资源文件

静态资源目录路径:[项目根目录]/public

// 例:[项目根目录]/public/assets/img/xxx.svg
// 组件内引用方式

<img src={resource.dir('/assets/img/xxx.svg')} />