diff --git a/.DS_Store b/.DS_Store index 1caf842..5008ddf 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/build.js b/build.js index 1acf662..1afcdd8 100644 --- a/build.js +++ b/build.js @@ -1,8 +1,9 @@ const fs = require('fs'); const path = require('path'); +const srcDir = path.join(__dirname, 'src'); const rootDir = __dirname; -const publicDir = path.join(rootDir, 'public'); +publicDir = path.join(rootDir, 'public'); const filesToCopy = ['index.html', 'styles.css', 'script.js']; @@ -11,14 +12,19 @@ if (!fs.existsSync(publicDir)) { } filesToCopy.forEach(file => { - const srcPath = path.join(rootDir, file); - const destPath = path.join(publicDir, file); + const srcPath = path.join(srcDir, file); + const publicPath = path.join(publicDir, file); + const destPath = path.join(rootDir, file); if (fs.existsSync(srcPath)) { + fs.copyFileSync(srcPath, publicPath); fs.copyFileSync(srcPath, destPath); - console.log(`Copied ${file} to public directory`); + console.log(`Copied ${file} to public and root directories`); + } else if (fs.existsSync(publicPath)) { + fs.copyFileSync(publicPath, destPath); + console.log(`Copied ${file} from public to root directory`); } else { - console.log(`Warning: ${file} not found in root directory`); + console.log(`Warning: ${file} not found in src or public directory`); } }); diff --git a/index.html b/index.html index 906bf07..0020a1b 100644 --- a/index.html +++ b/index.html @@ -18,12 +18,12 @@

Welcome to Dark Triad Assessments

Explore the darker aspects of personality through scientifically validated assessments

- +

Dark Triad Assessments

- +