Move all build related boilerplate into separate npm module