Commit a79d745a authored by rockyl's avatar rockyl

init

parent 77c7ffd4
......@@ -272,17 +272,16 @@ async function execute$1(psdFile, options) {
viewNode.type = 'image';
const uuid = generateUUID();
const fileName = Date.now().valueOf();
const ext = '.png';
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 node.origin.saveAsPng(imageFilePath);
assets.push({
name: fileName,
name: uuid,
ext,
uuid,
});
......
This diff is collapsed.
......@@ -278,17 +278,16 @@ async function execute$1(psdFile, options) {
viewNode.type = 'image';
const uuid = generateUUID();
const fileName = Date.now().valueOf();
const ext = '.png';
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 node.origin.saveAsPng(imageFilePath);
assets.push({
name: fileName,
name: uuid,
ext,
uuid,
});
......
This diff is collapsed.
......@@ -278,17 +278,16 @@
viewNode.type = 'image';
const uuid = generateUUID();
const fileName = Date.now().valueOf();
const ext = '.png';
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 node.origin.saveAsPng(imageFilePath);
assets.push({
name: fileName,
name: uuid,
ext,
uuid,
});
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment