Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qianlong66
uni-app
提交
dbc1bc9d
U
uni-app
项目概览
qianlong66
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dbc1bc9d
编写于
1月 22, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build(deps): bump preprocess from 3.1.0 to 3.2.0
上级
7ab8af11
变更
4
展开全部
显示空白变更内容
内联
并排
Showing
4 changed file
with
336 addition
and
412 deletion
+336
-412
packages/uni-cli-shared/lib/preprocess/lib/preprocess.js
packages/uni-cli-shared/lib/preprocess/lib/preprocess.js
+235
-307
packages/uni-cli-shared/lib/preprocess/lib/regexrules.js
packages/uni-cli-shared/lib/preprocess/lib/regexrules.js
+97
-101
packages/uni-cli-shared/lib/preprocess/package.json
packages/uni-cli-shared/lib/preprocess/package.json
+1
-1
packages/vite-plugin-uni/src/load/main.ts
packages/vite-plugin-uni/src/load/main.ts
+3
-3
未找到文件。
packages/uni-cli-shared/lib/preprocess/lib/preprocess.js
浏览文件 @
dbc1bc9d
此差异已折叠。
点击以展开。
packages/uni-cli-shared/lib/preprocess/lib/regexrules.js
浏览文件 @
dbc1bc9d
module
.
exports
=
{
simple
:
{
echo
:
'
^#echo[
\t
]+(.*?)[
\t
]*$
'
,
exec
:
'
^#exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*$
'
,
include
:
'
^(.*)#include(?!-)[
\t
]+(.*?)[
\t
]*$
'
,
// allow prefix characters to specify the indent level of included file
'
include-static
'
:
'
^(.*)#include-static[
\t
]+(.*?)[
\t
]*$
'
simple
:
{
echo
:
"
^#echo[
\t
]+(.*?)[
\t
]*$
"
,
exec
:
"
^#exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*$
"
,
include
:
"
^(.*)#include(?!-)[
\t
]+(.*?)[
\t
]*$
"
,
// allow prefix characters to specify the indent level of included file
'
include-static
'
:
"
^(.*)#include-static[
\t
]+(.*?)[
\t
]*$
"
},
html
:
{
echo
:
'
<!--[
\t
]*#echo[
\t
]+(.*?)[
\t
]*(?:-->|!>)
'
,
exec
:
'
<!--[
\t
]*#exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*(?:-->|!>)
'
,
include
:
'
(.*)<!--[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*(?:-->|!>)
'
,
'
include-static
'
:
'
(.*)<!--[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*(?:-->|!>)
'
,
exclude
:
{
start
:
'
[
\t
]*<!--[
\t
]*#exclude(?:[
\t
]+(.*?))?[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*<!--[
\t
]*#endexclude[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
'
html
:
{
echo
:
"
<!--[
\t
]*#echo[
\t
]+(.*?)[
\t
]*(?:-->|!>)
"
,
exec
:
"
<!--[
\t
]*#exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*(?:-->|!>)
"
,
include
:
"
(.*)<!--[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*(?:-->|!>)
"
,
'
include-static
'
:
"
(.*)<!--[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*(?:-->|!>)
"
,
exclude
:
{
start
:
"
[
\t
]*<!--[
\t
]*#exclude(?:[
\t
]+(.*?))?[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*<!--[
\t
]*#endexclude[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
"
},
extend
:
{
start
:
'
[
\t
]*<!--[
\t
]*#extend(?!able)[
\t
]+(.*?)[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*<!--[
\t
]*#endextend[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
'
extend
:
{
start
:
"
[
\t
]*<!--[
\t
]*#extend(?!able)[
\t
]+(.*?)[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*<!--[
\t
]*#endextend[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
"
},
extendable
:
'
<!--[
\t
]*#extendable[
\t
]*(?:-->|!>)
'
,
if
:
{
start
:
'
[
\t
]*<!--[
\t
]*#(ifndef|ifdef|if)[
\t
]+(.*?)[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*<!(?:--)?[
\t
]*#endif[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
'
extendable
:
"
<!--[
\t
]*#extendable[
\t
]*(?:-->|!>)
"
,
if
:
{
start
:
"
[
\t
]*<!--[
\t
]*#(ifndef|ifdef|if)[
\t
]+(.*?)[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*<!(?:--)?[
\t
]*#endif[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
"
},
foreach
:
{
start
:
'
[
\t
]*<!--[
\t
]*#foreach[
\t
]+(.*?)[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*<!(?:--)?[
\t
]*#endfor[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
'
else
:
"
[
\t
]*<!(?:--)?[
\t
]*#else[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
"
,
foreach
:
{
start
:
"
[
\t
]*<!--[
\t
]*#foreach[
\t
]+(.*?)[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*<!(?:--)?[
\t
]*#endfor[
\t
]*(?:-->|!>)(?:[
\t
]*
\n
)?
"
}
},
js
:
{
echo
:
[
'
/
\\
*[
\t
]*#echo[
\t
]+(.*?)[
\t
]*
\\
*(?:
\\
*|/)
'
,
'
//[
\t
]*#echo[
\t
]+(.*?)[
\t
]*$
'
js
:
{
echo
:
[
"
/
\\
*[
\t
]*#echo[
\t
]+(.*?)[
\t
]*
\\
*(?:
\\
*|/)
"
,
"
//[
\t
]*#echo[
\t
]+(.*?)[
\t
]*$
"
],
exec
:
'
(?://|/
\\
*)[
\t
]*#exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*(?:
\\
*(?:
\\
*|/))?
'
,
include
:
[
'
^(.*)/
\\
*[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*
\\
*(?:
\\
*|/)
'
,
'
^(.*)//[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*$
'
exec
:
"
(?://|/
\\
*)[
\t
]*#exec[
\t
]+(
\\
S+?)[
\t
]*
\\
((.*)
\\
)[
\t
]*(?:
\\
*(?:
\\
*|/))?
"
,
include
:
[
"
^(.*)/
\\
*[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*
\\
*(?:
\\
*|/)
"
,
"
^(.*)//[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*$
"
],
'
include-static
'
:
[
'
^(.*)/
\\
*[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*
\\
*(?:
\\
*|/)
'
,
'
^(.*)//[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*$
'
"
^(.*)/
\\
*[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*
\\
*(?:
\\
*|/)
"
,
"
^(.*)//[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*$
"
],
exclude
:
{
start
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#exclude(?:[
\t
]+([^
\n
*]*))?[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#endexclude[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
'
exclude
:
{
start
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#exclude(?:[
\t
]+([^
\n
*]*))?[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#endexclude[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
"
},
extend
:
{
start
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#extend(?!able)[
\t
]+([^
\n
*]*)(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#endextend[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
'
extend
:
{
start
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#extend(?!able)[
\t
]+([^
\n
*]*)(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#endextend[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
"
},
extendable
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#extendable[
\t
]*(?:
\\
*/)?
'
,
if
:
{
start
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#(ifndef|ifdef|if)[
\t
]+([^
\n
*]*)(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#endif[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
'
extendable
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#extendable[
\t
]*(?:
\\
*/)?
"
,
if
:
{
start
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#(ifndef|ifdef|if)[
\t
]+([^
\n
*]*)(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#endif[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
"
},
foreach
:
{
start
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#foreach[
\t
]+([^
\n
*]*)(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
'
,
end
:
'
[
\t
]*(?://|/
\\
*)[
\t
]*#endfor[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
'
else
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#else[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
"
,
foreach
:
{
start
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#foreach[
\t
]+([^
\n
*]*)(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
+)?
"
,
end
:
"
[
\t
]*(?://|/
\\
*)[
\t
]*#endfor[
\t
]*(?:
\\
*(?:
\\
*|/))?(?:[
\t
]*
\n
)?
"
}
},
coffee
:
{
echo
:
'
#+[
\t
]*@echo[
\t
]+(.*?)[
\t
]*$
'
,
exec
:
'
#+[
\t
]*@exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*$
'
,
include
:
'
^(.*?)#+[
\t
]*@include(?!-)[
\t
]+(.*?)[
\t
]*$
'
,
'
include-static
'
:
'
^(.*?)#+[
\t
]*@include-static[
\t
]+(.*?)[
\t
]*$
'
,
exclude
:
{
start
:
'
^[
\t
]*#+[
\t
]*@exclude(?:[
\t
]+(.*?))?[
\t
]*
\n
+
'
,
end
:
'
^[
\t
]*#+[
\t
]*@endexclude[
\t
]*
\n
?
'
coffee
:
{
echo
:
[
"
###+[
\t
]*#echo[
\t
]+(.*?)[
\t
]###
"
,
"
#+[
\t
]*#echo[
\t
]+(.*?)[
\t
]*$
"
],
exec
:
"
#+[
\t
]*#exec[
\t
]+(
\\
S+)[
\t
]*
\\
((.*)
\\
)[
\t
]*$
"
,
include
:
"
^(.*?)#+[
\t
]*#include(?!-)[
\t
]+(.*?)[
\t
]*$
"
,
'
include-static
'
:
"
^(.*?)#+[
\t
]*#include-static[
\t
]+(.*?)[
\t
]*$
"
,
exclude
:
{
start
:
"
^[
\t
]*#+[
\t
]*#exclude(?:[
\t
]+(.*?))?[
\t
]*
\n
+
"
,
end
:
"
^[
\t
]*#+[
\t
]*#endexclude[
\t
]*
\n
?
"
},
extend
:
{
start
:
'
^[
\t
]*#+[
\t
]*@extend(?!able)[
\t
]+(.*?)
\n
+
'
,
end
:
'
^[
\t
]*#+[
\t
]*@endextend[
\t
]*
\n
?
'
extend
:
{
start
:
"
^[
\t
]*#+[
\t
]*#extend(?!able)[
\t
]+(.*?)
\n
+
"
,
end
:
"
^[
\t
]*#+[
\t
]*#endextend[
\t
]*
\n
?
"
},
extendable
:
'
^[
\t
]*#+[
\t
]*@extendable[
\t
]*$
'
,
if
:
{
start
:
'
^[
\t
]*#+[
\t
]*@(ifndef|ifdef|if)[
\t
]+(.*?)[
\t
]*
\n
+
'
,
end
:
'
^[
\t
]*#+[
\t
]*@endif[
\t
]*
\n
?
'
extendable
:
"
^[
\t
]*#+[
\t
]*#extendable[
\t
]*$
"
,
if
:
{
start
:
"
^[
\t
]*#+[
\t
]*#(ifndef|ifdef|if)[
\t
]+(.*?)[
\t
]*
\n
+
"
,
end
:
"
^[
\t
]*#+[
\t
]*#endif[
\t
]*
\n
?
"
},
foreach
:
{
start
:
'
^[
\t
]*#+[
\t
]*@foreach[
\t
]+(.*?)[
\t
]*
\n
+
'
,
end
:
'
^[
\t
]*#+[
\t
]*@endfor[
\t
]*
\n
?
'
else
:
"
^[
\t
]*#+[
\t
]*#else[
\t
]*
\n
?
"
,
foreach
:
{
start
:
"
^[
\t
]*#+[
\t
]*#foreach[
\t
]+(.*?)[
\t
]*
\n
+
"
,
end
:
"
^[
\t
]*#+[
\t
]*#endfor[
\t
]*
\n
?
"
}
}
}
}
;
module
.
exports
.
xml
=
module
.
exports
.
html
module
.
exports
.
xml
=
module
.
exports
.
html
;
module
.
exports
.
javascript
=
module
.
exports
.
js
module
.
exports
.
jsx
=
module
.
exports
.
js
module
.
exports
.
c
=
module
.
exports
.
js
module
.
exports
.
cc
=
module
.
exports
.
js
module
.
exports
.
cpp
=
module
.
exports
.
js
module
.
exports
.
cs
=
module
.
exports
.
js
module
.
exports
.
csharp
=
module
.
exports
.
js
module
.
exports
.
java
=
module
.
exports
.
js
module
.
exports
.
less
=
module
.
exports
.
js
module
.
exports
.
sass
=
module
.
exports
.
js
module
.
exports
.
scss
=
module
.
exports
.
js
module
.
exports
.
css
=
module
.
exports
.
js
module
.
exports
.
php
=
module
.
exports
.
js
module
.
exports
.
ts
=
module
.
exports
.
js
module
.
exports
.
tsx
=
module
.
exports
.
js
module
.
exports
.
peg
=
module
.
exports
.
js
module
.
exports
.
pegjs
=
module
.
exports
.
js
module
.
exports
.
jade
=
module
.
exports
.
js
module
.
exports
.
styl
=
module
.
exports
.
js
module
.
exports
.
go
=
module
.
exports
.
js
module
.
exports
.
javascript
=
module
.
exports
.
js
;
module
.
exports
.
jsx
=
module
.
exports
.
js
;
module
.
exports
.
json
=
module
.
exports
.
js
;
module
.
exports
.
c
=
module
.
exports
.
js
;
module
.
exports
.
cc
=
module
.
exports
.
js
;
module
.
exports
.
cpp
=
module
.
exports
.
js
;
module
.
exports
.
cs
=
module
.
exports
.
js
;
module
.
exports
.
csharp
=
module
.
exports
.
js
;
module
.
exports
.
java
=
module
.
exports
.
js
;
module
.
exports
.
less
=
module
.
exports
.
js
;
module
.
exports
.
sass
=
module
.
exports
.
js
;
module
.
exports
.
scss
=
module
.
exports
.
js
;
module
.
exports
.
css
=
module
.
exports
.
js
;
module
.
exports
.
php
=
module
.
exports
.
js
;
module
.
exports
.
ts
=
module
.
exports
.
js
;
module
.
exports
.
tsx
=
module
.
exports
.
js
;
module
.
exports
.
peg
=
module
.
exports
.
js
;
module
.
exports
.
pegjs
=
module
.
exports
.
js
;
module
.
exports
.
jade
=
module
.
exports
.
js
;
module
.
exports
.
styl
=
module
.
exports
.
js
;
module
.
exports
.
go
=
module
.
exports
.
js
;
module
.
exports
.
bash
=
module
.
exports
.
coffee
module
.
exports
.
shell
=
module
.
exports
.
coffee
module
.
exports
.
sh
=
module
.
exports
.
coffee
module
.
exports
.
bash
=
module
.
exports
.
coffee
;
module
.
exports
.
shell
=
module
.
exports
.
coffee
;
module
.
exports
.
sh
=
module
.
exports
.
coffee
;
packages/uni-cli-shared/lib/preprocess/package.json
浏览文件 @
dbc1bc9d
{
"name"
:
"preprocess"
,
"description"
:
"Preprocess directives in HTML, JavaScript, etc directives based off variable context"
,
"version"
:
"3.
1
.0"
,
"version"
:
"3.
2
.0"
,
"homepage"
:
"https://github.com/jsoverson/preprocess"
,
"author"
:
{
"name"
:
"Jarrod Overson"
,
...
...
packages/vite-plugin-uni/src/load/main.ts
浏览文件 @
dbc1bc9d
...
...
@@ -19,8 +19,8 @@ export const main = {
if
(
!
pagesJsPath
)
{
pagesJsPath
=
slash
(
path
.
resolve
(
options
.
inputDir
,
'
pages.json.js
'
))
}
return
`import '
${
pagesJsPath
}
';
${
fs
.
readFileSync
(
filename
,
'
utf-8
'
).
toString
()}
`
return
`import '
${
pagesJsPath
}
';
${
fs
.
readFileSync
(
filename
,
'
utf-8
'
)
.
toString
()}
`
},
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录