Using NPM programmatically