mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Update next init to reflect changes in 2.0 (#1543)
This commit is contained in:
parent
6ac6b992b0
commit
c50c703d11
|
@ -63,7 +63,9 @@ const basePackage = `{
|
||||||
"name": "my-app",
|
"name": "my-app",
|
||||||
"description": "",
|
"description": "",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "latest"
|
"next": "latest",
|
||||||
|
"react": "^15.4.2",
|
||||||
|
"react-dom": "^15.4.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next",
|
"dev": "next",
|
||||||
|
@ -73,21 +75,17 @@ const basePackage = `{
|
||||||
}`
|
}`
|
||||||
|
|
||||||
const basePage = `
|
const basePage = `
|
||||||
|
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
|
|
||||||
export default () => (
|
export default () => (
|
||||||
<div>
|
<div>
|
||||||
<Head>
|
<Head>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1'/>
|
<meta name='viewport' content='width=device-width, initial-scale=1'/>
|
||||||
<style>{bodyStyles}</style>
|
|
||||||
</Head>
|
</Head>
|
||||||
|
|
||||||
<img width='112' src='https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png' alt='next.js' />
|
<img width='112' src='https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png' alt='next.js' />
|
||||||
</div>
|
|
||||||
)
|
|
||||||
|
|
||||||
const bodyStyles = \`
|
<style jsx global>{\`
|
||||||
html, body {
|
html, body {
|
||||||
height: 100%
|
height: 100%
|
||||||
}
|
}
|
||||||
|
@ -96,6 +94,9 @@ const bodyStyles = \`
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
\`
|
\`}</style>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in a new issue