Skip to content

Commit

Permalink
update vue
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Mar 28, 2014
1 parent a78cb3c commit 93fca1c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions coffee/menu.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
app = require './app'
Vue = require 'vue'

Vue.directive 'focus-editable',
bind: -> setTimeout =>
range = document.createRange()
sel = window.getSelection()
target = @el
range.setStartBefore target
range.setEndAfter target
sel.removeAllRanges();
sel.addRange(range);
@el.focus()

app.menu = new Vue
el: '#menu'
data: app.get 'menu'
Expand Down Expand Up @@ -35,14 +46,3 @@ app.menu = new Vue
@$data.working.splice index, 1
removeHistory: (index) ->
@$data.history.splice index, 1

Vue.directive 'focus-editable',
bind: -> setTimeout =>
range = document.createRange()
sel = window.getSelection()
target = @el
range.setStartBefore target
range.setEndAfter target
sel.removeAllRanges();
sel.addRange(range);
@el.focus()
2 changes: 1 addition & 1 deletion make.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ station.start()

command = (code) -> exec code, async: yes

target.dev = ->
target.watch = ->
fs.watch 'coffee', interval: 300, (type, filename) ->
if type in ['create', 'change']
exec "coffee -o js/ -bc coffee/#{filename}"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {},
"devDependencies": {
"moment": "~2.5.1",
"vue": "~0.9.3",
"vue": "~0.10.3",
"cirru-html": "~0.1.4"
}
}

0 comments on commit 93fca1c

Please sign in to comment.