Skip to content

just-fine/vue-coffee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-coffee

using CoffeeScript2 in vue project. write less code, better code.


Try coffee

  1. init project: npx @fine.sh/cs init

  2. start: npm start


How to

  • render for JSX:

    # data: () => ({ count: 0 })
    data: ->
      count: 0
    
    # handle: function() { this.count = this.count + 5 }
    handle: ->
      @count = @count + 5
    
    # '@' is 'this'
    <button on-click={@handle}>click me: {@count}</button><br/>
    
  • render with methods:

    # hello: function(h) { return (<span>hello world.</span>) }
    hello: (h) ->
      <span>hello world.</span>
    
    <p>{@hello(h)}</p>
    

Learn more


Examples

online examples


LICENSE

MIT

About

write coffee script in vue.js

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors