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

biu_anvas

v0.0.2

Published

A good JavaScript library scaffold

Downloads

4

Readme

开箱即用的JavaScript库开发框架。 Build Status codecov Percentage of issues still open

本项目助力开发者轻松开发属于自己的JavaScript库,灵感基于颜海镜大佬的jslib-base

特性

  • 支持ES6+或TypeScript编写源码
  • 第三方依赖自动注入(自动剔除第三方依赖无用代码tree shaking)
  • 多环境支持(支持浏览器原生,支持AMD,CMD,支持Webpack,Rollup,fis等,支持Node)
  • 集成文档自动生成(JSDoc|TypeDoc)
  • 集成代码风格校验(eslint|tslint)
  • 集成单元测试环境和测试覆盖率(jest)
  • 支持一键重命名
  • 支持监听构建
  • 集成commit信息校验及增量lint(husky)
  • 集成commit信息模板(使用npm run commit代替git commit)
  • 集成可持续构建工具travis-ci
  • 集成单元测试结果上报codecov
  • 集成ISSUE_TEMPLATE

使用

首先克隆仓库至本地并安装依赖:

$ git clone https://github.com/logan70/jslib-base-base-base-base-base-base.git
$ cd jslib-base
$ npm install

初始化框架,按照提示填写项目名、变量名及项目地址

$ npm run init

然后就可以在src/文件夹愉快地开发了(可监听变化构建,实时查看效果),开发完成后打包

# 监听构建
$ npm run dev

# 打包构建
$ npm run build

最后就是打包发布:

# 自动修改CHANGLOG及版本信息
$ npm run release
# 登录npm
$ npm login
# 发布npm包
$ npm publish

发布后就可以在各种环境内使用你自己的JavaScript库了:

// 浏览器内使用
// 引入文件:<script src="path/to/dist/index.aio.min.js"><script>
yourLibName.xxx(xxx)

// es6模块规范内使用
import yourLibName from 'yourLibName'
yourLibName.xxx(xxx)

// Node内使用
const yourLibName = require('yourLibName')
yourLibName.xxx(xxx)

更多技术实践细节可前往博客从零到一开发你的专属JavaScript库

欢迎大家多多Star支持。

文档

API文档样例(JavaScript版)

API文档样例(TypeScript版)

单元测试覆盖信息样例

支持环境

开发环境要求Node8+

| IE | CH | FF | SF | OP | IOS | Android | Node | | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- | | 8+ | 29+ | 55+ | 9+ | 50+ | 9+ | 4+ | 4+ |

目录介绍

├── src                        // 源码目录
├── dist                       // 打包产出代码目录
├── docs                       // API文档目录
├── __tests__                  // 单元测试文件目录
├── coverage                   // 单元测试覆盖信息目录
├── jslib.config.js            // 框架配置文件
└── CHANGELOG.md               // 变更日志

CHANGELOG

CHANGELOG

License

MIT