KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
jslib-base
★ 18
Open GitHub ↗
开箱即用的JavaScript库开发框架
Download README (.md)
Explore Similar Repositories
ModBot
:
A mod loader for clone drone in the danger zone!
CPHelper
:
A tool for competitive programming in sublime text.
KotlinMQTTSample
:
A sample Kotlin Android application to connect/ subscribe and publish data via MQTT using Eclipse Paho framework
ExportDataToExcel
:
Export Xamarin.Forms ListView Items to Excel File.
PAR_experiments
:
Learning Robust Global Representations by Penalizing Local Predictive Power (NeurIPS 2019))
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
jslib-base
?
Download (.md)
<h1 align="center">jslib-base</h1> <div align="center"> 开箱即用的JavaScript库开发框架。 <br> [](https://travis-ci.org/logan70/jslib-base) [](https://github.com/logan70/jslib-base) [](https://codecov.io/gh/logan70/jslib-base) [](http://isitmaintained.com/project/logan70/jslib-base "Percentage of issues still open") <br> <br> </div> 本项目助力开发者轻松开发属于自己的JavaScript库,灵感**基于颜海镜大佬的[jslib-base](https://github.com/yanhaijing/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](https://travis-ci.org/logan70/jslib-base) - 集成单元测试结果上报[codecov](https://codecov.io/gh/logan70/jslib-base) - 集成ISSUE_TEMPLATE ## 使用 首先克隆仓库至本地并安装依赖: ```bash $ git clone https://github.com/logan70/jslib-base-base-base-base-base-base.git $ cd jslib-base $ npm install ``` 初始化框架,按照提示填写项目名、变量名及项目地址 ```bash $ npm run init ```  然后就可以在`src/`文件夹愉快地开发了(可监听变化构建,实时查看效果),开发完成后打包 ```bash # 监听构建 $ npm run dev ```  ```bash # 打包构建 $ npm run build ```  最后就是打包发布: ```bash # 自动修改CHANGLOG及版本信息 $ npm run release # 登录npm $ npm login # 发布npm包 $ npm publish ``` 发布后就可以在各种环境内使用你自己的JavaScript库了: ```js // 浏览器内使用 // 引入文件:<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库](https://github.com/logan70/Blog/issues/7)。 欢迎大家多多Star支持。 ## 文档 [API文档样例(JavaScript版)](https://logan70.github.io/jslib-base/docs/jsdoc/index.html) [API文档样例(TypeScript版)](https://logan70.github.io/jslib-base/docs/tsdoc/index.html) [单元测试覆盖信息样例](https://logan70.github.io/jslib-base/coverage/lcov-report/index.html) ## 支持环境 > 开发环境要求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](https://github.com/logan70/jslib-base/blob/master/CHANGELOG.md) ## License [MIT](https://github.com/logan70/jslib-base/blob/master/LICENSE)