Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to do something before task exit , what should I do? #1539

Open
huanghaiyang opened this issue Jul 27, 2016 · 1 comment
Open

I want to do something before task exit , what should I do? #1539

huanghaiyang opened this issue Jul 27, 2016 · 1 comment

Comments

@huanghaiyang
Copy link

I create a grunt plugin , when I press ctrl+c, the grunt exit , but I want to do something in the grunt plugin before the process exit.

I tried like this

grunt.registerMultiTask('task1', 'runtask', function () {
    function exitFn(){
        console.log('the task exit.')
    }
    process.on('uncaughtException', exitFn)
    process.on('exit', exitFn)
}

it's not work.

tks!

@heyayush
Copy link

#1543 Looks similar to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants