Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daniel Rodríguez Rivero
    @danielo515
    But it makes no sense to declare a variable that is not going to be used in any way
    Cerem Cem ASLAN
    @ceremcem
    or, absolutely:
    x = -> 
      return 
        * a: 1
          b: 2
        * a: 2
          b: 6
    
    x!
    Daniel Rodríguez Rivero
    @danielo515
    I didn't know you can use return, my bad
    Daniel Rodríguez Rivero
    @danielo515
    Hello people
    One small question
    How do you write something similar to JSDocs in livescript ?
    I want to extract documentation from my comments
    Cerem Cem ASLAN
    @ceremcem
    I think there is no way unless a little hack is introduced:
    hello = (x) -> 
        ``
        /**
         * Create a point.
         * @param {number} x - The x value.
         * @param {number} y - The y value.
         */
        ``
        x * 2
    Daniel Rodríguez Rivero
    @danielo515
    But what does that produce ? A function with that string literal inside right ?
    I don't mind to use something different from JSDOCS as long as I can produce documentation from code
    Cerem Cem ASLAN
    @ceremcem
    hmm, I thought you need to use JSDocs... ok
    you are okay with anything that gives you the documentation
    Daniel Rodríguez Rivero
    @danielo515
    Yes I am, but I don't know which tools are available for LS
    Maybe if JSDOC could be configured to decide which comment token to use...
    but anyway, is there a tool for LS ?
    Cerem Cem ASLAN
    @ceremcem
    I'm not using those type of tools, so I don't know. But I'm pretty sure that JSDocs can be used as is
    Daniel Rodríguez Rivero
    @danielo515
    Ok thanks, I'll give it a try !
    Daniel Rodríguez Rivero
    @danielo515
    At the end I had to write a custom JSDOC plugin to make it understand ls files
    Daniel Rodríguez Rivero
    @danielo515
    Here are the requirements to make it work
    Cerem Cem ASLAN
    @ceremcem
    looks promising!
    Cerem Cem ASLAN
    @ceremcem
    1.6.0! :tada:
    ven
    @vendethiel
    :clap:
    cyberco
    @cyberco

    Hey Folks! I didn't know about this room but it's great to see LiveScript is still alive. I've been using it for a number of years now with great pleasure for a lot of projects. So thanks!
    I never dove into the deep implementation details of LiveScript so forget me if I'm asking something newbie. I'm using require as in m = require 'mithril'but now I'd like to switch to the ES6 way with import. One of the reasons being that in a webpack config file this doesn't work:

        new webpack.ProvidePlugin do
            m: 'mithril'

    This is supposedly due to the fact that it's incompatible with require. I'm not so sure, but it got me wondering whether LiveScript compiles to ES5 or something later. As I said, sorry if this is too newbie for you guys. :)

    Antti Korpi
    @anko
    @cyberco ES6 import is not in LiveScript yet. Discussion here: gkz/LiveScript#705 You might want to help test-drive https://github.com/bartosz-m/livescript-transform-esm (which approach is to transform existing livescript code) or https://github.com/dk00/livescript-next (which aims to prototype for a future livescript version).