Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-pack
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
劳工
zeroing-pack
Commits
fb1e8780
Commit
fb1e8780
authored
Dec 03, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过程代码增加id注释
parent
f25e9f8f
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
27 deletions
+51
-27
index.es.js
dist/index.es.js
+12
-6
index.es.js.map
dist/index.es.js.map
+1
-1
index.js
dist/index.js
+12
-6
index.js.map
dist/index.js.map
+1
-1
index.umd.js
dist/index.umd.js
+12
-6
index.umd.js.map
dist/index.umd.js.map
+1
-1
ProcessManager.js
src/ProcessManager.js
+12
-6
No files found.
dist/index.es.js
View file @
fb1e8780
...
@@ -50,13 +50,13 @@ class ProcessManager {
...
@@ -50,13 +50,13 @@ class ProcessManager {
}
}
deal
(
process
)
{
deal
(
process
)
{
let
hash
=
this
.
put
(
process
.
script
);
let
hash
=
this
.
put
(
process
);
if
(
hash
)
{
if
(
hash
)
{
process
.
script
=
'link://'
+
hash
;
process
.
script
=
'link://'
+
hash
;
}
}
if
(
process
.
metas
)
{
if
(
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
let
hash
=
this
.
put
(
subProcess
.
script
);
let
hash
=
this
.
put
(
subProcess
);
if
(
hash
)
{
if
(
hash
)
{
subProcess
.
script
=
'link://'
+
hash
;
subProcess
.
script
=
'link://'
+
hash
;
}
}
...
@@ -64,12 +64,17 @@ class ProcessManager {
...
@@ -64,12 +64,17 @@ class ProcessManager {
}
}
}
}
put
(
script
)
{
put
(
process
)
{
const
{
id
,
script
}
=
process
;
if
(
script
)
{
if
(
script
)
{
let
hash
=
md5
(
script
);
let
hash
=
md5
(
script
);
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
this
.
pool
[
hash
]
=
script
;
this
.
pool
[
hash
]
=
{
script
,
ids
:
[],
};
}
}
this
.
pool
[
hash
].
ids
.
push
(
id
);
return
hash
;
return
hash
;
}
}
}
}
...
@@ -77,12 +82,13 @@ class ProcessManager {
...
@@ -77,12 +82,13 @@ class ProcessManager {
async
generateCurrent
()
{
async
generateCurrent
()
{
let
scripts
=
''
;
let
scripts
=
''
;
for
(
let
hash
in
this
.
pool
)
{
for
(
let
hash
in
this
.
pool
)
{
let
code
=
this
.
pool
[
hash
];
let
{
script
,
ids
}
=
this
.
pool
[
hash
];
scripts
+=
`
scripts
+=
`
${
ids
.
map
(
id
=>
{
return
`/*==
${
id
}
*==/\n`
})}
exports['
${
hash
}
'] = function(args, props, target, global, vm){
exports['
${
hash
}
'] = function(args, props, target, global, vm){
return new Promise(function(resolve, reject){
return new Promise(function(resolve, reject){
${
code
}
${
script
}
function next(type, payload){resolve({type: type, payload: payload})}
function next(type, payload){resolve({type: type, payload: payload})}
});
});
...
...
dist/index.es.js.map
View file @
fb1e8780
This diff is collapsed.
Click to expand it.
dist/index.js
View file @
fb1e8780
...
@@ -56,13 +56,13 @@ class ProcessManager {
...
@@ -56,13 +56,13 @@ class ProcessManager {
}
}
deal
(
process
)
{
deal
(
process
)
{
let
hash
=
this
.
put
(
process
.
script
);
let
hash
=
this
.
put
(
process
);
if
(
hash
)
{
if
(
hash
)
{
process
.
script
=
'link://'
+
hash
;
process
.
script
=
'link://'
+
hash
;
}
}
if
(
process
.
metas
)
{
if
(
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
let
hash
=
this
.
put
(
subProcess
.
script
);
let
hash
=
this
.
put
(
subProcess
);
if
(
hash
)
{
if
(
hash
)
{
subProcess
.
script
=
'link://'
+
hash
;
subProcess
.
script
=
'link://'
+
hash
;
}
}
...
@@ -70,12 +70,17 @@ class ProcessManager {
...
@@ -70,12 +70,17 @@ class ProcessManager {
}
}
}
}
put
(
script
)
{
put
(
process
)
{
const
{
id
,
script
}
=
process
;
if
(
script
)
{
if
(
script
)
{
let
hash
=
md5
(
script
);
let
hash
=
md5
(
script
);
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
this
.
pool
[
hash
]
=
script
;
this
.
pool
[
hash
]
=
{
script
,
ids
:
[],
};
}
}
this
.
pool
[
hash
].
ids
.
push
(
id
);
return
hash
;
return
hash
;
}
}
}
}
...
@@ -83,12 +88,13 @@ class ProcessManager {
...
@@ -83,12 +88,13 @@ class ProcessManager {
async
generateCurrent
()
{
async
generateCurrent
()
{
let
scripts
=
''
;
let
scripts
=
''
;
for
(
let
hash
in
this
.
pool
)
{
for
(
let
hash
in
this
.
pool
)
{
let
code
=
this
.
pool
[
hash
];
let
{
script
,
ids
}
=
this
.
pool
[
hash
];
scripts
+=
`
scripts
+=
`
${
ids
.
map
(
id
=>
{
return
`/*==
${
id
}
*==/\n`
})}
exports['
${
hash
}
'] = function(args, props, target, global, vm){
exports['
${
hash
}
'] = function(args, props, target, global, vm){
return new Promise(function(resolve, reject){
return new Promise(function(resolve, reject){
${
code
}
${
script
}
function next(type, payload){resolve({type: type, payload: payload})}
function next(type, payload){resolve({type: type, payload: payload})}
});
});
...
...
dist/index.js.map
View file @
fb1e8780
This diff is collapsed.
Click to expand it.
dist/index.umd.js
View file @
fb1e8780
...
@@ -56,13 +56,13 @@
...
@@ -56,13 +56,13 @@
}
}
deal
(
process
)
{
deal
(
process
)
{
let
hash
=
this
.
put
(
process
.
script
);
let
hash
=
this
.
put
(
process
);
if
(
hash
)
{
if
(
hash
)
{
process
.
script
=
'link://'
+
hash
;
process
.
script
=
'link://'
+
hash
;
}
}
if
(
process
.
metas
)
{
if
(
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
let
hash
=
this
.
put
(
subProcess
.
script
);
let
hash
=
this
.
put
(
subProcess
);
if
(
hash
)
{
if
(
hash
)
{
subProcess
.
script
=
'link://'
+
hash
;
subProcess
.
script
=
'link://'
+
hash
;
}
}
...
@@ -70,12 +70,17 @@
...
@@ -70,12 +70,17 @@
}
}
}
}
put
(
script
)
{
put
(
process
)
{
const
{
id
,
script
}
=
process
;
if
(
script
)
{
if
(
script
)
{
let
hash
=
md5
(
script
);
let
hash
=
md5
(
script
);
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
this
.
pool
[
hash
]
=
script
;
this
.
pool
[
hash
]
=
{
script
,
ids
:
[],
};
}
}
this
.
pool
[
hash
].
ids
.
push
(
id
);
return
hash
;
return
hash
;
}
}
}
}
...
@@ -83,12 +88,13 @@
...
@@ -83,12 +88,13 @@
async
generateCurrent
()
{
async
generateCurrent
()
{
let
scripts
=
''
;
let
scripts
=
''
;
for
(
let
hash
in
this
.
pool
)
{
for
(
let
hash
in
this
.
pool
)
{
let
code
=
this
.
pool
[
hash
];
let
{
script
,
ids
}
=
this
.
pool
[
hash
];
scripts
+=
`
scripts
+=
`
${
ids
.
map
(
id
=>
{
return
`/*==
${
id
}
*==/\n`
})}
exports['
${
hash
}
'] = function(args, props, target, global, vm){
exports['
${
hash
}
'] = function(args, props, target, global, vm){
return new Promise(function(resolve, reject){
return new Promise(function(resolve, reject){
${
code
}
${
script
}
function next(type, payload){resolve({type: type, payload: payload})}
function next(type, payload){resolve({type: type, payload: payload})}
});
});
...
...
dist/index.umd.js.map
View file @
fb1e8780
This diff is collapsed.
Click to expand it.
src/ProcessManager.js
View file @
fb1e8780
...
@@ -17,13 +17,13 @@ export default class ProcessManager {
...
@@ -17,13 +17,13 @@ export default class ProcessManager {
}
}
deal
(
process
)
{
deal
(
process
)
{
let
hash
=
this
.
put
(
process
.
script
);
let
hash
=
this
.
put
(
process
);
if
(
hash
)
{
if
(
hash
)
{
process
.
script
=
'link://'
+
hash
;
process
.
script
=
'link://'
+
hash
;
}
}
if
(
process
.
metas
)
{
if
(
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
for
(
let
subProcess
of
process
.
metas
)
{
let
hash
=
this
.
put
(
subProcess
.
script
);
let
hash
=
this
.
put
(
subProcess
);
if
(
hash
)
{
if
(
hash
)
{
subProcess
.
script
=
'link://'
+
hash
;
subProcess
.
script
=
'link://'
+
hash
;
}
}
...
@@ -31,12 +31,17 @@ export default class ProcessManager {
...
@@ -31,12 +31,17 @@ export default class ProcessManager {
}
}
}
}
put
(
script
)
{
put
(
process
)
{
const
{
id
,
script
}
=
process
;
if
(
script
)
{
if
(
script
)
{
let
hash
=
md5
(
script
);
let
hash
=
md5
(
script
);
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
if
(
!
this
.
pool
.
hasOwnProperty
(
hash
))
{
this
.
pool
[
hash
]
=
script
;
this
.
pool
[
hash
]
=
{
script
,
ids
:
[],
};
}
}
this
.
pool
[
hash
].
ids
.
push
(
id
);
return
hash
;
return
hash
;
}
}
}
}
...
@@ -44,12 +49,13 @@ export default class ProcessManager {
...
@@ -44,12 +49,13 @@ export default class ProcessManager {
async
generateCurrent
()
{
async
generateCurrent
()
{
let
scripts
=
''
;
let
scripts
=
''
;
for
(
let
hash
in
this
.
pool
)
{
for
(
let
hash
in
this
.
pool
)
{
let
code
=
this
.
pool
[
hash
];
let
{
script
,
ids
}
=
this
.
pool
[
hash
];
scripts
+=
`
scripts
+=
`
${
ids
.
map
(
id
=>
{
return
`/*==
${
id
}
*==/\n`
})}
exports['
${
hash
}
'] = function(args, props, target, global, vm){
exports['
${
hash
}
'] = function(args, props, target, global, vm){
return new Promise(function(resolve, reject){
return new Promise(function(resolve, reject){
${
code
}
${
script
}
function next(type, payload){resolve({type: type, payload: payload})}
function next(type, payload){resolve({type: type, payload: payload})}
});
});
...
...
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