• There's a coder that coded a program in coffeescript that i would like ported to nodebb. Are there any issues with coding nodebb plugins in coffeescript?

  • Community Rep

    @frissdiegurke is the coffeescript expert. Check out his plugins and https://github.com/frissdiegurke/nodebb-grunt-development

    I don't actually know anything about coffeescript except that it sounds delicious.

  • Plugin & Theme Dev

    In general: CoffeeScript gets compiled into JavaScript thus it's compatible to everything that requires JavaScript (like Node.js which powers NodeBB).

    The master branch of nodebb-grunt-development however isn't doing best to use CoffeeScript with Node.js (since I wrote it when I was absolutely new to node.js), it's concatenating coffee-files and compiling afterwards. Thus not allowing to use node.js require-structure within one module.

    The rework branch however attempts to improve this (and abstract of just CoffeeScript support in advantage of providing features for any kind of development tools). It's not finished yet since I've been busy with other sort of things lately (6 months o_O I have to get back to it some time soon I guess xD ).

    So for now it might be the best for you to create your own grunt-tasks in order to compile CoffeeScript (at least if you need multiple internal files connected with node.js require).

  • Thanks for the answer ūüôā

  • Global Moderator

    I hate CoffeeScript, and think no one should be using it, especially since all of the features it has are available in ES2015. I think it's toxic to the JavaScript community as a whole, being only a way for Ruby developers to feel comfortable without really learning the language they're using.

    Just gonna leave that there.

  • Plugin & Theme Dev

    @pitaj But wouldn't that imply "ES2015 is toxic to the JavaScript community as a whole"?

    I don't wanna offend, In my opinion CoffeeScript is obsolete once ES6 is broadly usable.
    In fact I returned to plain JS in most of my recent projects (not using ES6 yet). But I don't think it's toxic. I think it had his role in driving ES to 2015 and still is a way of porting most of ES6 features to ES5.

    And I have to say there are some aspects of ES6 I feel toxic about:

    var obj = {
      // Shorthand for ‚Äėhandler: handler‚Äô



    but all in all great job ūüėĄ

    Binary and Octal Literals

    It was about time xD

  • NodeBB Admin

  • Global Moderator


    In my opinion CoffeeScript is obsolete once ES6 is broadly usable

    It is, with Babel. Babel transpiles ES6 into ES5, which is essentially making CS completely obsolete.

  • Coffeescript might be dead in a few years, but I still love it and feel it has a solid place in the JS community at present. At my work work we converted from using plain Javascript to Typescript for almost a year now, but I still use Coffeescript when bashing out a quick script or test file. I love the syntax..it's very relatable to Python or Ruby.

    And plus I just love do something if something? syntax.


Suggested Topics

  • 1
  • 1
  • 3
  • 5
  • 2
| |