Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
deno
提交
04712433
D
deno
项目概览
张重言
/
deno
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
deno
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
04712433
编写于
2月 03, 2020
作者:
R
Ryan Dahl
提交者:
GitHub
2月 03, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
upgrade: dprint 0.3.0-alpha.6
上级
f4cc08c4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
13 deletion
+26
-13
Cargo.lock
Cargo.lock
+9
-6
cli/Cargo.toml
cli/Cargo.toml
+1
-1
cli/fmt.rs
cli/fmt.rs
+16
-6
未找到文件。
Cargo.lock
浏览文件 @
04712433
...
...
@@ -348,7 +348,7 @@ dependencies = [
"deno_typescript 0.32.0",
"dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"dlopen 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"dprint-plugin-typescript 0.3.0-alpha.
4
(registry+https://github.com/rust-lang/crates.io-index)",
"dprint-plugin-typescript 0.3.0-alpha.
6
(registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fwdansi 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -454,15 +454,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "dprint-core"
version = "0.7.0-alpha.
1
"
version = "0.7.0-alpha.
4
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dprint-plugin-typescript"
version = "0.3.0-alpha.
4
"
version = "0.3.0-alpha.
6
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dprint-core 0.7.0-alpha.
1
(registry+https://github.com/rust-lang/crates.io-index)",
"dprint-core 0.7.0-alpha.
4
(registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
"swc_common 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"swc_ecma_ast 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -2348,8 +2351,8 @@ dependencies = [
"checksum dlopen 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "71e80ad39f814a9abe68583cd50a2d45c8a67561c3361ab8da240587dda80937"
"checksum dlopen_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f236d9e1b1fbd81cea0f9cbdc8dcc7e8ebcd80e6659cd7cb2ad5f6c05946c581"
"checksum downcast-rs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6"
"checksum dprint-core 0.7.0-alpha.
1 (registry+https://github.com/rust-lang/crates.io-index)" = "7f460fbecb15f29013e41c557496f54620a44ac2e0c3554a29c3c7e28e931b70
"
"checksum dprint-plugin-typescript 0.3.0-alpha.
4 (registry+https://github.com/rust-lang/crates.io-index)" = "6f1ff9b8a5d9c2a181559464a7425ef49f7092d62589d422597a33c14ee7d57e
"
"checksum dprint-core 0.7.0-alpha.
4 (registry+https://github.com/rust-lang/crates.io-index)" = "c5140b812c0a8885cea8044b1e954209de1aa1cf041ea061469a941a54495a67
"
"checksum dprint-plugin-typescript 0.3.0-alpha.
6 (registry+https://github.com/rust-lang/crates.io-index)" = "1d29851ccf578c2b03f4be4da3cdaaa47cdb9a00b99f9f38a443b6669262c399
"
"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3"
"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28"
...
...
cli/Cargo.toml
浏览文件 @
04712433
...
...
@@ -35,7 +35,7 @@ brotli2 = "0.3.2"
clap
=
"2.33.0"
dirs
=
"2.0.2"
dlopen
=
"0.1.8"
dprint-plugin-typescript
=
"
0.3.0-alpha.4
"
dprint-plugin-typescript
=
"
=0.3.0-alpha.6
"
futures
=
{
version
=
"0.3.1"
,
features
=
[
"compat"
,
"io-compat"
]
}
glob
=
"0.3.0"
http
=
"0.2.0"
...
...
cli/fmt.rs
浏览文件 @
04712433
...
...
@@ -27,12 +27,16 @@ fn is_supported(path: &Path) -> bool {
&&
(
TYPESCRIPT
.is_match
(
&
path_str
)
||
JAVASCRIPT
.is_match
(
&
path_str
))
}
fn
get_config
()
->
dprint
::
Configuration
{
dprint
::
ConfigurationBuilder
::
new
()
fn
get_config
()
->
dprint
::
configuration
::
Configuration
{
dprint
::
configuration
::
ConfigurationBuilder
::
new
()
.line_width
(
80
)
.indent_width
(
2
)
.next_control_flow_position
(
dprint
::
NextControlFlowPosition
::
SameLine
)
.binary_expression_operator_position
(
dprint
::
OperatorPosition
::
SameLine
)
.next_control_flow_position
(
dprint
::
configuration
::
NextControlFlowPosition
::
SameLine
,
)
.binary_expression_operator_position
(
dprint
::
configuration
::
OperatorPosition
::
SameLine
,
)
.build
()
}
...
...
@@ -48,7 +52,10 @@ fn get_supported_files(paths: Vec<PathBuf>) -> Vec<PathBuf> {
files_to_check
}
fn
check_source_files
(
config
:
dprint
::
Configuration
,
paths
:
Vec
<
PathBuf
>
)
{
fn
check_source_files
(
config
:
dprint
::
configuration
::
Configuration
,
paths
:
Vec
<
PathBuf
>
,
)
{
let
start
=
Instant
::
now
();
let
mut
not_formatted_files
=
vec!
[];
...
...
@@ -91,7 +98,10 @@ fn check_source_files(config: dprint::Configuration, paths: Vec<PathBuf>) {
}
}
fn
format_source_files
(
config
:
dprint
::
Configuration
,
paths
:
Vec
<
PathBuf
>
)
{
fn
format_source_files
(
config
:
dprint
::
configuration
::
Configuration
,
paths
:
Vec
<
PathBuf
>
,
)
{
let
start
=
Instant
::
now
();
let
mut
not_formatted_files
=
vec!
[];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录