Re-register a component using bootstrap

I made some changes to my rgba-colorpicker component (you can now save you’re memory colors). Only when i now install my addon I get a component failure, if i then reboot the changes are loaded.

Can i re-register my component, so the new changes are loaded when installed with bootstrap?
I found the registar.autoUnregister but I’m I bit confused how to get the component location using nsDirectoryService

I also made some changes to my skin, these are also not loaded when installing trough boostrap.
In the bootstrap install function I now load the stylesheet and then reload less, is this the correct way of doing this?

let windows = Services.wm.getEnumerator("Komodo");
let domWindow = windows.getNext().QueryInterface(Ci.nsIDOMWindow);

var koLess = domWindow.require("ko/less");
koLess.loadSheet('less://rgba-colorpicker/skin/colorpicker.less');
koLess.reload(true);

You sure can, here’s a snippet from the documentation module:

    if ( ! ("@activestate.com/commando/koScopeDocs;1" in Components.classes)) {
        try {
            var component = startupData.installPath.clone();
            component.append("components");
            component.append("component.manifest");
    
            var registrar = Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
            registrar.autoRegister(component);
        } catch (e) {
            log.exception(e, "Commando: Exception while registering component for 'Docs' scope");
        }
    }

This would register the component stored in the components folder of the addon. It requires a component.manifest file in this folder which should look like this:

component {b9f8948b-5b27-46eb-8787-839d6be59e86} koScopeDocs.py
contract @activestate.com/commando/koScopeDocs;1 {b9f8948b-5b27-46eb-8787-839d6be59e86}

@nathanr thanks for the snippet, but I already have this in my bootstrap.
The problem I’m having is that when I update my colorPicker the changes in the Component aren’t applied.

How do I Unregister my component so I can re-register the component so my changes are loaded?

Also I’m having a issue with my css changes, on update these changes are not applied.
How do reload the new stylesheet, I tried reloading the stylesheet using the StylesheetService but with no success.

That’s odd, your changes should be picked up. You could try deleting the profile/XRE/startupCache folder, as well as profile/startup-env.tmp. Otherwise, try simply changing the uuid of your component?

Thanks, will try it out