Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
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
HuangJunbo
antSword
Commits
0c99a4da
Commit
0c99a4da
authored
Feb 03, 2021
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Enhance: Other) 优化插件加载, 加载异常的插件不会再影响到其它插件加载了
parent
76976672
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
CHANGELOG.md
CHANGELOG.md
+6
-0
app.entry.js
source/app.entry.js
+16
-8
No files found.
CHANGELOG.md
View file @
0c99a4da
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
> 有空会补补BUG、添添新功能。
> 有空会补补BUG、添添新功能。
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
## `v(2.1.10)`
### 其它
*
优化插件加载, 加载异常的插件不会再影响到其它插件加载了
## 2020/09/10 `v(2.1.9)`
## 2020/09/10 `v(2.1.9)`
### 核心
### 核心
...
...
source/app.entry.js
View file @
0c99a4da
...
@@ -125,11 +125,15 @@ const antSword = window.antSword = {
...
@@ -125,11 +125,15 @@ const antSword = window.antSword = {
return
return
}
}
// 存储路径&&package信息到全局变量antSword['plugins']
// 存储路径&&package信息到全局变量antSword['plugins']
try
{
antSword
[
'plugins'
][
_
]
=
{
antSword
[
'plugins'
][
_
]
=
{
_id
:
_
,
_id
:
_
,
path
:
pluginPath
,
path
:
pluginPath
,
info
:
JSON
.
parse
(
fs
.
readFileSync
(
path
.
join
(
pluginPath
,
'package.json'
)))
info
:
JSON
.
parse
(
fs
.
readFileSync
(
path
.
join
(
pluginPath
,
'package.json'
)))
}
}
}
catch
(
error
)
{
return
}
});
});
// 加载插件::开发
// 加载插件::开发
let
devPlugPath
=
antSword
.
storage
(
'dev-plugPath'
);
let
devPlugPath
=
antSword
.
storage
(
'dev-plugPath'
);
...
@@ -142,11 +146,15 @@ const antSword = window.antSword = {
...
@@ -142,11 +146,15 @@ const antSword = window.antSword = {
if
(
!
fs
.
lstatSync
(
_path
).
isDirectory
())
{
if
(
!
fs
.
lstatSync
(
_path
).
isDirectory
())
{
return
return
}
}
try
{
antSword
[
'plugins'
][
_
]
=
{
antSword
[
'plugins'
][
_
]
=
{
_id
:
_
,
_id
:
_
,
path
:
_path
,
path
:
_path
,
info
:
JSON
.
parse
(
fs
.
readFileSync
(
path
.
join
(
_path
,
'package.json'
)))
info
:
JSON
.
parse
(
fs
.
readFileSync
(
path
.
join
(
_path
,
'package.json'
)))
}
}
}
catch
(
error
)
{
return
}
});
});
}
}
// 加载工具栏
// 加载工具栏
...
...
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