{"id":18298465,"url":"https://github.com/fusionauth/fusionauth-theme-helper","last_synced_at":"2025-04-05T13:33:35.455Z","repository":{"id":71201234,"uuid":"567008706","full_name":"FusionAuth/fusionauth-theme-helper","owner":"FusionAuth","description":"Scripts to help update FusionAuth themes","archived":false,"fork":false,"pushed_at":"2024-07-28T05:57:33.000Z","size":37,"stargazers_count":5,"open_issues_count":1,"forks_count":6,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-07-28T06:46:22.673Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FusionAuth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-16T21:56:08.000Z","updated_at":"2024-07-28T05:57:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f70b5b64-3e80-42e0-8737-e4e58a313fbe","html_url":"https://github.com/FusionAuth/fusionauth-theme-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-theme-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-theme-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-theme-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FusionAuth%2Ffusionauth-theme-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FusionAuth","download_url":"https://codeload.github.com/FusionAuth/fusionauth-theme-helper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223192692,"owners_count":17103564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T15:06:07.604Z","updated_at":"2025-04-05T13:33:35.441Z","avatar_url":"https://github.com/FusionAuth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Theme helper\n\nThis repository has tools to help with FusionAuth theme management. It offers syncing to and from your local system. It also has a tool to compare between two themes, which is useful when upgrading FusionAuth.\n\nThis repository is for helping you edit, develop, and manage FusionAuth themes locally.\n\nBecause these helper scripts upload the results of your changes in real-time, it is best used on non-production systems.\n\nMore about FusionAuth themes: https://fusionauth.io/docs/customize/look-and-feel/\n\n## Prerequisites\n\n* node\n* npm\n\n## Installation\n\n* `npm install`\n* update `.env.sample` with your API key, FusionAuth hostname, and theme id and copy it to `.env`\n* you can modify the TMP_DIR to be wherever you'd like it to be, the default is `tmp` in the current directory.\n\nThe provided API key must have `/api/theme` permissions for the `GET` and `PATCH` methods.\n\n## Usage for storing a theme in version control\n\nRun `download.sh` to pull down theme files, including freemarker, messages, and stylesheet files.\n\nCommit them to version control.\n\nIn a separate terminal, run `watch.sh`. This will upload any modified templates and will overwrite anything present in the remote system whenever a local file changes. \n\nEdit the files using whatever local editor you want.\n\nIn the browser, reload themed pages and see your changes live.\n\nWhen done, commit changes to version control.\n\nYou can do a final upload of whatever is in the TMP_DIR by running `upload.sh`.\n\n## Usage for upgrading\n\nWhen [upgrading FusionAuth](https://fusionauth.io/docs/operate/deploy/upgrade), there may be changes in newer theme templates. If you have a customized theme, you will need to manually apply these changes. To find the differences, you can download the base theme from the version you are upgrading to, and compare it to the base theme of your current FusionAuth installation. Update the variables in the `.env` file accordingly for each version. You should use the [Default theme Id `75a068fd-e94b-451a-9aeb-3ddb9a3b5987`](https://fusionauth.io/docs/get-started/core-concepts/limitations#default-configuration) as the `THEME_ID` value for both versions. Update the `TMP_DIR` before each download to save the themes to different folders. You can download the current and new themes using the download script:\n\n```sh\n./download.sh\n```\n\nOnce you have both sets of theme files downloaded, you can run the `diff-themes.sh` script to compare the two sets of files. The script takes 2 arguments, the first is the path to the existing theme files, and the second is the path to the new theme files. For example:\n\n```sh\n./diff-themes.sh current-theme new-theme\n```\n\nThe script will output a list of files that are different between the two sets of theme files, along with the differences. You can use this list to update your customized theme files. While you can directly use this output to find the changes, it might be useful to use a visual diff tool of your choice to help you make the changes, using the file list as a guide.\n\nRead more in the [Upgrade Guide](https://fusionauth.io/docs/operate/deploy/upgrade)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-theme-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusionauth%2Ffusionauth-theme-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusionauth%2Ffusionauth-theme-helper/lists"}