Commit c698b32a authored by nkzawa's avatar nkzawa

Merge branch 'master' into fix/meta

parents 10105dce 333eb959
# next.js <img width="112" alt="screen shot 2016-10-25 at 2 37 27 pm" src="https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png">
Next.js is a minimalistic framework for server-rendered React applications. Next.js is a minimalistic framework for server-rendered React applications.
...@@ -50,7 +50,7 @@ We use [glamor](https://github.com/threepointone/glamor) to provide a great buil ...@@ -50,7 +50,7 @@ We use [glamor](https://github.com/threepointone/glamor) to provide a great buil
```jsx ```jsx
import React from 'react' import React from 'react'
import style from 'next/css' import css from 'next/css'
export default () => ( export default () => (
<div className={style}> <div className={style}>
...@@ -58,15 +58,13 @@ export default () => ( ...@@ -58,15 +58,13 @@ export default () => (
</div> </div>
) )
const style = style({ const style = css({
main: { background: 'red',
background: 'red', ':hover': {
':hover': { background: 'gray'
background: 'gray' },
} '@media (max-width: 600px)': {
'@media (max-width: 600px)': { background: 'blue'
background: 'blue'
}
} }
}) })
``` ```
......
#!/usr/bin/env node #!/usr/bin/env node
import { exec } from 'child_process'
import { resolve, join } from 'path' import { resolve, join } from 'path'
import parseArgs from 'minimist' import parseArgs from 'minimist'
import { exists } from 'mz/fs' import { exists } from 'mz/fs'
...@@ -17,12 +16,6 @@ const argv = parseArgs(process.argv.slice(2), { ...@@ -17,12 +16,6 @@ const argv = parseArgs(process.argv.slice(2), {
} }
}) })
const open = url => {
const openers = { darwin: 'open', win32: 'start' }
const cmdName = openers[process.platform] || 'xdg-open'
exec(`${cmdName} ${url}`)
}
const dir = resolve(argv._[0] || '.') const dir = resolve(argv._[0] || '.')
clean(dir) clean(dir)
...@@ -39,10 +32,6 @@ clean(dir) ...@@ -39,10 +32,6 @@ clean(dir)
console.warn('> Couldn\'t find a `pages` directory. Please create one under the project root') console.warn('> Couldn\'t find a `pages` directory. Please create one under the project root')
} }
} }
if (!/^(false|0)$/i.test(process.env.NEXT_OPEN_BROWSER)) {
open(`http://localhost:${argv.port}`)
}
}) })
.catch((err) => { .catch((err) => {
console.error(err) console.error(err)
......
{ {
"name": "next", "name": "next",
"version": "0.9.9", "version": "0.9.11",
"description": "Next.js is a minimalistic framework for server-rendered React applications", "description": "Next.js is a minimalistic framework for server-rendered React applications",
"main": "./dist/lib/index.js", "main": "./dist/lib/index.js",
"homepage": "https://github.com/zeit/next.js", "homepage": "https://github.com/zeit/next.js",
......
...@@ -26,7 +26,7 @@ export default class WatchPagesPlugin { ...@@ -26,7 +26,7 @@ export default class WatchPagesPlugin {
const name = getEntryName(f) const name = getEntryName(f)
if (compiler.hasEntry(name)) return if (compiler.hasEntry(name)) return
const entries = ['webpack/hot/only-dev-server', f] const entries = ['webpack/hot/dev-server', f]
compiler.addEntry(entries, name) compiler.addEntry(entries, name)
}) })
......
...@@ -13,7 +13,7 @@ export default async function createCompiler (dir, { hotReload = false } = {}) { ...@@ -13,7 +13,7 @@ export default async function createCompiler (dir, { hotReload = false } = {}) {
const pages = await glob('pages/**/*.js', { cwd: dir }) const pages = await glob('pages/**/*.js', { cwd: dir })
const entry = {} const entry = {}
const defaultEntries = hotReload ? ['webpack/hot/only-dev-server'] : [] const defaultEntries = hotReload ? ['webpack/hot/dev-server'] : []
for (const p of pages) { for (const p of pages) {
entry[join('bundles', p)] = defaultEntries.concat(['./' + p]) entry[join('bundles', p)] = defaultEntries.concat(['./' + p])
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment