sprockets-vue 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2583dcbc2d0241080f48cbfbcb39a218f8c0984f
4
- data.tar.gz: 13d556aa5b2c2b26d7fc83fe89fc18ebcfa955a2
3
+ metadata.gz: 916a3905fa210c379fde7c43f7bc50803908cfbc
4
+ data.tar.gz: dbe32c6100503aa04f2a3740e885087f658d93ad
5
5
  SHA512:
6
- metadata.gz: 430c4272966e32732e81b32aa5cf1ea810afa28d3eb6a89eed911158bcb3f5738ed990b0150747da8c1b2fc3a4c414596204b2e8c7846b8974f7fa5ee23e1a27
7
- data.tar.gz: abbc0aa85216c11b87b95c6d6ca6b61e5b587afa46d053372eacd456759f9536cb97796e80704b38434e5438975ef2d7d8f6cd99a3f006f97fd1d052e342aeae
6
+ metadata.gz: c028716c2743b9d70016299ef7f0e8747f62d58039f5d804f469e074aec069de7734d88c12b1c4b0d90ffd891694ec463c8fc36c6a333f8d8aba076b9617aa72
7
+ data.tar.gz: 3015fb7739083a05a1b12ebefcffba63b766fd80e4a09848de51c839bdaea293fee6327fc98522e83a7780dad06f431f2595b2a33b5e73a69ba8c82f7cd26948
data/README.md CHANGED
@@ -1,14 +1,31 @@
1
1
  # sprockets-vue
2
+
3
+ [![Gem](https://img.shields.io/gem/v/sprockets-vue.svg)](https://rubygems.org/gems/sprockets-vue)
4
+ [![Gem](https://img.shields.io/gem/dt/sprockets-vue.svg)](https://rubygems.org/gems/sprockets-vue)
5
+
2
6
  A [Sprockets](https://github.com/rails/sprockets) transformer that converts .vue file into js object.
3
7
 
8
+ # feature
9
+
10
+ following tag is supported in .vue file
11
+ * script (currently coffeescript only)
12
+ * template (currently html only)
13
+ * style (scss, sass and css)
14
+
4
15
  # install
5
16
  add `gem 'sprockets-vue'` to Gemfile, and run bundle, currently works with sprockets 3.
17
+
18
+ # heads up!
19
+ version 0.0.6 has incompatible change, due to bugs in previous version.
20
+
21
+ now you should assign `vm` variable to make it works!
22
+
6
23
  # example
7
24
  * index.vue
8
25
  ```vue
9
26
  //= require compents/card
10
27
  <script lang="coffee">
11
- {
28
+ vm = {
12
29
  data: ->
13
30
  search: ''
14
31
  members: []
@@ -64,25 +81,3 @@ new Vue(
64
81
 
65
82
  # advanced
66
83
  * [multi file component](https://github.com/kikyous/sprockets-vue/wiki/multi-file-component)
67
-
68
-
69
- # compiled javascript
70
-
71
- ```javascript
72
-
73
- ;if (typeof(VCompents)==='undefined')VCompents = {};
74
- VCompents['index'] = ({
75
- data: function() {
76
- return {
77
- members: [],
78
- search: ''
79
- };
80
- },
81
- methods: {
82
- clear: function() {
83
- return this.search = '';
84
- },
85
- }
86
- });
87
- ;VCompents['index'].template = '\n <div class=\"container\">\n <div class=\'search icon-input\'>\n <span class=\"search-icon glyphicon glyphicon-search\"><\/span>\n <input class=\"form-control\" type=\"text\" v-model=\'search\'>\n <span @click=\'clear\' class=\"clear-icon glyphicon glyphicon-remove\"><\/span>\n <\/div>\n <card v-for=\"m in members\" :m=\'m\'><\/card>\n <\/div>\n';
88
- ```
@@ -28,7 +28,7 @@ module Sprockets::Vue
28
28
  map = result['sourceMap']
29
29
 
30
30
  output << "'object' != typeof VCompents && (VCompents = {});
31
- VCompents['#{name}'] = #{result['js']};"
31
+ #{result['js']}; VCompents['#{name}'] = vm;"
32
32
  end
33
33
 
34
34
  if template
@@ -3,8 +3,8 @@ module Sprockets::Vue::Utils
3
3
  def node_regex(tag)
4
4
  %r(
5
5
  \<#{tag}
6
- (\s+lang=["'](?<lang>\w+)["'])?
7
- \>
6
+ (\s+lang=["'](?<lang>\w+)["'])?
7
+ \>
8
8
  (?<content>.+)
9
9
  \<\/#{tag}\>
10
10
  )mx
@@ -1,5 +1,5 @@
1
1
  module Sprockets
2
2
  module Vue
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets-vue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - kikyous
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-28 00:00:00.000000000 Z
11
+ date: 2016-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sprockets