-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
思忠
committed
Feb 13, 2020
1 parent
87f5fe6
commit eebd118
Showing
223 changed files
with
6,568 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { commitlint } = require('@ice/spec'); | ||
|
||
module.exports = commitlint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[makefile] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 忽略目录 | ||
build/ | ||
test/ | ||
tests/ | ||
node_modules/ | ||
dist/ | ||
out/ | ||
|
||
# node 覆盖率文件 | ||
coverage/ | ||
|
||
# 忽略测试文件 | ||
/packages/*/__tests__ | ||
/packages/*/lib/ | ||
|
||
# 忽略第三方包 | ||
/vendor/loader.js | ||
|
||
# 忽略文件 | ||
**/*-min.js | ||
**/*.min.js | ||
|
||
workspace/ | ||
scripts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const { eslint, tslint, deepmerge } = require('@ice/spec'); | ||
|
||
const commonRules = { | ||
"react/jsx-filename-extension": 0, | ||
"semi": 0, | ||
"no-underscore-dangle": 0, | ||
"class-methods-use-this": 0, | ||
"no-param-reassign": 0, | ||
"comma-dangle": 0, | ||
}; | ||
|
||
const jsRules = deepmerge(eslint, { | ||
rules: { | ||
...commonRules, | ||
}, | ||
}); | ||
|
||
const tsRules = deepmerge(tslint, { | ||
rules: { | ||
...commonRules, | ||
"@typescript-eslint/interface-name-prefix": 0, | ||
"@typescript-eslint/explicit-function-return-type": 0, | ||
}, | ||
}); | ||
|
||
delete tsRules.root; | ||
|
||
module.exports = { | ||
...jsRules, | ||
overrides: [ | ||
{ | ||
...tsRules, | ||
files: ['**/*.ts', '**/*.tsx'], | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Dependencies | ||
node_modules | ||
jspm_packages | ||
|
||
# Only keep yarn.lock in the root | ||
package-lock.json | ||
*/**/yarn.lock | ||
|
||
# Logs | ||
*.log | ||
|
||
# Packages | ||
packages/*/lib/ | ||
|
||
# temp folder .ice | ||
examples/*/.ice | ||
|
||
.eslintcache | ||
docs/.vuepress/dist/ | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# CHANGELOG for icejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
MIT License | ||
MIT LICENSE | ||
|
||
Copyright (c) 2020 ICE LAB | ||
Copyright (c) 2018-present Alibaba Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
English | [简体中文](./README_zh-CN.md) | ||
|
||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/ice.js"><img src="https://badgen.net/npm/dm/ice.js" alt="Downloads"></a> | ||
<a href="https://www.npmjs.com/package/ice.js"><img src="https://badgen.net/npm/v/ice.js" alt="Version"></a> | ||
<a href="/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license" /></a> | ||
<a href="https://github.com/alibaba/ice/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a> | ||
<a href="https://gitter.im/alibaba/ice"><img src="https://badges.gitter.im/alibaba/ice.svg" alt="Gitter" /></a> | ||
</p> | ||
|
||
> A universal framework based on react.js | ||
## Features | ||
|
||
- 🐒 **Engineering**:Out of the box support for ES6+、 TypeScripts、Less、Sass、 CSS Modules,etc | ||
- 🦊 **routing**:Powerful Routing System, supports configured routing and conventions routing | ||
- 🐯 **state management**:Built-in icestore, lightweight state management solution based on React Hooks. | ||
- 🐶 **Logger**:Built-in logger solution, it's a flexible abstraction over using `console.log` as well | ||
- 🐱 **Helpers**:Built-in helpers, provide some useful utility functions | ||
- 🦁 **Application configuration**:provide powerful and extensible application configuration function,support multiple Environment Configuration | ||
- 🐴 **Hooks**:Provide Hooks APIs such as useApp and usePage, etc | ||
- 🐌 **Plugin system**:The plugin system provides rich features and allow the community to build reusable solutions | ||
- 🐘 **typescript**:Support typescript | ||
- 🐂 **Modern**:Support SPA、SSR、 MPA and Micro-frontend | ||
|
||
Learn more at <https://ice.work/docs/guide/about>. | ||
|
||
## Quick start | ||
|
||
Create a new ice project using create-ice: | ||
|
||
```bash | ||
$ npm init ice <YourProjectName> | ||
``` | ||
|
||
`npm init <initializer>` is available in npm 6+ | ||
|
||
|
||
Start local server to launch project: | ||
|
||
```bash | ||
$ cd <YourProjectName> | ||
$ npm install | ||
$ npm run start | ||
``` | ||
|
||
It's as simple as that! | ||
|
||
## Contributing | ||
|
||
```bash | ||
# 1. clone and setup | ||
$ git clone [email protected]:ice-lab/icejs.git | ||
$ cd icejs && npm run setup | ||
|
||
# 2. watch packages | ||
$ npm run watch | ||
|
||
# 3. run example | ||
$ cd examples/spa-basic | ||
$ npm link ../../packages/icejs | ||
$ npm start | ||
``` | ||
|
||
Please see our [CONTRIBUTING.md](/.github/CONTRIBUTING.md) | ||
|
||
## Ecosystem | ||
|
||
| Project | Version | Docs | Description | | ||
|----------------|-----------------------------------------|--------------|-----------| | ||
| [icejs] | [![icejs-status]][icejs-package] | [docs][icejs-docs] |A universal framework based on react.js| | ||
| [iceworks] | [![iceworks-cli-status]][iceworks-cli-package] | [docs][iceworks-docs] |One-stop visual source code development workbench based on materials| | ||
| [icestark] | [![icestark-status]][icestark-package] | [docs][icestark-docs] |Micro Frontends solution for large application| | ||
| [icestore] | [![icestore-status]][icestore-package] | [docs][icestore-docs] |Lightweight state management solution based on React Hooks| | ||
|
||
[icejs]: https://github.com/ice-lab/icejs | ||
[iceworks]: https://github.com/alibaba/ice | ||
[icestark]: https://github.com/ice-lab/icestark | ||
[icestore]: https://github.com/ice-lab/icestore | ||
|
||
[icejs-status]: https://img.shields.io/npm/v/icejs.svg | ||
[iceworks-cli-status]: https://img.shields.io/npm/v/iceworks.svg | ||
[icestark-status]: https://img.shields.io/npm/v/@ice/stark.svg | ||
[icestore-status]: https://img.shields.io/npm/v/@ice/store.svg | ||
|
||
[icejs-package]: https://npmjs.com/package/ice.js | ||
[iceworks-cli-package]: https://npmjs.com/package/iceworks | ||
[icestark-package]: https://npmjs.com/package/@ice/stark | ||
[icestore-package]: https://npmjs.com/package/@ice/store | ||
|
||
[icejs-docs]: https://ice.work/docs/icejs/about | ||
[iceworks-docs]: https://ice.work/docs/iceworks/about | ||
[icestark-docs]: https://ice.work/docs/icestark/guide/about | ||
[icestore-docs]: https://github.com/ice-lab/icestore#icestore | ||
|
||
## Community | ||
|
||
| DingTalk community | GitHub issues | Gitter | | ||
|-------------------------------------|--------------|---------| | ||
| <a href="https://ice.alicdn.com/assets/images/qrcode.png"><img src="https://ice.alicdn.com/assets/images/qrcode.png" width="150" /></a> | [issues] | [gitter]| | ||
|
||
[issues]: https://github.com/alibaba/ice/issues | ||
[gitter]: https://gitter.im/alibaba/ice | ||
|
||
## License | ||
|
||
[MIT](/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
[English](./README.md) | 简体中文 | ||
|
||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/ice.js"><img src="https://badgen.net/npm/dm/ice.js" alt="Downloads"></a> | ||
<a href="https://www.npmjs.com/package/ice.js"><img src="https://badgen.net/npm/v/ice.js" alt="Version"></a> | ||
<a href="/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license" /></a> | ||
<a href="https://github.com/alibaba/ice/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a> | ||
<a href="https://gitter.im/alibaba/ice"><img src="https://badges.gitter.im/alibaba/ice.svg" alt="Gitter" /></a> | ||
</p> | ||
|
||
> 基于 React.js 的通用框架 | ||
## 特性 | ||
|
||
- 🐒 **工程**:开箱即用的工程配置,支持 ES6+、TypeScript、样式方案(Less/Sass/CSS Modules)等 | ||
- 🦊 **路由**:默认使用配置式路由,同时支持约定式路由 | ||
- 🐯 **数据流**:内置集成 icestore,基于 React Hooks 的轻量级状态管理方案 | ||
- 🐶 **日志**:内置集成 logger,类似 `console.log` 的统一日志方案 | ||
- 🐱 **工具函数**:内置集成 helper,提供常用的工具函数 | ||
- 🦁 **应用配置**:内置集成 config,支持多环境配置 | ||
- 🐴 **Hooks**:提供应用级别 useApp 和页面级别 usePage 等 Hooks API | ||
- 🐌 **插件体系**:提供插件机制,可以扩展框架的核心功能 | ||
- 🐘 **typescript**:默认使用 typescript | ||
- 🐂**Modern**:支持 SPA、SSR、MPA、Serverless、微前端等流行的应用类型 | ||
|
||
## 快速开始 | ||
|
||
创建项目 | ||
|
||
```bash | ||
$ npm init ice <YourProjectName> | ||
``` | ||
|
||
`npm init <initializer>` 需要 npm 6+ 版本 | ||
|
||
启动项目 | ||
|
||
```bash | ||
$ cd <YourProjectName> | ||
$ npm install | ||
$ npm run start | ||
``` | ||
|
||
## 贡献代码 | ||
|
||
```bash | ||
# 1. clone and setup | ||
$ git clone [email protected]:ice-lab/icejs.git | ||
$ cd icejs && npm run setup | ||
|
||
# 2. watch packages | ||
$ npm run watch | ||
|
||
# 3. run example | ||
$ cd examples/spa-basic | ||
$ npm link ../../packages/icejs | ||
$ npm start | ||
``` | ||
|
||
贡献代码请参考 [CONTRIBUTING.md](/.github/CONTRIBUTING.md) | ||
|
||
## 生态 | ||
|
||
| Project | Version | Docs | Description | | ||
|----------------|-----------------------------------------|--------------|-----------| | ||
| [icejs] | [![icejs-status]][icejs-package] | [docs][icejs-docs] |A universal framework based on react.js| | ||
| [iceworks] | [![iceworks-cli-status]][iceworks-cli-package] | [docs][iceworks-docs] |One-stop visual source code development workbench based on materials| | ||
| [icestark] | [![icestark-status]][icestark-package] | [docs][icestark-docs] |Micro Frontends solution for large application| | ||
| [icestore] | [![icestore-status]][icestore-package] | [docs][icestore-docs] |Lightweight state management solution based on React Hooks| | ||
|
||
[icejs]: https://github.com/ice-lab/icejs | ||
[iceworks]: https://github.com/alibaba/ice | ||
[icestark]: https://github.com/ice-lab/icestark | ||
[icestore]: https://github.com/ice-lab/icestore | ||
|
||
[icejs-status]: https://img.shields.io/npm/v/icejs.svg | ||
[iceworks-cli-status]: https://img.shields.io/npm/v/iceworks.svg | ||
[icestark-status]: https://img.shields.io/npm/v/@ice/stark.svg | ||
[icestore-status]: https://img.shields.io/npm/v/@ice/store.svg | ||
|
||
[icejs-package]: https://npmjs.com/package/ice.js | ||
[iceworks-cli-package]: https://npmjs.com/package/iceworks | ||
[icestark-package]: https://npmjs.com/package/@ice/stark | ||
[icestore-package]: https://npmjs.com/package/@ice/store | ||
|
||
[icejs-docs]: https://ice.work/docs/icejs/about | ||
[iceworks-docs]: https://ice.work/docs/iceworks/about | ||
[icestark-docs]: https://ice.work/docs/icestark/guide/about | ||
[icestore-docs]: https://github.com/ice-lab/icestore#icestore | ||
|
||
## 社区 | ||
|
||
| 钉钉群 | GitHub issues | Gitter | | ||
|-------------------------------------|--------------|---------| | ||
| <a href="https://ice.alicdn.com/assets/images/qrcode.png"><img src="https://ice.alicdn.com/assets/images/qrcode.png" width="150" /></a> | [issues] | [gitter]| | ||
|
||
[issues]: https://github.com/alibaba/ice/issues | ||
[gitter]: https://gitter.im/alibaba/ice | ||
|
||
## License | ||
|
||
[MIT](/LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"sourcemap": true, | ||
"plugins": [ | ||
"build-plugin-icestark" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "ice-app", | ||
"version": "0.0.1", | ||
"description": "", | ||
"dependencies": { | ||
"react": "^16.4.1", | ||
"react-dom": "^16.4.1", | ||
"@types/react": "^16.9.13", | ||
"@types/react-dom": "^16.9.4" | ||
}, | ||
"scripts": { | ||
"start": "icejs start", | ||
"build": "icejs build" | ||
}, | ||
"ideMode": { | ||
"name": "ice-react" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.