cyclejs-community/cycle-canvas

Release v0.1.0

Closed this issue · 3 comments

Here is a list of what I think we need to do to release v0.1.0:

package.json

  • Replace all instances of "cycle-hot-reloading-example" with "cycle-canvas"
  • Set version to v0.1.0
  • Everything in dependencies should be in devDependencies. (we don't actually use any of it in the driver, just examples)
  • Add some scripts to compile our es6 to es5 prior to release. These will hook into the npm publish step
   "scripts": {
     "start": "babel-node ./examples/flappy-bird/server.js",
     "test": "mocha --compilers js:babel-register",
     "bundle": "browserify ./examples/flappy-bird/index.js -t babelify -t uglifyify -o bundle.js",
+    "precompile-lib": "rm -rf lib/ && mkdir -p lib",
+    "compile-lib": "babel src -d lib",
+    "prepublish": "npm run compile-lib"
   },
  • Change the main file to point at the compiled es5 code (src/canvas-driver.js -> lib/canvas-driver.js)
  • Add a files array with lib/ so that it gets included in the compiled package
+   "files": [
+     "lib/"
+   ],

After all that is done we need to test that the module can be installed locally.

  • Run npm link in the cycle-canvas directory
  • Copy one of the example projects to a directory outside the cycle-canvas directory
  • Run npm link cycle-canvas in the copied example directory
  • If you ls node_modules/cycle-canvas, you should see the cycle-canvas code, including the lib directory
  • Change the example to import from cycle-canvas instead of the relative path.
  • You should be able to run the example and it should import cycle-canvas successfully

After we've tested that we can install our module locally we're almost ready for release.

  • Push all changes up and check that travis passes
  • git tag v0.1.0
  • git push origin master --tags
  • npm adduser (you should only have to do this the first time and you'll need an npm account)
  • npm publish (exciting!)
  • try npm install cycle-canvas in the copied example project
  • celebrate! 🎉
  • tell the world!

I think that's everything, but there's a good chance I've missed something. Give it a go and let me know how you get on!

Everything is looking good! I didn't notice a travis file in the repository. It's on npm and working! Thanks for your detailed list. It helped a lot.

Awesome work! I've tested this with the flappy bird example and it works great! Congratulations on your first npm package!

You're right about the lack of travis, my bad! Would you be interested in tackling tests next?

I'll close this now, since v0.1.0 is out!

Thanks for the kind words! I would be interested in tackling tests!