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

jraiser

v3.1.5

Published

Modular JavaScript Foundation Library

Downloads

15

Readme

JRaiser - 模块化JavaScript基础库

简介

JRaiser 包含 Web 前端开发中常用的基础功能。它基于 CommonJS 模块化规范编写,可应用于浏览器端(需构建为 CMD 模块并配合加载器使用)和 Node.js 端。

JRaiser 的绝大部分模块兼容 PC 端主流浏览器(IE 6+)和移动端主流浏览器(iOS 9.1+、Android 4.1+);小部分模块在 IE 6/7 下不可用。

使用方法

通过 npm 安装

npm install jraiser

这种方法一般用于:

  • Node.js 项目。
  • 能调用 node_modules 模块的前端项目,如通过「Vue CLI」、「Create React App」等工具创建的项目。

使用 CMD 代码

拷贝 dist-cmd 目录下的代码到项目中使用(需搭配 Bowl.js 加载器),一般用于传统 Web 项目,也是 2.x 版本的用法。

使用 src 代码

拷贝 src 目录下的代码到项目中使用,自行选择加载器、编写构建逻辑。

模块版本号

JRaiser 的模块文件都是按「模块名/版本号/」存放的,这意味着你可以在项目中同时使用模块的新旧版本。得益于模块化机制,这不会产生版本冲突。

在 3.0.0 之前,模块版本号采用的是类似「1.0.x」的规则(第三段表示兼容修改,不新建版本号),其中最后的「.x」意义不大。因此,从 3.0.0 开始,模块版本号简化到两段,如「1.0」。

为了控制文件数量,类库进行大版本升级时,会删除所有模块的旧版本。

项目文件

dev-server

开发和测试服务器,通过 Express 搭建,可以通过 npm start 启动。

dist-cmd

构建为 CMD 模块的代码,包含源代码(*-debug.js)以及通过 Bowljs CLI 构建的代码(*.js),需搭配 Bowl.js 进行加载。

dist-npm

构建为 npm 包的代码,用于发布到 npm 平台。

doc-template

文档模板,用于生成 API 文档。

docs

生成的 API 文档。

src

模块源代码。

构建相关文件

  • document.settings : Bowljs CLI 文档配置。
  • package.setings & lib.settings : Bowljs CLI 构建配置。
  • gulpfile.js : 构建逻辑。

相关链接