shlomiassaf / ng-cli-packagr-tasks

Tasks & Workflow for ng-packagr.
MIT License
31 stars 6 forks source link

Function returning hook not working as expected #22

Open GerkinDev opened 3 years ago

GerkinDev commented 3 years ago

Hi,

Following your own example here, I did not managed to execute custom hooks.

I've solved my issue by manually registering my hook in the registry like so:


module.exports = ( ctx: NgPackagerHooksContext, registry: HookRegistry ) => {
    registry.register( 'initTsConfig', {
        after: async taskContext => {
            // ...
        },
    } );
};

Is the readme outdated ?

pearnaly commented 2 years ago

Same here! (Windows 10, node v14.18.1, npm 6.14.15, ng-cli-packagr-tasks 11.0.2).

Thank you @GerkinDev for the Workaround!