About this task
This procedure explains how to delete a theme from a customization project.
Prerequisites
- The theme was previously defined in the file
gbc-project-dir
/customization/
customization-project-dir
/config.json
.
Access the config.json file for the customization
Deleting a theme requires making changes to the config.json
file located in the customization-project-dir
directory. Open gbc-project-dir
/customization/
customization-project-dir
/config.json
with a text editor.
Locate the theme
Each theme is contained within curly braces within the "themes"
element, and can be identified by its "name"
.
{
"themes": [{
"name": "default",
"title": "Default",
"uses": ["platform/desktop"]
},
{
"name": "dark",
"title": "Dark",
"uses": ["platform/desktop", "mythemeparts/common", "mythemeparts/colors/dark"]
},
{
"name": "default_mobile",
"title": "Default",
"uses": ["platform/mobile"]
}
]
}
In this example, there are three themes defined: "default", "dark", and "default_mobile".
Remove the theme definition
Once you have found the theme you need to delete, simply remove it from the file. In our example, you simply remove the "dark" theme definition to remove the "dark" theme:
{
"themes": [{
"name": "default",
"title": "Default",
"uses": ["platform/desktop"]
},
{
"name": "default_mobile",
"title": "Default",
"uses": ["platform/mobile"]
}
]
}
Rebuild using gbc build
When you have finished your modifications, save your changes and rebuild your customization:
$ gbc build --customization customization-project-dir
Test
Verify the theme has been removed by closing and reopening your application, then try and set your theme to the removed theme. It should not be present in the list.
TIP: You may need to use CTRL + F5 to clear the browser cache before you see your changes.