Build separate nb generation & PacletInfo

The nb generation and PacletInfo are likely to separated in the future
so you I have started by separating them in the function.