Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snowman build should be able to build only static files when given the static flag #23

Closed
Abbe98 opened this issue Sep 28, 2021 · 2 comments
Labels
🏅 enhancement New feature or request
Milestone

Comments

@Abbe98
Copy link
Collaborator

Abbe98 commented Sep 28, 2021

snowman build --static should build only the static files because as a developer I often work on issues only affecting client-side CSS and JavaScript and I want to avoid long build times when I work on large sites. Part of #2.

Implementation notes

While the current implementation just deletes and copies the static files as-is we cant do the same here. Because a file might have been deleted we need to be able to remember past files so that we can selective delete them if needed.

  1. when copying static files store the result in .snowman/static_history.txt
  2. delete the files given in static_history.txt
  3. copy all static files and update static_history.txt

These features should be in a non-cmd package to ensure they can be used in #2.

@Abbe98 Abbe98 added the 🏅 enhancement New feature or request label Sep 28, 2021
@Abbe98 Abbe98 added this to the 0.2.0 milestone Sep 28, 2021
@Abbe98
Copy link
Collaborator Author

Abbe98 commented Nov 7, 2021

@Abbe98
Copy link
Collaborator Author

Abbe98 commented Nov 7, 2021

We should move the CopyDir function into a static package while adding the history functionality. There should also be a separate function for clearing cache items based on the history.

func CopyDir(from string, to string) error {

Abbe98 added a commit that referenced this issue Nov 7, 2021
side effects:

utils.WriteLineSeperatedFile no longer writes trailing line breaks at the end of files.
@Abbe98 Abbe98 closed this as completed Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏅 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant