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

components-ls

v0.1.1

Published

一款实用的前端组件库

Downloads

2

Readme

前端组件库-智慧教育(components-zhjy)

安装依赖

npm install

添加组件

在components中添加组件

打包组件库

运行npm run build:com打包组件库源码,打包后的文件在dist文件夹里,

其中components-zhjy.umd.js和components-zhjy.css两个文件需要用到

(将这两个文件拷贝到项目中,main.js中引入,即可在项目中使用添加的组件)。

npm run build:com

组件调试

在与components平级的目录创建了一个项目,名为examples,用于本地调试组件源码,

我们已经在 -> examples -> src -> main.js里引入components-zhjy.umd.js和components-zhjy.css两个文件,

这样可以使我们在 -> examples -> src ->App.vue 中直接使用components中的组件

在终端进入examples文件夹,首次启动时npm install安装依赖,然后npm run serve启动examples,我们可以看到组件注册并使用成功。

NPM包发布

先运行npm run build:com打包组件库,才能发布npm包

npm网站注册账号(是否使用公司账号?) npm

运行npm login命令登录npm账号,按照提示输入用户名密码邮箱等信息

(如果设置了淘宝镜像,会登录不成功,要将镜像改为npm官方镜像 npm config set registry https://registry.npmjs.org 查看镜像 npm config get registry)

最后运行npm publish完成npm包发布

(如果包名已存在,会发布不成功,换包名:-> package.json -> name 修改name,

同时"main": "dist/components-zhjy.umd.js"也要修改成对应路径,main: 本包向外暴露的文件,很重要,一定要和你打包出来的文件名一模一样)

参考文档 来,体会一下npm包的发布、更新管理、使用——完整教程

npm login
npm publish

快速上手搭建VUE组件库

See 参考文档.

Customize configuration

See Configuration Reference.