Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
VisualDL
提交
6bc70fd5
V
VisualDL
项目概览
PaddlePaddle
/
VisualDL
大约 1 年 前同步成功
通知
88
Star
4655
Fork
642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
V
VisualDL
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6bc70fd5
编写于
6月 21, 2021
作者:
P
Peter Pan
提交者:
GitHub
6月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build: remove mock data from distribution (#988)
上级
a458c01a
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
19 addition
and
11 deletion
+19
-11
frontend/packages/core/builder/env.js
frontend/packages/core/builder/env.js
+1
-1
frontend/packages/core/snowpack.config.js
frontend/packages/core/snowpack.config.js
+0
-9
frontend/packages/core/src/index.tsx
frontend/packages/core/src/index.tsx
+1
-1
frontend/packages/mock/middleware.js
frontend/packages/mock/middleware.js
+2
-0
frontend/packages/mock/package.json
frontend/packages/mock/package.json
+1
-0
frontend/packages/server/index.ts
frontend/packages/server/index.ts
+1
-0
frontend/yarn.lock
frontend/yarn.lock
+13
-0
未找到文件。
frontend/packages/core/builder/env.js
浏览文件 @
6bc70fd5
...
...
@@ -54,4 +54,4 @@ export const SNOWPACK_PUBLIC_DEFAULT_LANGUAGE = process.env.DEFAULT_LANGUAGE ||
// theme
export
const
SNOWPACK_PUBLIC_THEME
=
process
.
env
.
THEME
||
''
;
// demo
export
const
DEMO
=
''
;
export
const
SERVER
=
''
;
frontend/packages/core/snowpack.config.js
浏览文件 @
6bc70fd5
...
...
@@ -38,7 +38,6 @@ function isWorkspace() {
const
iconsPath
=
path
.
dirname
(
resolve
.
sync
(
cwd
,
'
@visualdl/icons
'
));
const
netronPath
=
path
.
dirname
(
resolve
.
sync
(
cwd
,
'
@visualdl/netron
'
));
const
wasmPath
=
path
.
dirname
(
resolve
.
sync
(
cwd
,
'
@visualdl/wasm
'
));
const
mockPath
=
path
.
dirname
(
resolve
.
sync
(
cwd
,
'
@visualdl/mock
'
));
const
dest
=
path
.
resolve
(
cwd
,
'
./dist/__snowpack__/link/packages
'
);
/** @type {import("snowpack").SnowpackUserConfig } */
...
...
@@ -101,14 +100,6 @@ export default {
{
source
:
[
path
.
join
(
wasmPath
,
'
*.{js,wasm}
'
)],
destination
:
path
.
join
(
dest
,
'
wasm/dist
'
)
},
{
source
:
[
'
./{data,assets}/**/*
'
],
destination
:
path
.
join
(
dest
,
'
mock
'
),
options
:
{
cwd
:
mockPath
,
parents
:
true
}
}
]
}
...
...
frontend/packages/core/src/index.tsx
浏览文件 @
6bc70fd5
...
...
@@ -56,7 +56,7 @@ function render() {
}
}
if
(
import
.
meta
.
env
.
MODE
===
'
development
'
&&
!
import
.
meta
.
env
.
DEMO
)
{
if
(
import
.
meta
.
env
.
MODE
===
'
development
'
&&
!
import
.
meta
.
env
.
SERVER
)
{
import
(
'
@visualdl/mock
'
).
then
(
async
({
initMock
})
=>
{
await
initMock
();
render
();
...
...
frontend/packages/mock/middleware.js
浏览文件 @
6bc70fd5
...
...
@@ -14,6 +14,8 @@
* limitations under the License.
*/
import
'
isomorphic-fetch
'
;
import
{
fileURLToPath
}
from
'
url
'
;
import
path
from
'
path
'
;
...
...
frontend/packages/mock/package.json
浏览文件 @
6bc70fd5
...
...
@@ -41,6 +41,7 @@
},
"dependencies"
:
{
"fetch-mock"
:
"9.11.0"
,
"isomorphic-fetch"
:
"3.0.0"
,
"mime-types"
:
"2.1.31"
},
"devDependencies"
:
{
...
...
frontend/packages/server/index.ts
浏览文件 @
6bc70fd5
...
...
@@ -27,6 +27,7 @@ const cwd = path.dirname(fileURLToPath(import.meta.url));
config
();
process
.
env
.
SERVER
=
'
1
'
;
const
isDev
=
process
.
env
.
NODE_ENV
===
'
development
'
;
const
isDemo
=
!!
process
.
env
.
DEMO
;
...
...
frontend/yarn.lock
浏览文件 @
6bc70fd5
...
...
@@ -7280,6 +7280,14 @@ isobject@^3.0.0, isobject@^3.0.1:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
isomorphic-fetch@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz#0267b005049046d2421207215d45d6a262b8b8b4"
integrity sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==
dependencies:
node-fetch "^2.6.1"
whatwg-fetch "^3.4.1"
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
...
...
@@ -12049,6 +12057,11 @@ webpack@5.38.1:
watchpack "^2.2.0"
webpack-sources "^2.3.0"
whatwg-fetch@^3.4.1:
version "3.6.2"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==
whatwg-url@^6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录