Can I write npm package in CoffeeScript?

I’m going to suggest that you write your package in coffeescript, but only publish it in javascript. I do it like this:

  • coffeescript code goes in src
  • code is compiled to lib
  • src is committed to my git repo, lib is in my .gitignore
  • lib is published to npm, src is in my .npmignore
  • the coffee-script package is in my devDependencies

You can take a look at a simple package of mine, refix, for inspiration:

  • https://github.com/linus/refix
  • npm install refix

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)