Skip to content

Instantly share code, notes, and snippets.

@johnrc
Last active February 4, 2016 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnrc/f4da2e7d9f8fcfd53fae to your computer and use it in GitHub Desktop.
Save johnrc/f4da2e7d9f8fcfd53fae to your computer and use it in GitHub Desktop.
Tips for publishing to npm

Windows

On Windows, you normally checkout with crlf line endings. When publishing to npm, you don't want this as it will break on *nix. Here's how to prevent:

git clone -c core.autocrlf=false https://github.com/org/npm-module.git
cd npm-module
# test it
npm pack
npm publish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment