sprockets-vue 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -23
- data/lib/sprockets/vue/script.rb +1 -1
- data/lib/sprockets/vue/utils.rb +2 -2
- data/lib/sprockets/vue/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 916a3905fa210c379fde7c43f7bc50803908cfbc
|
4
|
+
data.tar.gz: dbe32c6100503aa04f2a3740e885087f658d93ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c028716c2743b9d70016299ef7f0e8747f62d58039f5d804f469e074aec069de7734d88c12b1c4b0d90ffd891694ec463c8fc36c6a333f8d8aba076b9617aa72
|
7
|
+
data.tar.gz: 3015fb7739083a05a1b12ebefcffba63b766fd80e4a09848de51c839bdaea293fee6327fc98522e83a7780dad06f431f2595b2a33b5e73a69ba8c82f7cd26948
|
data/README.md
CHANGED
@@ -1,14 +1,31 @@
|
|
1
1
|
# sprockets-vue
|
2
|
+
|
3
|
+
[](https://rubygems.org/gems/sprockets-vue)
|
4
|
+
[](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
|
-
```
|
data/lib/sprockets/vue/script.rb
CHANGED
data/lib/sprockets/vue/utils.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|