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

myfetchwxj

v1.1.4

Published

基于fetch封装自定义的后台交互fetch(实现了webpack打包成通用的UMD插件)

Downloads

5

Readme

插件的开发:

一、使用es6的class开发;

二、使用es7的async await 进行后台交互的异步处理;

三、使用webpack打包成通用的UMD插件

output:{

filename:'bundle.js',

path:path.resolve('dist'),

// filename:'vue-tips.js'

libraryTarget:'umd',//输出规范,amd\cmd\commonjs

library:'MyFetch'//输出,这是模块名

},

四、使用fetch技术进行后台交互的封装

为了支持旧版本浏览器

npm install --save whatwg-fetch es6-promise

在使用fetch的文件中引入

import 'whatwg-fetch'

import 'es6-promise'

五、npm包上传的流程

1.在npm官网注册账号

2.设置上传的仓库,可以是npm仓库,淘宝仓库,公司搭建的仓库

3.cd进入插件的文档内

4.npm login

5.输入用户名按回车

6.输入密码

7.输入邮箱

8.上传前注意:设置package.json文件

(1)包名:name:

(2)入口:main:

(3)版本号:主版本号:次版本号:修订号

(4)版本号只能递增

9.npm publish

六、下载包测试

npm install --save packageName

import packName from ‘packageName’

测试使用是否正常