Skip to content

Conversation

@ranma2913
Copy link

@ranma2913 ranma2913 commented Oct 3, 2025

Summary

This PR refactors the project's build system and file organization to improve maintainability and align with modern web development practices. The changes reorganize static assets and modularize the build process.

Includes Commits from PR #41 so also fixes #37
Fixes #39
Fixes #42
Fixes #44
Fixes #45

Changes Made

🗂️ File Organization Restructure

  • Moved all static assets from dist/ to src/static/ including:
    • HTML files (index.html, 404.html)
    • Static assets (favicon.ico, ads.txt, robots.txt, sitemap.xml)
    • Icon directory with all favicon variants
    • Main CSS and JavaScript files
  • Removed committed build artifacts from dist/ directory
  • Updated .gitignore to exclude the dist/ directory from version control

🔧 Build Script Improvements

  • Modularized build process by breaking down the monolithic build script into focused tasks:
    • process-sass: Compiles SCSS to CSS
    • copy-js-deps: Copies JavaScript dependencies from node_modules
    • copy-static: Copies static assets from src/static/ to dist/
    • build: Orchestrates all build steps
  • Removed global sass dependency by using npx sass instead of requiring global installation
  • Added proper directory creation with mkdir -p for better reliability

🐳 Docker Compliance Fix

  • Fixed Dockerfile linting issue by converting lowercase instruction to uppercase (docker:S6476)

Benefits

  1. Cleaner Repository: Build artifacts are no longer committed to version control
  2. Better Source Organization: Clear separation between source files (src/static/) and build output (dist/)
  3. Improved Build Process: Modular scripts make it easier to debug and maintain individual build steps
  4. Development Workflow: Developers can now modify static assets in src/static/ and have them automatically copied during build
  5. CI/CD Compatibility: The existing GitHub Actions workflow continues to work seamlessly with these changes

Deployment Impact

No breaking changes - The deployment process remains unchanged:

  • npm run build still generates the complete dist/ directory
  • CloudFormation template compatibility maintained
  • GitHub Actions workflow continues to work without modification
  • Docker build process updated to work with new structure

Testing

  • Build process verified locally
  • Static asset copying confirmed
  • Docker build tested
  • Deployment pipeline compatibility confirmed

This refactoring sets up a more maintainable foundation for future development while ensuring zero disruption to the existing deployment infrastructure.

@ranma2913 ranma2913 changed the title Dist refactor chore: ✈ move static resources to src/static and cleanup build scripts - Resolve #39 Oct 3, 2025
…nd properly trim the clipboardData since copy-paste often has trailing whitespace.
… Use of Obsolete Functions.

Change from `window.event` to modern `e.originalEvent.clipboardData`
@ranma2913 ranma2913 changed the title chore: ✈ move static resources to src/static and cleanup build scripts - Resolve #39 chore: ✈ move static resources to src/static and cleanup build scripts & Resolve some issues. Oct 15, 2025
@ranma2913
Copy link
Author

@ckabalan Looking for Review on this and a pipeline approval.

@ranma2913
Copy link
Author

@bl4ckfir3 I see you made contributions this year. How did you engage @ckabalan for reviews? I'd like to ensure I'm following the best practice.

… 404 (Not Found)

(index):1  Error while trying to use the following icon from the Manifest: http://localhost:8080/icon/icon/android-chrome-192x192.png (Download error or resource isn't a valid image)
@ranma2913 ranma2913 changed the title chore: ✈ move static resources to src/static and cleanup build scripts & Resolve some issues. chore: ✈ move static resources to src/static and cleanup build scripts & ✨ Resolve some issues ✨ Oct 15, 2025
@ckabalan
Copy link
Owner

Hey @ranma2913 - The overview looks good and I would agree with all of those changes. I'll need to sit down and do some testing. I'm in the middle of moving my family across the US and will have to manage my time carefully. However, if it builds and the tests pass we should be in good shape. Give me some time to process this, I'm still committed to this project, but have to prioritize family for a little bit.

@ranma2913
Copy link
Author

You bet, it's a really useful project! I'm using it almost every week as I'm moving projects to public cloud from my company's datacenters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants