Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
psd-parse
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
劳工
psd-parse
Commits
77c7ffd4
Commit
77c7ffd4
authored
Sep 27, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
3cb12a53
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
zeroing.js
src/zeroing.js
+2
-3
No files found.
src/zeroing.js
View file @
77c7ffd4
...
@@ -65,17 +65,16 @@ export async function execute(psdFile, options) {
...
@@ -65,17 +65,16 @@ export async function execute(psdFile, options) {
viewNode
.
type
=
'image'
;
viewNode
.
type
=
'image'
;
const
uuid
=
generateUUID
();
const
uuid
=
generateUUID
();
const
fileName
=
Date
.
now
().
valueOf
();
const
ext
=
'.png'
;
const
ext
=
'.png'
;
properties
.
source
=
'asset|'
+
uuid
;
properties
.
source
=
'asset|'
+
uuid
;
const
imageFilePath
=
path
.
join
(
imagesPath
,
fileName
+
ext
);
const
imageFilePath
=
path
.
join
(
imagesPath
,
uuid
+
ext
);
await
fs
.
ensureDir
(
path
.
dirname
(
imageFilePath
));
await
fs
.
ensureDir
(
path
.
dirname
(
imageFilePath
));
await
node
.
origin
.
saveAsPng
(
imageFilePath
);
await
node
.
origin
.
saveAsPng
(
imageFilePath
);
assets
.
push
({
assets
.
push
({
name
:
fileName
,
name
:
uuid
,
ext
,
ext
,
uuid
,
uuid
,
});
});
...
...
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