swannodette/mori — pull request #17 by michaelsbradleyjr (2013-05-06 07:59:41+00:00)
Title: Enhance the node-isms

Closes #16.

I've cooked up a pull request that I hope you'll find helpful with respect to `package.json` and other node-isms.

Some explanatory notes follow. If you're not keen on anything I've changed or added, please let me know and I'll revise my `bump-snapshot` branch accordingly.

#### .gitignore and .npmignore

I expanded `.gitignore` just a bit. Implementing `.npmignore` helps the published node module to be squeaky clean and contain only what's needed. I've tested it with `npm pack ...` to make sure it works correctly.

#### .travis.yml

Travis CI is popular in the Node.js community and I put some effort into making sure that `mori` can build properly in the context of Travis' automated testing.

All you would need to do is setup Travis to point at your GitHub repo and it should just work.

#### README.md

I made some basic revisions to bring it up to date, though you may want to tune it further. For example, perhaps it's no longer necessary to say "pre-pre-pre alpha."

There is now a Travis build-badge at the top of the README, but it won't work unless/until you setup Travis to point at your `mori` repo.

#### get_lein.js and lein_prefer

The idea is to cut down on the number of steps that Node.js devs need to go through to hack on `mori`. If an up-to-date `lein` is already installed and available on the path, it's used instead.

These scripts don't apply to Windows environments as I don't yet know enough Powershell syntax.

#### epl-v10.html

It's common practice in the Node.js community to include a license file in published modules, so I stuck `epl-v10.html` in the root of the project. It will be included in the tarball when you run `npm publish`.

#### package.json

Bumped the `version` key to `0.2.0-snapshot`, matching `project.clj`. It's common practice in the Node.js community to have the version number in the master branch "bumped" from the last tagged release, and to have `-pre` appended to it. However, `-snapshot` works just as well and matches the Clojure convention.

I also touched up the formatting a bit per some conventions found in other popular Node.js modules.

The `scripts` section has been expanded.

#### project.clj

Bumped to `0.2.0-SNAPSHOT`. Revised the output file names a bit. Could probably use further review.

#### build*.sh, build.ps1

The build scripts have been refactored, and match up with the `scripts` section of `package.json`.

#### spec/mori-spec.js

I used the examples in the README to build some tests. You can invoke them by running `npm test` or `jasmine-node spec` in the root of the project.

You don't have to have `jasmine-node` installed globally, so long as you've run `npm install .` in the project's root. `jasmine-node` is a "dev dependency" and doesn't get installed when someone simply does `npm install mori`.

Having some basic tests is a nice way to make sure that the builds are working properly, especially in light of automated builds per Travis CI.

#### Looking toward to version 0.2.0

If/when you pick up some or all of my revisions, it should be dead simple to publish version `0.2.0`. Just remove the `-snapshot` and `-SNAPSHOT` in `package.json` and `project.clj` respectively; then tag a release on the master branch and run `npm publish`.