test if no copying
This commit is contained in:
parent
6f7758e98f
commit
3b0f3a9a7c
3 changed files with 2 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ node_modules
|
||||||
.output
|
.output
|
||||||
.env
|
.env
|
||||||
dist
|
dist
|
||||||
|
_bkup
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"start": "nitropack dev",
|
||||||
"prepare": "nitropack prepare",
|
"prepare": "nitropack prepare",
|
||||||
"dev": "nitropack dev",
|
"dev": "nitropack dev",
|
||||||
"build": "nitropack build",
|
"build": "nitropack build",
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
import * as fs from "fs";
|
|
||||||
export default defineNitroPlugin(async () => {
|
|
||||||
console.log("Copying components to public folder...");
|
|
||||||
const rawKeys = await useStorage().getKeys("/assets/components");
|
|
||||||
rawKeys.forEach(async (key) => {
|
|
||||||
const cleanKey = key.replace("assets:components:", "");
|
|
||||||
const content = await useStorage().getItem(key);
|
|
||||||
if (!fs.existsSync("./public/.output")) fs.mkdirSync("./public/.output");
|
|
||||||
fs.writeFileSync(`./public/.output/${cleanKey}`, content.toString());
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in a new issue