yurivictor / typebetter

Fixes typography while a user types
http://yurivictor.com/smartquotes/
BSD 3-Clause "New" or "Revised" License
71 stars 2 forks source link

Add npm and Bower config #10

Closed jgarber623 closed 9 years ago

jgarber623 commented 9 years ago

This PR does a couple things:

  1. Moves typebetter.js to a dist folder and updates the example accordingly. I figure we may as well do this now as odds are we'll want to provide a src/typebetter.js in the future and built (minified, etc.) files in dist. So this is more future planning than anything.
  2. Adds bower.json and package.json files for (eventual) publication to the Bower and npm registries.

TypeBetter isn't yet published to either registry. @yurivictor, there are a couple steps you'll need to take in order to make that happen.

When you're comfortable tagging a release (0.0.1 being the first we're working toward), you'll want to commit and push all changes to master and do a git tag v0.0.1 and git push --tags.

Prerequisites

  1. Install Node and npm (recommend using Homebrew for this): brew install node.
  2. Install Bower: npm install -g bower.

    Initial publication to Bower

  3. Push everything to master, tag the release with git tag v0.0.1 && git push --tags.
  4. bower register typebetter https://github.com/yurivictor/typebetter.git

    Initial publication to npm

  5. Sign up for an account at https://www.npmjs.com/ (if you don't already have one).
  6. Run npm adduser and follow the prompts.
  7. From the root of the project, run npm publish .

That should publish to npm and you should see the package listed on your npmjs.com profile page.

You can test that this worked by running bower install typebetter and npm install typebetter in a test folder somewhere on your computer.

Publishing subsequent releases

  1. Update bower.jsonand package.json with the new version number (e.g. 0.0.2).
  2. Commit and push all changes to master.
  3. git tag v0.0.2 && git push --tags
  4. Run npm publish from the root of the project. (Bower automatically picks up new releases based on git's tags.)
  5. :beers:

Apologies if any of the above is repetitive, obvious, or otherwise unnecessary. I wanted to be overly thorough just in case. Happy to answer any questions or help out with any problems if they arise.