Midwest Dev Chat

MidwestDevChat.com

  • The newest 15 messages in the super-cool #node channel.

  • 04/09 18:14:57 Peter: Anyone here use `npm version from-git`?
  • 04/09 19:22:55 Cherise: I haven't, but I think @Leanora has some experience with versioned dependencies on git
  • 04/10 09:01:40 Cristie: I haven't used it either. I've sent version numbers the opposite direction, into git:
    git push --tags
  • 04/10 09:04:10 Cherise: yeah, that's the only way my git repos ever get version number tags
  • 04/10 10:38:53 Peter: I'm thinking I'll just do it that way - have npm bump the version and then tag/commit. Using `from-git` doesn't seem to return the correct git tag
  • 04/10 11:46:53 Cherise: Add this to your `.bash_profile`
    alias patch='pre-version && npm version patch && post-version'
    alias feature='pre-version && npm version minor && post-version'
    alias breaking='pre-version && npm version major && post-version'
    alias pre-version='git diff --exit-code && npm prune && npm install -q && npm test'
    alias post-version='(npm run build; exit 0) && git diff --exit-code && git push && git push --tags && npm publish'
    
  • 04/12 13:41:26 Leanora: sorry for the delay! I haven't used `npm version from-git` but I have used git dependencies with semver https://davistobias.com/articles/semver-ranges-...
  • 04/12 13:41:40 Leanora: the gist of it is that you write something like
    npm install --save 
    
    the important part being the `#semver:` which signals to npm to try to use semver tags when doing the git clone
  • *Usernames have been changed to protect the innocent.
We're currently 1155 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!