youmightnotneedjquery README

The project's README from github.com/HubSpot/youmightnotneedjquery. As one markdown file: README.md.

You Might Not Need jQuery

Build Workflow

A resource for doing things au naturel.

YouMightNotNeedjQuery.com

Contributing

To add a new section, just create a folder for it, and add jquery.js, and ie8.js, ie9.js, ie10.js, ie11.js, and modern.js (for Chrome/Safari/Firefox) as needed. For example, if you have ie8.js and ie9.js, the ie9 version will be shown to people looking for a solution that works in ie9, ie10, ie11, or modern JS.

Building

Building YMNNJQ requires Node.js

  1. In the project directory, run npm install
  2. To build the project and watch for changes, run npm run dev.
  3. To build the project without watching for changes, use npm run build.

youmightnotneedjquery (HubSpot/youmightnotneedjquery)

Searching Database…

这是什么?这是一份参考资料,展示了常见 jQuery 方法对应的纯原生 JavaScript 写法,帮你判断某项任务是否仍需要使用 jQuery,以及需要支持到什么浏览器级别。
这是需要安装的库,还是只是一个参考网站?它是一个使用 Astro 构建的静态参考网站(YouMightNotNeedjQuery.com),无需在项目中添加任何内容。你只需查找某个 jQuery 方法,然后复制其中显示的原生 JavaScript 代码片段即可。
我该如何在本地运行网站以添加新示例?克隆仓库,在项目目录中运行 npm install,然后运行 npm run dev 进行构建并监听文件变化;如果只需要一次性的生产环境构建,则运行 npm run build。
构建它除了 Node.js 之外还需要其他东西吗?不需要,构建本项目只需要 Node.js,没有其他已列出的依赖项。
选择代码片段时有什么需要注意的吗?由于示例按 IE 版本拆分,你需要先确定最低需要支持的浏览器。ie9.js 代码片段同样适用于 ie10、ie11 和现代浏览器,但无法用于 ie8。
我能不克隆仓库直接浏览在线版本吗?可以,本仓库的内容为公开网站 YouMightNotNeedjQuery.com 提供支持。
Creator
HubSpot
Size
0.5 MB
Stars
14.1K
Updated
CommitJul 03
Age
12y
Commits · 90 Days