Skip to content

Conversation

@bcomnes
Copy link
Owner

@bcomnes bcomnes commented Apr 17, 2025

Adds a flag to the CLI that lets you copy over a folder on top of the dest folder. If you have assets from an old site, it gives a clear way to cope that into a top-bun website without having to reason about tb rules.

@bcomnes bcomnes requested a review from Copilot April 17, 2025 03:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds a new CLI flag (--copy) to allow users to copy over folders into the destination directory, supporting legacy assets integration.

  • Updated tests to exercise folder copying behavior.
  • Fixed spelling issues in warning messages and variable names.
  • Integrated copy functionality into the builder and updated related docs.

Reviewed Changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test-cases/nested-dest/index.test.js Modified TopBun instantiation to include copy flag.
test-cases/general-features/index.test.js Updated test to include copied folder assets.
lib/identify-pages.js Fixed spelling of "templateFileName".
lib/helpers/top-bun-warning.js Fixed typo in warning code identifier.
lib/builder.js Integrated build-copy step into the builder flow.
lib/build-copy/index.test.js Added tests for getCopyDirs functionality.
lib/build-copy/index.js Implemented copy functionality using cpx2.
index.js Updated TopBun class to incorporate copy directories.
bin.js Added command-line parsing support for the copy flag.
README.md Updated documentation to explain the --copy flag.
Files not reviewed (2)
  • test-cases/general-features/copyfolder/oldsite/styles/globals.css: Language not supported
  • test-cases/general-features/copyfolder/some.type: Language not supported

@bcomnes bcomnes merged commit b9873c3 into master Apr 17, 2025
6 checks passed
@bcomnes bcomnes deleted the directory-copy branch April 17, 2025 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants