Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Internal Pain
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Aug 10, 2022
1 parent 96abb67 commit 93d5f7e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/plugins/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ export function movePluginFilesToWebview(folderName, extensions, isSrc = false)
const normalizedName = `${folderName}`.replace('webview/', '')

// First Perform Extension & Sub Directory Cleanup
const oldFiles = glob.sync(sanitizePath(path.join(`src-webviews/public/plugins/${normalizedName}/**/*.+(${extensions.join('|')})`)));
let oldFiles;

if (!isSrc) {
oldFiles = glob.sync(sanitizePath(path.join(`src-webviews/public/plugins/${normalizedName}/**/*.+(${extensions.join('|')})`)));
} else {
oldFiles = glob.sync(sanitizePath(path.join(`src-webviews/src/plugins/${normalizedName}/**/*.+(${extensions.join('|')})`)));
}

for (let oldFile of oldFiles) {
if (fs.existsSync(oldFile)) {
Expand Down Expand Up @@ -78,5 +84,14 @@ export function movePluginFilesToWebview(folderName, extensions, isSrc = false)
}
}

if (amountCopied >= 1 && extensions.includes('css')) {
console.warn('! ============ !')
console.warn(`You're using the 'css' folder. In order to reflect changes you must restart the vue server for it to update.`)
console.warn(`You should move the style to the style tag in your component.`)
console.warn(`Externally styling with Athena is poorly supported and may never work correctly.`)
console.warn(`This is fine if you have preset styles already built and don't plan on making changes in the future.`)
console.warn('! ============ !')
}

console.log(`${folderName} - ${amountCopied} Files Added to WebView Plugins - (${extensions.join('|')})`)
}

0 comments on commit 93d5f7e

Please sign in to comment.