This repository has been archived by the owner on Mar 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
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
1 parent
73bff30
commit 576f547
Showing
10 changed files
with
4,695 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/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 @@ | ||
{ | ||
"routes": "./routes" | ||
} |
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,8 @@ | ||
import { Link } from 'vitaminjs/react-router'; | ||
|
||
export default () => ( | ||
<div> | ||
<Link to="/module1">module 1</Link> | ||
<Link to="/module2">module 2</Link> | ||
</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 @@ | ||
export default () => <div>module 1</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 @@ | ||
export default () => <div>module 2</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,19 @@ | ||
{ | ||
"name": "vitamin-entries-and-chunks-example", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"build": "vitamin build", | ||
"start": "vitamin start", | ||
"serve": "vitamin serve" | ||
}, | ||
"author": "Christophe Hurpeau <christophe@evaneos.com>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/evaneos/vitamin.git" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"react": "^15.1.0", | ||
"vitaminjs": "file:../.." | ||
} | ||
} |
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,11 @@ | ||
import { Route } from 'vitaminjs/react-router'; | ||
|
||
const getComponent = getModule => (nextState, cb) => getModule().then(module => cb(null, module.default)); | ||
|
||
export default ( | ||
<Route> | ||
<Route path="/" getComponent={getComponent(() => import('./modules/home'))} /> | ||
<Route path="/module1" getComponent={getComponent(() => import('./modules/module1'))} /> | ||
<Route path="/module2" getComponent={getComponent(() => import('./modules/module2'))} /> | ||
</Route> | ||
); |
Oops, something went wrong.