{"id":13512000,"url":"https://github.com/JSLite/JSLite","last_synced_at":"2025-03-30T21:31:23.648Z","repository":{"id":21927505,"uuid":"25251843","full_name":"JSLite/JSLite","owner":"JSLite","description":"与jQuery有着类似的api，让web开发更迅速，下载执行更快、量级更轻，针对现代高级浏览器的JavaScript库。","archived":false,"fork":false,"pushed_at":"2021-03-04T09:28:18.000Z","size":3468,"stargazers_count":372,"open_issues_count":5,"forks_count":83,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-21T00:30:40.681Z","etag":null,"topics":["javascript","jquery","jslite","web-javascript"],"latest_commit_sha":null,"homepage":"http://jslite.github.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JSLite.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-15T11:33:11.000Z","updated_at":"2025-01-31T02:37:36.000Z","dependencies_parsed_at":"2022-08-05T15:01:00.574Z","dependency_job_id":null,"html_url":"https://github.com/JSLite/JSLite","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSLite%2FJSLite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSLite%2FJSLite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSLite%2FJSLite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSLite%2FJSLite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSLite","download_url":"https://codeload.github.com/JSLite/JSLite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246135748,"owners_count":20729057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","jquery","jslite","web-javascript"],"created_at":"2024-08-01T03:01:24.266Z","updated_at":"2025-03-30T21:31:23.628Z","avatar_url":"https://github.com/JSLite.png","language":"JavaScript","readme":"# JSLite\n\n[![](https://img.shields.io/github/issues/JSLite/JSLite.svg)](https://github.com/JSLite/JSLite/issues)  [![](https://img.shields.io/github/forks/JSLite/JSLite.svg)](https://github.com/JSLite/JSLite/network) [![](https://img.shields.io/github/stars/JSLite/JSLite.svg)](https://github.com/JSLite/JSLite/stargazers) [![](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/JSLite/JSLite/master/MIT-LICENSE) [![](https://travis-ci.org/JSLite/JSLite.svg?branch=master)](https://travis-ci.org/JSLite/JSLite) [![](https://img.shields.io/github/release/JSLite/JSLite.svg)](https://github.com/JSLite/JSLite/releases)\n\n```\n   __     ______     __         __     ______   ______    \n  /\\ \\   /\\  ___\\   /\\ \\       /\\ \\   /\\__  _\\ /\\  ___\\   \n _\\_\\ \\  \\ \\___  \\  \\ \\ \\____  \\ \\ \\  \\/_/\\ \\/ \\ \\  __\\   \n/\\_____\\  \\/\\_____\\  \\ \\_____\\  \\ \\_\\    \\ \\_\\  \\ \\_____\\ \n\\/_____/   \\/_____/   \\/_____/   \\/_/     \\/_/   \\/_____/ \n\n```\n\n让web开发更迅速，下载执行更快、量级更轻，针对现代高级浏览器的JavaScript库。 推进前端开发标准对于攻城师来说，人人有责。  \n\n**如有疑问欢迎到这些地方交流：**  \n  \n[segmentfault社区](http://segmentfault.com/t/jslite/blogs) | [官方网站](http://jslite.github.io/) \n\n\u003e 1. jQuery 的目标是兼容所有主流浏览器，这就意味着它的大量代码对移动端的浏览器是无用或者低效的。\n\u003e 2. 而 JSLite 只针对先进浏览器(支持HTML5,CSS3)、移动端浏览器编写，使用js新方法实现jQuery API，因此体积更小、效率更高.\n\u003e 3. 更重要的是，JSLite 的 API 完全仿照 jQuery ，所以学习成本也很低。\n\u003e 4. JSLite与jQuery有着绝大部分类似的api，通用库只有5-10k，手机上每一kb都是钱。\n\u003e 5. 让web开发更迅速，下载执行更快、量级更轻，针对现代高级浏览器的JavaScript库。 推进前端开发标准对于攻城师来说，人人有责。\n\n## 100% compatibility with common browsers - 主要兼容的浏览器(100% 的兼容)\n此兼容，是根据我使用的一些js方法函数的支持情况来判断的。设备过少，部分是根据[developer.mozilla.org](https://developer.mozilla.org)的方法函数兼容数据来判断的，下面的我们的主要兼容目标\n\n\u003e Safari 6+ (Mac)  \n\u003e Chrome 30+ (Windows, Mac, Android, iOS, Linux, Chrome OS)  \n\u003e Firefox 24+ (Windows, Mac, Android, Linux, Firefox OS)  \n\u003e iOS 5+ Safari\n\u003e Android 2.3+ Browser  \n\u003e Internet Explorer 10+ (Windows, Windows Phone)  \n\n\n## Installation - 安装\n\n您需要在系统上安装 `Node.js`的。 \n\n```shell\n#npm 下载到 node_modules\n$ npm install jslite\n\n#bower 下载到 bower_components\n$ bower install jslite\n\n#安装grunt依赖\n$ npm install\n\n#启动grunt自动压缩合并，进入开发模式.... \n#默认合并所有模块生成到一个build目录中\n$ npm start\n```\n\n## Test - 测试\n\n\u003e 测试需要在系统上安装 `Node.js`的 `4.x` 以上版本。 \n\n```shell\n# 安装全局的 gulp\n$ npm install gulp -g \u0026\u0026 npm install \n\n# 先生成新的 压缩版本的JSLite\n$ gulp  \n\n# 在命令行中 － 查看测试结果\n# 进行单元测试\n$ npm test \n\n# 在浏览器中查看 － 编写预览测试结果\n# 打开 test/index.html\n```\n\n## JSLite模块\nJSLite 模块中的 `src/` 目录的各个文件。\n\n模块 | 默认加载 | 描述\n--- | ------- | -----\nJSLite | `✔` | 核心模块，包含大多数方法。\nfunction | `✔` | 内部函数调用\npolyfill | - | 支持桌面浏览器IE和移动端 Windows Phone 8。\nform | - | 表单方法。\nevent | - | 事件处理。\najax | - | 异步请求的方法，发起任意Ajax请求。\n\n默认合并 `polyfill` `function` `JSLite` 。上面打 `✔` 都为默认加载的核心模块。其它均可选择性加载。\n\n```shell\n# 运行下面任务请确认依赖是否安装 安装方法 `npm install`\n# 模块选择合并，做一个自定义生成\n# 默认不传环境变量全部合并\n$ MODULES=\"polyfill event\" gulp\n\n# on Windows\nc:\\JSLite\u003e SET MODULES=polyfill event\nc:\\JSLite\u003e gulp\n```\n\n## 生成map文件\n\n```bash\ngulp map\n```\n\n### 传统方法\n1. 去[官网下载](http://jslite.io)JSLite  \n2. 页面Head标签内引用 JSLite.js  \n\n```html\n\u003cscript type=\"text/javascript\" src=\"JSLite.js\"\u003e\u003c/script\u003e\n```\n\n## Usage - 用法\n```js\n$(\"#box\") //⇒ 返回节点数组  //⇒ [\u003cdiv\u003e​…​\u003c/div\u003e​]\n$(\"\u003cdiv\u003e\u003c/div\u003e\") //⇒ 生成div节点\n//JSLite(func) 相当于ready\nJSLite(function($){\n    console.log(\"在节点加载完成之后执行\")\n})\n//$(func) 相当于ready\n$(function($){\n    console.log(\"在节点加载完成之后执行\")\n})\n```\n\n\n\n## 贡献\n\n快快来贡献😄。\n\n\u003ca href=\"https://github.com/jaywcjlove\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/1680273?v=3\u0026s=50\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/yanhaijing\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/3192087?v=3\u0026s=50\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/xurui3762791\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/10526437?v=3\u0026s=50\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/yaochuxia\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/8984000?v=3\u0026s=50\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/52cik\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/5033310?v=3\u0026s=50\"\u003e\u003c/a\u003e\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJSLite%2FJSLite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJSLite%2FJSLite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJSLite%2FJSLite/lists"}