Visualizer code clean up utility

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

This is #[Informational Post]​ .

How to clean up unused skins and Actions from the Visualizer.

From the Visualizer Enterprise, we don't have any option to remove the unused studio actions and unused skins.

This facility is available from the Visualizer Starter version. Please follow the below steps to get the list of actions or skins.

1) This can be done through Visualizer Starter.

2) Please open the install_Config.js file which is present in 7.3StarterInstallation folder ->install_Config.js file.

3) Please change the same workspace path where you are using for 7.3 Visualizer Enterprise in install_Config.js file.

4) Save the file and open the command prompt and navigate to that folder.

5) Install node in your machine.

6) Copy the attached file to your VisualizerStarter Installation folder -> tools folder.

7) Please type the below command for unUsedSkins.

node ./tools/unUsedActions.js -l <Project Name>

8) The above command will give you list of unused Actions present in the project.

9) Please search with that name and delete the same from the work space.

10) To remove all the list at a time, please execute the below command.

node ./tools/unUsedActions.js -d <Project Name>

11) To remove the unused skins, please use the below command.

node ./tools/unUsedSkins.js -l <Project Name> - This will give list of unused skins.

12) To remove the skins list directly, please execute the below command.

node ./tools/unUsedSkins.js -d <Project Name> - This will remove the above list of unused skins.

Thank You

Thank you @Thewesv Dyew​ for sharing this information with the community.

Hi All,

Above attachment will not going to check the unused skin from component so i modified to check that as well,

Please find the updated unused skin file..

For example, if I have not used a skin in the design but referring it in run time. What will happen to such skins? We don't want to remove that. Will the utility takes care of that?

Hi,

Skins which are referred at runtime (but not design time) should be taken care as they will removed when running the utility.

In this scenario we might need to backup those skins and after running the utility you need to move to the themes folder.

Or else, we need to assign the skin to a widget in a dummy form and after cleanup remove the form.

Here's an alternative solution you can install directly from the NPM registry. It won't delete anything. It will only detect it. It's up to you to delete the files or not. So if you know you use something programmatically just ignore it. No need to juggle folders and files.

https://www.npmjs.com/package/viskit

**Image removed for security reasons**

Thanks for sharing.

But while trying with find-skins, not able to see any result.

C:/Users/user1 > viskit find-skins C:/users/ws/SampleProj --theme defaultTheme

It didnt print anything.

Anything, I missed ?

It's probably unable to parse the Windows path. From the command line cd into the root of the project and use a dot '.' for the path.

We are using 8.4 visualizer. in the steps it is mentioned as 7.3. can I do the same in 8.4 also?

It works with Visualizer Enterprise 8.4?

Yes. The same process will work for Visualizer 8.4 as well.

We are using Kony 8.4.86. All of the basic viskit commands work (e.g., --version, gpv, gqv). But none of the useful commands work...they all return either nothing or "Count: 0." We've tried various projects and even old Kony 7.3 projects, all with the same results. I've used syntax such as "viskit fs ." (while in the actual project folder), and "viskit fv myproject" (while in the workspace folder), and "viskit fa c:\konyworkspace\project"

viskit --version returns 2.0-rc1. On git it says the latest is rc3, but I can't see to get that, it always gives me rc1.

Are we missing anything else to run this correctly?

Thanks!