add .npmignore
refactor
add npm prepublish script