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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hizsh/wc-ship

v0.0.5

Published

a simple Webcompoent library

Readme

Built With Stencil

Web Component

Vue

非vue3以上版本或者webpack不支持语法时,采用兼容方式引入

导入节点模块

import Vue from 'vue';
import App from './App.vue';

import { applyPolyfills, defineCustomElements } from '@hizsh/wc-ship/loader'

告诉 Vue 忽略自定义元素标签

// Tell Vue to ignore all components defined in the @hizsh/wc-ship
// package. The regex assumes all components names are prefixed
// 'test'
Vue.config.ignoredElements = [/wc-\w*/];

将 Stenciljs 组件代码绑定到窗口对象

// Bind the custom elements to the window object
applyPolyfills().then(() => {
  defineCustomElements();
});

然后这些组件应该在任何 Vue 组件中都可用

<div>
  <test-stencil-component></test-stencil-component>
</div>

上述用于集成 Stencil 自定义元素库的技术已经在使用vue-cliES2015 和 WebPack 作为主要选项创建的 Vue 应用程序上进行了测试。


  • 注 wc-ship-location(船位置组件) 组件特殊 需要外部js脚本
  <script src="//api.shipxy.com/h5/api/plugins/jquery/jquery.min.js"></script>
  <!-- 船讯网api 需要自己申请 -->
  <script src="http://api.shipxy.com/h5/api/?v=3.0"></script>

  <wc-ship-location  style="
    position: absolute;
    width: calc(100% - 0px);
    height: calc(100% - 0px);
    text-align: center;
    background-color: #A3CCFF;
    box-sizing: border-box;">
    <h1 slot="search">mr zhou</h1>
  </wc-ship-location>

Framework Integration

各个框架的使用方式参考stencil官方文档Framework Integration