Skip to content

Commit c50c703

Browse files
authored
Update next init to reflect changes in 2.0 (vercel#1543)
1 parent 6ac6b99 commit c50c703

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

bin/next-init

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ const basePackage = `{
6363
"name": "my-app",
6464
"description": "",
6565
"dependencies": {
66-
"next": "latest"
66+
"next": "latest",
67+
"react": "^15.4.2",
68+
"react-dom": "^15.4.2"
6769
},
6870
"scripts": {
6971
"dev": "next",
@@ -73,29 +75,28 @@ const basePackage = `{
7375
}`
7476

7577
const basePage = `
76-
7778
import Head from 'next/head'
7879
7980
export default () => (
8081
<div>
8182
<Head>
8283
<meta name='viewport' content='width=device-width, initial-scale=1'/>
83-
<style>{bodyStyles}</style>
8484
</Head>
8585
8686
<img width='112' src='https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png' alt='next.js' />
87+
88+
<style jsx global>{\`
89+
html, body {
90+
height: 100%
91+
}
92+
93+
body {
94+
display: flex;
95+
align-items: center;
96+
justify-content: center;
97+
margin: 0;
98+
}
99+
\`}</style>
87100
</div>
88101
)
89-
90-
const bodyStyles = \`
91-
html, body {
92-
height: 100%
93-
}
94-
95-
body {
96-
display: flex;
97-
align-items: center;
98-
justify-content: center;
99-
}
100-
\`
101102
`

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy