polymer-rails 0.1.8 → 0.1.9
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 +26 -4
- data/app/assets/javascripts/polymer/layout.html +2 -2
- data/app/assets/javascripts/polymer/platform.js +6 -6
- data/app/assets/javascripts/polymer/polymer.js +4 -4
- data/lib/polymer-rails/engine.rb +0 -13
- data/lib/polymer-rails/railtie.rb +19 -0
- data/lib/polymer-rails/version.rb +1 -1
- data/lib/polymer-rails.rb +1 -0
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd5a510d75e8e7cfcfc0246011b9880587b857b4
|
4
|
+
data.tar.gz: 6db0ec455525457777f09695d25aafbb16168937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 443cc85bb6c92b01b508d4477722ab8e0703ca9c8215579fd9a15502d2f4caece067cfca131c435cb7f84538f4d9d47599ba5ee1e43291e54fce9c1a47287e8a
|
7
|
+
data.tar.gz: 58ab08303ef5c3c8eb0d8958147962a4bf92cfe6965f7167e2ead856f0ba9dc97a998ec89fdb17525ea24f4abef4f8340566d7b7c8a638b27467fec65f5d134c
|
data/README.md
CHANGED
@@ -20,21 +20,43 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
+
#### Installation
|
24
|
+
|
23
25
|
$ rails g polymer:install
|
24
26
|
|
25
|
-
This generator adds `//= require polymer/platform` into `application` manifest file
|
26
|
-
`app/assets/components` and `
|
27
|
+
- This generator adds `//= require polymer/platform` into `application.js` manifest file
|
28
|
+
- Creates `app/assets/components` and `application.html` manifest file where you can include all your components.
|
29
|
+
- Creates `vendor/assets/components` directory for third-party web components.
|
30
|
+
|
31
|
+
After running `rails g polymer:install`, add `<%= html_import_tag 'application'%>` line into your layout,
|
32
|
+
to import web components manifest to your app.
|
33
|
+
|
34
|
+
#### Creating a component
|
27
35
|
|
28
36
|
$ rails g polymer:component <component-name>
|
29
37
|
|
30
|
-
This generates new `<component-name>` component directory and .html file of the same name under `app/assets/components`
|
38
|
+
This generates new `<component-name>` component directory and .html file of the same name under `app/assets/components` folder.
|
39
|
+
|
40
|
+
Add your component to manifest file after requiring polymer:
|
41
|
+
|
42
|
+
//
|
43
|
+
//= require polymer/polymer
|
44
|
+
//= require component-name/component-name
|
31
45
|
|
32
|
-
|
46
|
+
And you can use your component in Rails application!
|
47
|
+
|
48
|
+
## Example
|
33
49
|
|
34
50
|
See example Rails application here [http://polymer-rails-example.herokuapp.com/](http://polymer-rails-example.herokuapp.com/)
|
35
51
|
|
36
52
|
Source code can be found here [https://github.com/alchapone/polymer-rails-example](https://github.com/alchapone/polymer-rails-example)
|
37
53
|
|
54
|
+
## Learn more
|
55
|
+
|
56
|
+
Polymer team is working on set of core element which you can learn more about here http://www.polymer-project.org/docs/elements/core-elements.html
|
57
|
+
|
58
|
+
Also you can check out http://customelements.io/ or http://component.kitchen/ to see what components are already built by community.
|
59
|
+
|
38
60
|
## Contributing
|
39
61
|
|
40
62
|
1. Fork it ( http://github.com/alchapone/polymer-rails/fork )
|
@@ -157,7 +157,7 @@ html /deep/ [layout][start] {
|
|
157
157
|
align-items: flex-start;
|
158
158
|
}
|
159
159
|
|
160
|
-
html /deep/ [layout][center] {
|
160
|
+
html /deep/ [layout][center], html /deep/ [layout][center-center] {
|
161
161
|
-ms-flex-align: center;
|
162
162
|
-webkit-align-items: center;
|
163
163
|
align-items: center;
|
@@ -177,7 +177,7 @@ html /deep/ [layout][start-justified] {
|
|
177
177
|
justify-content: flex-start;
|
178
178
|
}
|
179
179
|
|
180
|
-
html /deep/ [layout][center-justified] {
|
180
|
+
html /deep/ [layout][center-justified], html /deep/ [layout][center-center] {
|
181
181
|
-ms-flex-pack: center;
|
182
182
|
-webkit-justify-content: center;
|
183
183
|
justify-content: center;
|