Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
a0d94ce0
Commit
a0d94ce0
authored
Oct 25, 2016
by
nkzawa
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/zeit/next.js
parents
a9c0ae34
4e104271
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
22 deletions
+9
-22
Readme.md
Readme.md
+9
-11
next-dev
bin/next-dev
+0
-11
No files found.
Readme.md
View file @
a0d94ce0
# 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'
}
}
}
})
})
```
```
...
...
bin/next-dev
View file @
a0d94ce0
#!/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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment