-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
34 changed files
with
171 additions
and
209 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 @@ | ||
{ | ||
"extends": "eslint-config-avet" | ||
} |
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,5 +1,5 @@ | ||
{ | ||
"name": "amp", | ||
"name": "avet-example-amp", | ||
"version": "1.0.0", | ||
"description": "amp example for avet", | ||
"scripts": { | ||
|
@@ -8,29 +8,20 @@ | |
"start": "avet-bin start" | ||
}, | ||
"dependencies": { | ||
"avet": "^0.5.0", | ||
"avet": "^1.0.0-9", | ||
"avet-amp": "^0.1.0" | ||
}, | ||
"devDependencies": { | ||
"avet-bin": "^0.7.0", | ||
"avet-bin": "^1.0.0-9", | ||
"babel-eslint": "^8.0.2", | ||
"eslint": "^4.10.0", | ||
"eslint-config-avet": "^0.3.8" | ||
"eslint": "^4.9.0", | ||
"eslint-config-avet": "^0.3.9" | ||
}, | ||
"tnpm": { | ||
"mode": "npm" | ||
}, | ||
"engines": { | ||
"node": ">= 8" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/avetjs/avet" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/avetjs/avet/issues" | ||
}, | ||
"homepage": "http://avetjs.github.io/avet/", | ||
"author": "okoala <[email protected]>", | ||
"license": "MIT" | ||
} |
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 @@ | ||
{ | ||
"extends": "eslint-config-avet" | ||
} |
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,5 +1,5 @@ | ||
{ | ||
"name": "antd", | ||
"name": "avet-example-antd", | ||
"version": "1.0.0", | ||
"description": "antd example for avet", | ||
"scripts": { | ||
|
@@ -8,26 +8,20 @@ | |
"start": "avet-bin start" | ||
}, | ||
"dependencies": { | ||
"avet": "^0.4.1", | ||
"avet-antd": "^0.1.0" | ||
"avet": "^1.0.0-9", | ||
"avet-antd": "^0.1.1" | ||
}, | ||
"devDependencies": { | ||
"avet-bin": "^0.4.1" | ||
"avet-bin": "^1.0.0-9", | ||
"babel-eslint": "^8.0.2", | ||
"eslint": "^4.9.0", | ||
"eslint-config-avet": "^0.3.9" | ||
}, | ||
"tnpm": { | ||
"mode": "npm" | ||
}, | ||
"engines": { | ||
"node": ">= 8" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/avetjs/avet" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/avetjs/avet/issues" | ||
}, | ||
"homepage": "http://avetjs.github.io/avet/", | ||
"author": "okoala <[email protected]>", | ||
"license": "MIT" | ||
} |
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 @@ | ||
{ | ||
"extends": "eslint-config-avet" | ||
} |
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,5 +1,5 @@ | ||
{ | ||
"name": "dva", | ||
"name": "avet-example-dva", | ||
"version": "1.0.0", | ||
"description": "dva example for avet", | ||
"scripts": { | ||
|
@@ -8,26 +8,20 @@ | |
"start": "avet-bin start" | ||
}, | ||
"dependencies": { | ||
"avet": "^0.4.3", | ||
"avet": "^1.0.0-9", | ||
"avet-dva": "^0.2.1" | ||
}, | ||
"devDependencies": { | ||
"avet-bin": "^0.5.1" | ||
"avet-bin": "^1.0.0-9", | ||
"babel-eslint": "^8.0.2", | ||
"eslint": "^4.9.0", | ||
"eslint-config-avet": "^0.3.9" | ||
}, | ||
"tnpm": { | ||
"mode": "npm" | ||
}, | ||
"engines": { | ||
"node": ">= 8" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/avetjs/avet" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/avetjs/avet/issues" | ||
}, | ||
"homepage": "http://avetjs.github.io/avet/", | ||
"author": "okoala <[email protected]>", | ||
"license": "MIT" | ||
} |
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 @@ | ||
{ | ||
"extends": "eslint-config-avet", | ||
"globals": { | ||
"API_HOST": 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
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,5 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = app => { | ||
app.get('/api/getHello', 'hello.index'); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 +1,6 @@ | ||
'use strict'; | ||
|
||
exports.security = { | ||
domainWhiteList: ['http://localhost:3000'] | ||
}; | ||
domainWhiteList: [ 'http://localhost:3000' ], | ||
csrf: { | ||
enable: false, | ||
}, | ||
}; |
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,9 +1,7 @@ | ||
'use strict'; | ||
|
||
// had enabled by egg | ||
// exports.static = true; | ||
|
||
exports.avet = { | ||
enable: true, | ||
package: 'egg-avet' | ||
} | ||
package: 'egg-avet', | ||
}; |
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,5 +1,5 @@ | ||
{ | ||
"name": "avet-egg", | ||
"name": "avet-example-egg", | ||
"version": "1.0.0", | ||
"description": "this is a avet and egg example", | ||
"private": true, | ||
|
@@ -8,36 +8,28 @@ | |
"stop": "egg-scripts stop", | ||
"dev": "npm run dev:egg & npm run dev:avet", | ||
"dev:egg": "egg-bin dev", | ||
"dev:avet": "avet-bin dev --rootDir ./avet", | ||
"build": "avet-bin build" | ||
"dev:avet": "avet-bin dev --rootDir ./web", | ||
"build": "avet-bin build --rootDir ./web" | ||
}, | ||
"dependencies": { | ||
"avet": "^0.4.3", | ||
"avet": "^1.0.0-9", | ||
"avet-define": "^0.1.2", | ||
"avet-fetch": "^0.1.0", | ||
"avet-fetch": "^0.2.2", | ||
"avet-preact": "^0.2.3", | ||
"egg": "^1.10.0", | ||
"egg-avet": "^1.1.0", | ||
"egg-scripts": "^2.1.0" | ||
"avet-proxy": "^1.0.0", | ||
"egg": "^2.0.0", | ||
"egg-avet": "^1.1.1", | ||
"egg-scripts": "^2.4.0" | ||
}, | ||
"devDependencies": { | ||
"egg-bin": "^4.3.5", | ||
"avet-bin": "^0.5.1" | ||
"egg-bin": "^4.3.6", | ||
"avet-bin": "^1.0.0-9" | ||
}, | ||
"tnpm": { | ||
"mode": "npm" | ||
}, | ||
"engines": { | ||
"node": ">= 8" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/avetjs/avet" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/avetjs/avet/issues" | ||
}, | ||
"homepage": "http://avetjs.github.io/avet/", | ||
"author": "okoala <[email protected]>", | ||
"license": "MIT" | ||
} |
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 React from 'react'; | ||
|
||
const Header = () => ( | ||
<div> | ||
<p>this is a component.</p> | ||
</div> | ||
); | ||
|
||
export default Header; |
File renamed without changes.
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 @@ | ||
const path = require('path'); | ||
|
||
exports.build = { | ||
webpackDevMiddleware: { | ||
noInfo: true, | ||
quiet: true, | ||
}, | ||
}; | ||
|
||
exports.avet = { | ||
dir: path.join(process.cwd(), 'web'), | ||
}; | ||
|
||
exports.define = { | ||
API_HOST: 'http://127.0.0.1:7001', | ||
}; | ||
|
||
exports.proxy = { | ||
host: 'http://127.0.0.1:7001', | ||
match: /^\/api\//, | ||
}; |
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 @@ | ||
exports.preact = { | ||
enable: true, | ||
package: 'avet-preact', | ||
}; | ||
|
||
exports.fetch = { | ||
enable: true, | ||
package: 'avet-fetch', | ||
}; | ||
|
||
exports.define = { | ||
enable: true, | ||
package: 'avet-define', | ||
}; | ||
|
||
exports.proxy = { | ||
enable: true, | ||
package: 'avet-proxy', | ||
}; |
11 changes: 6 additions & 5 deletions
11
examples/egg/avet/page/index.js → examples/egg/web/page/index.js
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 @@ | ||
import React from 'react'; | ||
import Header from '../component/header'; | ||
|
||
class IndexPage extends React.Component { | ||
static async getInitialProps() { | ||
const res = await fetch(`${API_HOST}/api/getHello`); | ||
const hello = await res.text() | ||
return { hello } | ||
const hello = await res.text(); | ||
return { hello }; | ||
} | ||
|
||
render() { | ||
return ( | ||
<div className="index-container"> | ||
<Header></Header> | ||
<Header /> | ||
<h1>hello00</h1> | ||
<p>{this.props.hello}</p> | ||
</div> | ||
) | ||
); | ||
} | ||
} | ||
|
||
export default IndexPage; | ||
export default IndexPage; |
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 @@ | ||
{ | ||
"extends": "eslint-config-avet" | ||
} |
Oops, something went wrong.