Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CoCo_Code_Op2
next.js
提交
8b784766
N
next.js
项目概览
CoCo_Code_Op2
/
next.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
next.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8b784766
编写于
2月 20, 2019
作者:
J
Joe Haddad
提交者:
Tim Neutkens
2月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove alternate screen usage (#6377)
* Make console output well behaved * Fix bad rebase
上级
09508ed4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
43 deletion
+23
-43
packages/next/build/output/clearConsole.ts
packages/next/build/output/clearConsole.ts
+0
-13
packages/next/build/output/store.ts
packages/next/build/output/store.ts
+6
-15
packages/next/package.json
packages/next/package.json
+2
-2
yarn.lock
yarn.lock
+15
-13
未找到文件。
packages/next/build/output/clearConsole.ts
已删除
100644 → 0
浏览文件 @
09508ed4
// This file is derived from Jest:
// https://github.com/facebook/jest/blob/d9d501ac342212b8a58ddb23a31518beb7b56f47/packages/jest-util/src/specialChars.ts#L18
const
isWindows
=
process
.
platform
===
'
win32
'
const
isInteractive
=
process
.
stderr
.
isTTY
export
function
clearConsole
()
{
if
(
!
isInteractive
)
{
return
}
process
.
stderr
.
write
(
isWindows
?
'
\
x1B[2J
\
x1B[0f
'
:
'
\
x1B[2J
\
x1B[3J
\
x1B[H
'
)
}
packages/next/build/output/store.ts
浏览文件 @
8b784766
import
chalk
from
'
chalk
'
import
createStore
from
'
unistore
'
import
onExit
from
'
signal-exit
'
import
{
clearConsole
}
from
'
./clearConsole
'
import
readline
from
'
readline
'
import
cliCursor
from
'
cli-cursor
'
export
type
OutputState
=
|
{
bootstrap
:
true
;
appUrl
:
string
|
null
}
...
...
@@ -16,19 +15,11 @@ export type OutputState =
export
const
store
=
createStore
<
OutputState
>
({
appUrl
:
null
,
bootstrap
:
true
})
let
registered
=
false
cliCursor
.
hide
()
process
.
stdout
.
write
(
'
\n
'
.
repeat
(
process
.
stdout
.
rows
||
1
))
store
.
subscribe
(
state
=>
{
if
(
!
registered
)
{
registered
=
true
process
.
stderr
.
write
(
'
\
u001B[?1049h
'
)
onExit
(
function
()
{
process
.
stderr
.
write
(
'
\
u001B[?1049l
'
)
})
}
clearConsole
()
readline
.
cursorTo
(
process
.
stdout
,
0
,
0
)
readline
.
clearScreenDown
(
process
.
stdout
)
if
(
state
.
bootstrap
)
{
console
.
log
(
chalk
.
cyan
(
'
Starting the development server ...
'
))
...
...
packages/next/package.json
浏览文件 @
8b784766
...
...
@@ -60,6 +60,7 @@
"cacache"
:
"^11.0.2"
,
"case-sensitive-paths-webpack-plugin"
:
"2.1.2"
,
"chalk"
:
"2.4.2"
,
"cli-cursor"
:
"2.1.0"
,
"cross-spawn"
:
"5.1.0"
,
"del"
:
"3.0.0"
,
"event-source-polyfill"
:
"0.0.12"
,
...
...
@@ -82,7 +83,6 @@
"resolve"
:
"1.5.0"
,
"schema-utils"
:
"1.0.0"
,
"serialize-javascript"
:
"1.4.0"
,
"signal-exit"
:
"3.0.2"
,
"source-map"
:
"0.6.1"
,
"strip-ansi"
:
"3.0.1"
,
"styled-jsx"
:
"3.2.1"
,
...
...
@@ -112,6 +112,7 @@
"@types/babel__template"
:
"7.0.1"
,
"@types/babel__traverse"
:
"7.0.3"
,
"@types/case-sensitive-paths-webpack-plugin"
:
"2.1.2"
,
"@types/cli-cursor"
:
"2.1.0"
,
"@types/cross-spawn"
:
"6.0.0"
,
"@types/etag"
:
"1.8.0"
,
"@types/fresh"
:
"0.5.0"
,
...
...
@@ -122,7 +123,6 @@
"@types/node-fetch"
:
"2.1.4"
,
"@types/resolve"
:
"0.0.8"
,
"@types/rimraf"
:
"2.0.2"
,
"@types/signal-exit"
:
"3.0.0"
,
"taskr"
:
"1.1.0"
,
"typescript"
:
"3.1.6"
},
...
...
yarn.lock
浏览文件 @
8b784766
...
...
@@ -1526,6 +1526,13 @@
dependencies:
"@types/webpack" "*"
"@types/cli-cursor@2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/cli-cursor/-/cli-cursor-2.1.0.tgz#bf293a75efb7bd8a3dd020413ec41cd317e5f128"
integrity sha512-tICz3BCZI/XDB0+qbtHEyFp7JNaL9AP+HCzrH7sRdf6mO9KMnntKlPv8Dhk01nMtCod+4Xh/pjEoJWAr0A0VmQ==
dependencies:
"@types/node" "*"
"@types/cross-spawn@6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.0.tgz#320aaf1d1a12979f1b84fe7a5590a7e860bf3a80"
...
...
@@ -1658,11 +1665,6 @@
"@types/mime" "*"
"@types/node" "*"
"@types/signal-exit@3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/signal-exit/-/signal-exit-3.0.0.tgz#75e3b17660cf1f6c6cb8557675b4e680e43bbf36"
integrity sha512-MaJ+16SOXz0Z27EMf3d88+B6UDglq1sn140a+5X/ROLkIcEfRq0CPg+1B2efF1GXQn4n+aKH4ti2hHG4Ya+Dzg==
"@types/tapable@*":
version "1.0.4"
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
...
...
@@ -3243,6 +3245,13 @@ clean-stack@^1.0.0:
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31"
integrity sha1-noIVAa6XmYbEax1m0tQy2y/UrjE=
cli-cursor@2.1.0, cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=
dependencies:
restore-cursor "^2.0.0"
cli-cursor@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
...
...
@@ -3250,13 +3259,6 @@ cli-cursor@^1.0.2:
dependencies:
restore-cursor "^1.0.1"
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=
dependencies:
restore-cursor "^2.0.0"
cli-spinners@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
...
...
@@ -10879,7 +10881,7 @@ shellwords@^0.1.0, shellwords@^0.1.1:
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==
signal-exit@
3.0.2, signal-exit@
^3.0.0, signal-exit@^3.0.2:
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录