This repository has been archived by the owner on May 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update version * feat: RML plugin (#160) * chore: support dependency check (#238) * feat: support dependency check * feat: setup ci * fix: move dependency-check to devDependencies * chore: fix lint * fix: update yarn lock * chore: test ci * chore: add the missing dependencies * fix: use [email protected] * feat: support ErrorBoundary (#233) * fix: debug port for child process (#243) * feat: support service (#230) * feat: support lazy store (#236) * feat: support lazy store * feat: support component model * fix: typo * feat: support store api * chore: lazy example * feat: add babelPluginReplacePath * feat: replace router component path * feat: add getRoutes util * feat: support custom routes path * feat: support replace custom alias * fix: only transform Import node * fix: alias key * fix: only transform pages * fix: set default alias * fix: match pages * fix: calculate relative path Co-authored-by: 许文涛 <[email protected]> * refactor: code optimize * v1.1.6-alpha.1 * fix: remove status field * refactor: remove component model logic * fix: watch pages * fix: remove dependent component name (#246) * refactor: remove dependent component name * chore: fix lint * chore: remove empty line * chore: update store example (#249) * v1.1.6-alpha.2 * chore: code optimize * feat: add rollback command (#252) * chore: update CONTRIBUTING.md
- Loading branch information
Showing
111 changed files
with
5,883 additions
and
4,611 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 |
---|---|---|
|
@@ -21,4 +21,3 @@ coverage/ | |
**/*.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
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
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 @@ | ||
# rml with icejs | ||
|
||
https://github.com/ice-lab/icejs/tree/master/examples |
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,5 @@ | ||
{ | ||
"plugins": [ | ||
"build-plugin-ice-rml" | ||
] | ||
} |
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": "example-basic-rml", | ||
"description": "rml with icejs", | ||
"dependencies": { | ||
"ice.js": "^1.0.0", | ||
"react": "^16.4.1", | ||
"react-dom": "^16.4.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.9.20", | ||
"@types/react-dom": "^16.9.5", | ||
"build-plugin-rml": "^1.1.0" | ||
}, | ||
"scripts": { | ||
"start": "icejs start", | ||
"build": "icejs build" | ||
}, | ||
"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.
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,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>RML Example</title> | ||
</head> | ||
|
||
<body> | ||
<div id="ice-container"></div> | ||
</body> | ||
</html> |
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 @@ | ||
{ | ||
"template": "node", | ||
"container": { | ||
"port": 3333 | ||
} | ||
} |
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 @@ | ||
import { createApp, IAppConfig } from 'ice'; | ||
|
||
const appConfig: IAppConfig = { | ||
}; | ||
|
||
createApp(appConfig); |
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,83 @@ | ||
<script> | ||
import { useState, useCallback } from 'react'; | ||
|
||
export default function (props) { | ||
const [foo, setFoo] = useState(true); | ||
const handleClick = useCallback((evt) => { | ||
setFoo(!foo); | ||
}, [foo]); | ||
|
||
return { | ||
color: 'yellow', | ||
handleClick, | ||
foo, | ||
fn: () => 'hello world', | ||
}; | ||
} | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.container { | ||
.strong { | ||
font-weight: bold; | ||
} | ||
} | ||
|
||
:global { | ||
.container { | ||
background: grey; | ||
} | ||
} | ||
</style> | ||
|
||
<div className=":container container"> | ||
<div> | ||
<span>插值:</span> | ||
<span>{ "插值" }</span> | ||
</div> | ||
<div> | ||
<span>字符串拼接:</span> | ||
<span>{ foo + '!!!' }</span> | ||
<span>{ `${foo}???` }</span> | ||
</div> | ||
<div> | ||
<span>变量:</span> | ||
<span>{color}</span> | ||
</div> | ||
<div> | ||
<span>二元表达式:</span> | ||
<span>{foo && '你好'}</span> | ||
</div> | ||
<div> | ||
<span>三元表达式:</span> | ||
<span>{foo ? '显示' : '不显示'}</span> | ||
</div> | ||
<div> | ||
<span>表达式:</span> | ||
<span>{ fn(1) }</span > | ||
</div> | ||
<div> | ||
<span>样式:</span> | ||
<span className="strong">Class</span>, | ||
<span style={{"color": "yellow"}}>行内</span> | ||
</div> | ||
<div> | ||
<span>属性表达式:</span> | ||
{/* <span style={{color: color}}> | ||
对象 | ||
</span>*/} | ||
<span data-id={ foo ? color : 'undefined' }> | ||
计算 | ||
</span> | ||
{/* <button type="primary" onClick={function() { | ||
alert(1); | ||
}}> | ||
点击 | ||
</button> */} | ||
</div> | ||
<div> | ||
<button type="primary" onClick={handleClick}> | ||
切换 | ||
</button> | ||
</div> | ||
</div> |
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,4 @@ | ||
body { | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
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,12 @@ | ||
<script> | ||
export default function() { | ||
return {}; | ||
} | ||
</script> | ||
<style> | ||
|
||
</style> | ||
|
||
<import default="Simple" from="@/components/Simple/index.rml" /> | ||
|
||
<Simple /> |
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,9 @@ | ||
import Home from '@/pages/Home/index.rml'; | ||
|
||
export default [ | ||
{ | ||
path: '/', | ||
exact: true, | ||
component: Home | ||
}, | ||
]; |
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,33 @@ | ||
{ | ||
"compileOnSave": false, | ||
"buildOnSave": false, | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "build", | ||
"module": "esnext", | ||
"target": "es6", | ||
"jsx": "react", | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"lib": ["es6", "dom"], | ||
"sourceMap": true, | ||
"allowJs": true, | ||
"rootDir": "./", | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": false, | ||
"importHelpers": true, | ||
"strictNullChecks": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"noUnusedLocals": true, | ||
"skipLibCheck": true, | ||
"paths": { | ||
"@/*": ["./src/*"], | ||
"ice": [".ice/index.ts"], | ||
"ice/*": [".ice/pages/*"] | ||
} | ||
}, | ||
"include": ["src/*", ".ice", "src/components/Guide"], | ||
"exclude": ["node_modules", "build", "public"] | ||
} |
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 @@ | ||
# service for icejs | ||
|
||
https://github.com/ice-lab/icejs/tree/master/examples |
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,5 @@ | ||
{ | ||
"plugins": [ | ||
"build-plugin-ice-service" | ||
] | ||
} |
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,41 @@ | ||
module.exports = { | ||
'GET /todo_getAll': { | ||
"errorCode": "0", | ||
"errorMsg": "", | ||
"data": [ | ||
{ | ||
"id": "1", | ||
"title": "安卓", | ||
"dnoe": true | ||
}, | ||
{ | ||
"id": "2", | ||
"title": "iOS", | ||
"dnoe": true | ||
} | ||
], | ||
"success": true | ||
}, | ||
'GET /todo_getOne': { | ||
"errorCode": "0", | ||
"errorMsg": "", | ||
"data": { | ||
"id": "2222222", | ||
"title": "安卓", | ||
"dnoe": true | ||
}, | ||
"requestId": "@guid", | ||
"success": true | ||
}, | ||
'POST /todo_add': { | ||
"errorCode": "0", | ||
"errorMsg": "", | ||
"data": { | ||
"id": "2222222", | ||
"title": "安卓", | ||
"dnoe": true | ||
}, | ||
"requestId": "@guid", | ||
"success": true | ||
}, | ||
}; |
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": "example-basic-service", | ||
"description": "service for icejs", | ||
"dependencies": { | ||
"ice.js": "^1.0.0", | ||
"react": "^16.4.1", | ||
"build-plugin-ice-service": "*", | ||
"react-dom": "^16.4.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.9.20", | ||
"@types/react-dom": "^16.9.5" | ||
}, | ||
"scripts": { | ||
"start": "icejs start", | ||
"build": "icejs build" | ||
}, | ||
"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.
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,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>icejs · service example</title> | ||
</head> | ||
|
||
<body> | ||
<div id="ice-container"></div> | ||
</body> | ||
</html> |
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 @@ | ||
{ | ||
"template": "node", | ||
"container": { | ||
"port": 3333 | ||
} | ||
} |
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,9 @@ | ||
import { createApp, IAppConfig } from 'ice'; | ||
|
||
const appConfig: IAppConfig = { | ||
app: { | ||
rootId: 'ice-container', | ||
} | ||
}; | ||
|
||
createApp(appConfig); |
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,19 @@ | ||
import * as React from 'react'; | ||
import todoService from '@/services/todo'; | ||
|
||
const Fetch = () => { | ||
async function handleRequest() { | ||
const data = await todoService.getAll(); | ||
console.log('getAllResult', data); | ||
} | ||
|
||
return ( | ||
<div> | ||
<button type="button" onClick={handleRequest}> | ||
请求数据 | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Fetch; |
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,4 @@ | ||
body { | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
|
Oops, something went wrong.