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

Removing purge.js file from project config root does not remove the purge settings #642

Open
sugat009 opened this issue Nov 12, 2024 · 0 comments
Labels
Type: Bug Fix something that isn't working as intended

Comments

@sugat009
Copy link
Member

Describe the bug
The way to add purging to a project is to add a purge.js file to the project config root as per the docs. So, naturally, to remove purging from a project, a user would think that removing purge.js would be the way to do so, but it doesn't work. If you empty the purge.js file, it creates an empty object in the purge key of the settings JSON file but it's not ideal to have an empty object even in the database.

To Reproduce
Steps to reproduce the behavior:

  1. Create a purge.js file and add your purge logic
  2. Run the command cht compile-app-settings
  3. Check the app_settings.json file. A new key purge should have been minified created with the content from the purge.js.
  4. Delete or move or rename the purge.js file.
  5. Run the command cht-compile-app-settings
  6. Check the app_settings.json file. The purge key still exists.

Expected behavior
When I delete or move or rename the purge.js file from the root of the project config, the settings should also remove the purge key from the JSON file.

Logs
If applicable, include the cht-conf output, server logs, and/or browser logs.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • Instance: Local
  • Client platform: Linux
  • cht-conf version: 4.1.1
  • cht-core version: N/A

Additional context
Add any other context about the problem here. What have you tried? Is there a workaround?

@sugat009 sugat009 added the Type: Bug Fix something that isn't working as intended label Nov 12, 2024
@sugat009 sugat009 changed the title Removing purge.js from project config root does not remove the purge settings Removing purge.js file from project config root does not remove the purge settings Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Fix something that isn't working as intended
Projects
None yet
Development

No branches or pull requests

1 participant