Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Commit

Permalink
Release v1.1.6 (#240)
Browse files Browse the repository at this point in the history
* 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
chenbin92 authored Apr 20, 2020
2 parents 605ba87 + 32a54f7 commit c29a088
Show file tree
Hide file tree
Showing 111 changed files with 5,883 additions and 4,611 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ coverage/
**/*.min.js

workspace/
scripts/
13 changes: 13 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ $ npm run publish
* When you need to release a latest version, the tag will be created automatically, running `npm publish` will tag your package with the `latest` dist-tag.
* To publish a package with the `beta` dist-tag, you can choose to release rc、beta、alpha versions, the tag will not be created.

## Rollback Packages

When a serious bug occurs in the production environment, you can backtrack the package version:

```bash
# rollback packages
$ npm run rollback <version>

# sync packages
$ npm run sync
```


## Pull Request Guidelines

- Only code that's ready for release should be committed to the master branch. All development should be done in dedicated branches.
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push]

jobs:
lint:
build:

runs-on: ubuntu-latest

Expand All @@ -17,7 +17,8 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run setup
- run: npm run lint
- run: npm run dependency:check
env:
CI: true
3 changes: 3 additions & 0 deletions examples/basic-rml/README.md
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
5 changes: 5 additions & 0 deletions examples/basic-rml/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"build-plugin-ice-rml"
]
}
21 changes: 21 additions & 0 deletions examples/basic-rml/package.json
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"
}
}
Binary file added examples/basic-rml/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions examples/basic-rml/public/index.html
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>
6 changes: 6 additions & 0 deletions examples/basic-rml/sandbox.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"template": "node",
"container": {
"port": 3333
}
}
6 changes: 6 additions & 0 deletions examples/basic-rml/src/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { createApp, IAppConfig } from 'ice';

const appConfig: IAppConfig = {
};

createApp(appConfig);
83 changes: 83 additions & 0 deletions examples/basic-rml/src/components/Simple/index.rml
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>
4 changes: 4 additions & 0 deletions examples/basic-rml/src/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
-webkit-font-smoothing: antialiased;
}

12 changes: 12 additions & 0 deletions examples/basic-rml/src/pages/Home/index.rml
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 />
9 changes: 9 additions & 0 deletions examples/basic-rml/src/routes.ts
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
},
];
33 changes: 33 additions & 0 deletions examples/basic-rml/tsconfig.json
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"]
}
3 changes: 3 additions & 0 deletions examples/basic-service/README.md
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
5 changes: 5 additions & 0 deletions examples/basic-service/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"build-plugin-ice-service"
]
}
41 changes: 41 additions & 0 deletions examples/basic-service/mock/index.js
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
},
};
21 changes: 21 additions & 0 deletions examples/basic-service/package.json
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"
}
}
Binary file added examples/basic-service/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions examples/basic-service/public/index.html
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>
6 changes: 6 additions & 0 deletions examples/basic-service/sandbox.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"template": "node",
"container": {
"port": 3333
}
}
9 changes: 9 additions & 0 deletions examples/basic-service/src/app.ts
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);
19 changes: 19 additions & 0 deletions examples/basic-service/src/components/Fetch/index.tsx
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;
4 changes: 4 additions & 0 deletions examples/basic-service/src/global.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
body {
-webkit-font-smoothing: antialiased;
}

Loading

0 comments on commit c29a088

Please sign in to comment.