Sha256: db984861a65aeaa79c2c2c28e9b210e5f0af80decdf0a4b2c07313945be5c968

Contents?: true

Size: 673 Bytes

Versions: 2

Compression:

Stored size: 673 Bytes

Contents

list = <<-eos
    <button @click="add()">add</button>
    <button @click="remove()">remove</button>
    <ul>
      <li v-for="(item, index) in items" :key="index">
        {{item}}
      </li>
    </ul>
eos

array = <<-eos
      items: [],
eos

addandremove = <<-eos
    remove: function(){
      this.items.pop()
    },
    add: function(){
      this.items.push(this.message)
    },
eos

say "Inserted list example into component"
insert_into_file "#{PARTS_PATH}/#{name}.vue",
list, after: "<p>{{ message }}</p>\n"

insert_into_file "#{PARTS_PATH}/#{name}.vue",
addandremove, after: "methods: {\n"

insert_into_file "#{PARTS_PATH}/#{name}.vue",
array, after: "return {\n"

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
vueonrails-0.1.0 lib/generators/options/list.rb
vuejs-1.1.0.beta9 lib/generators/options/list.rb