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.
Merge pull request #157 from ice-lab/release-next
* chore: release version * fix: semicolons is required (#162) * chore: fallback example (#169) * fix: onHook position (#173) * chore: version * v1.1.3-alpha.0 * fix: pass location params to StaticRouter (#176) * fix: pass location params * fix: context params * chore: code optimization * fix: pass staticRouter context * Feat/enhance request (#161) * feat: enhance request * refactor: load module time (#174) * refactor: load module Co-authored-by: ClarkXia <[email protected]> * feat: downgraded to csr when ssr error (#179) * fix: define process.env.APP_MODE in ssr (#181) * fix: define process.env.APP_MODE in ssr * fix: modify define plugin Co-authored-by: 大果 <[email protected]> * fix: publish script (#180) * v1.1.3-alpha.1 * fix: ssr to csr (#182) * fix: use window variable * chore: typo * fix: remove define variables * refactor: server render * v1.1.3-alpha.2 * chore: fix lint (#183) * chore: update example * fix: params * chore: revert beforeload (#185) * Revert "Feat/enhance request (#161)" This reverts commit 0ceed05. * v1.1.3-alpha.3 * feat: support runtime app_mode (#189) * feat: support runtime app_mode * feat: support process.env.SERVER_PORT * fix: lock core-js version (#184) * fix: lint error (#190) * feat: add static module (#188) * fix: set polyfill * fix: before load module * fix: load module in createApp * chore: rename variable * feat: support uglify * refactor: code optim * fix: window is not defined (#193) * v1.1.3-alpha.4 * v1.1.3
- Loading branch information
Showing
119 changed files
with
775 additions
and
649 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
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,10 +1,10 @@ | ||
import { createApp, IAppConfig } from 'ice' | ||
import Dashboard from './index' | ||
import { createApp, IAppConfig } from 'ice'; | ||
import Dashboard from './index'; | ||
|
||
const appConfig: IAppConfig = { | ||
router: { | ||
routes: [{ path: '/', component: Dashboard }], | ||
}, | ||
} | ||
}; | ||
|
||
createApp(appConfig) | ||
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { createApp, IAppConfig } from 'ice' | ||
import Home from './index' | ||
import { createApp, IAppConfig } from 'ice'; | ||
import Home from './index'; | ||
|
||
const appConfig: IAppConfig = { | ||
router: { | ||
routes: [{ path: '/', component: Home }], | ||
}, | ||
} | ||
}; | ||
|
||
createApp(appConfig) | ||
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import React from 'react' | ||
import React from 'react'; | ||
|
||
const Home = () => { | ||
return ( | ||
<> | ||
<h2>Home Page</h2> | ||
</> | ||
); | ||
} | ||
}; | ||
|
||
Home.pageConfig = { | ||
title: 'Home Page', | ||
}; | ||
|
||
export default Home | ||
export default 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
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,10 +1,10 @@ | ||
import Home from '@/pages/Home' | ||
import Home from '@/pages/Home'; | ||
|
||
const routerConfig = [ | ||
{ | ||
path: '/', | ||
component: Home | ||
} | ||
] | ||
]; | ||
|
||
export default routerConfig | ||
export default routerConfig; |
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
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import React from 'react' | ||
import { Link } from 'ice' | ||
import React from 'react'; | ||
import { Link } from 'ice'; | ||
|
||
const Dashboard = () => { | ||
return ( | ||
<> | ||
<h2>Dashboard Page...</h2> | ||
<Link to="/about">About</Link> | ||
</> | ||
) | ||
} | ||
); | ||
}; | ||
|
||
export default Dashboard | ||
export default Dashboard; |
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 |
---|---|---|
@@ -1,11 +1,22 @@ | ||
module.exports = { | ||
'GET /api/user': { | ||
status: 'SUCCESS', | ||
data: { | ||
user: { | ||
name: 'Jack Ma', | ||
id: 10001, | ||
} | ||
}, | ||
}, | ||
'GET /api/profile': { | ||
status: 'SUCCESS', | ||
data: { | ||
name: '淘小宝', | ||
department: '技术部', | ||
avatar: 'https://img.alicdn.com/tfs/TB1L6tBXQyWBuNjy0FpXXassXXa-80-80.png', | ||
userid: 10001, | ||
profile: { | ||
id: 10001, | ||
name: 'Jack Ma', | ||
edu: 'Hangzhou Normal University', | ||
address: 'Hangzhou' | ||
} | ||
}, | ||
}, | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,19 +1,23 @@ | ||
import { createApp, IAppConfig } from 'ice' | ||
import { createApp, IAppConfig, config, request } from 'ice'; | ||
|
||
const appConfig: IAppConfig = { | ||
app: { | ||
getInitialData: async () => { | ||
return { user: { name: 'Jack Ma', id: '01' } } | ||
const res = await request('/user'); | ||
return res; | ||
} | ||
}, | ||
router: { | ||
type: 'browser' | ||
}, | ||
request: { | ||
baseURL: config.baseURL | ||
}, | ||
store: { | ||
getInitialStates: (initialData) => { | ||
return initialData | ||
return initialData.data; | ||
} | ||
} | ||
}; | ||
|
||
createApp(appConfig) | ||
createApp(appConfig); |
Oops, something went wrong.