mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2026-01-29 01:07:27 +00:00
🎨 refactor(lib/ai/renderer.js): update temporary directory structure for HTML files in crystelf-plugin
🎨 refactor(lib/music/musicRenderer.js): adjust temporary directory for music files in crystelf-plugin
This commit is contained in:
parent
fcbb10d2f5
commit
0de747a337
@ -42,7 +42,7 @@ class Renderer {
|
|||||||
height: Math.ceil(rect.height),
|
height: Math.ceil(rect.height),
|
||||||
});
|
});
|
||||||
|
|
||||||
const tempDir = path.join(process.cwd(), 'temp', 'html');
|
const tempDir = path.join(process.cwd(), 'temp', 'html','crystelf-plugin');
|
||||||
if (!fs.existsSync(tempDir)) fs.mkdirSync(tempDir, { recursive: true });
|
if (!fs.existsSync(tempDir)) fs.mkdirSync(tempDir, { recursive: true });
|
||||||
const filepath = path.join(tempDir, `code_${Date.now()}.png`);
|
const filepath = path.join(tempDir, `code_${Date.now()}.png`);
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ class Renderer {
|
|||||||
height: Math.min(rect.height, 3000),
|
height: Math.min(rect.height, 3000),
|
||||||
deviceScaleFactor: 2,
|
deviceScaleFactor: 2,
|
||||||
});
|
});
|
||||||
const tempDir = path.join(process.cwd(), 'temp', 'html');
|
const tempDir = path.join(process.cwd(), 'temp', 'html','crystelf-plugin');
|
||||||
if (!fs.existsSync(tempDir)) fs.mkdirSync(tempDir, { recursive: true });
|
if (!fs.existsSync(tempDir)) fs.mkdirSync(tempDir, { recursive: true });
|
||||||
const filepath = path.join(tempDir, `markdown_${Date.now()}.png`);
|
const filepath = path.join(tempDir, `markdown_${Date.now()}.png`);
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ const __dirname = path.dirname(__filename);
|
|||||||
|
|
||||||
class MusicRenderer {
|
class MusicRenderer {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.tempDir = path.join(__dirname, '..', '..','..','..', 'temp');
|
this.tempDir = path.join(__dirname, '..', '..','..','..', 'temp','crystelf-plugin','music');
|
||||||
this.browser = null;
|
this.browser = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user