diff --git a/tests/Commands/Make/__snapshots__/ModuleMakeCommandTest__test_it_generates_vite_file__1.txt b/tests/Commands/Make/__snapshots__/ModuleMakeCommandTest__test_it_generates_vite_file__1.txt index 72d694d3..0dd60664 100644 --- a/tests/Commands/Make/__snapshots__/ModuleMakeCommandTest__test_it_generates_vite_file__1.txt +++ b/tests/Commands/Make/__snapshots__/ModuleMakeCommandTest__test_it_generates_vite_file__1.txt @@ -1,5 +1,8 @@ import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; +import { readdirSync, statSync } from 'fs'; +import { join,relative,dirname } from 'path'; +import { fileURLToPath } from 'url'; export default defineConfig({ build: { @@ -19,8 +22,36 @@ export default defineConfig({ }), ], }); +// Scen all resources for assets file. Return array +//function getFilePaths(dir) { +// const filePaths = []; +// +// function walkDirectory(currentPath) { +// const files = readdirSync(currentPath); +// for (const file of files) { +// const filePath = join(currentPath, file); +// const stats = statSync(filePath); +// if (stats.isFile() && !file.startsWith('.')) { +// const relativePath = 'Modules/Blog/'+relative(__dirname, filePath); +// filePaths.push(relativePath); +// } else if (stats.isDirectory()) { +// walkDirectory(filePath); +// } +// } +// } +// +// walkDirectory(dir); +// return filePaths; +//} + +//const __filename = fileURLToPath(import.meta.url); +//const __dirname = dirname(__filename); + +//const assetsDir = join(__dirname, 'resources/assets'); +//export const paths = getFilePaths(assetsDir); + //export const paths = [ // 'Modules/Blog/resources/assets/sass/app.scss', // 'Modules/Blog/resources/assets/js/app.js', -//]; \ No newline at end of file +//];