themeable 1.1.1 → 1.1.2
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 +10 -1
- data/lib/themeable/command.rb +1 -1
- data/lib/themeable/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: a5bb1e6b2529b268b42b182e56d116fd3042b39d
|
|
4
|
+
data.tar.gz: 53be1d6079a7649c9959f014fb8a82cb74739d2e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aefe05ff70f16555425df60467819202ddda9fd8e54e834a0b79ef35e9aaf3292a84c8db790b2334d221af024ae973639e3376f1adf6016bcc2d67973d05dbc6
|
|
7
|
+
data.tar.gz: 2f49155a947215bd03deea16dcd25651796f0296c6a3f760acb5c28b37cf3e08dbbbcb872d3c2f26309e99a7ec35129b3356f0a731c73610ca59f3517219f499
|
data/README.md
CHANGED
|
@@ -58,6 +58,14 @@ To require vendor files, do it as this:
|
|
|
58
58
|
|
|
59
59
|
*= require my_theme/xxx/xxx
|
|
60
60
|
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
To resolve vendor files relative asset path, you should do like this:
|
|
64
|
+
|
|
65
|
+
rake resolve:css_path
|
|
66
|
+
|
|
67
|
+
Some vendor files have relative urls in the CSS files for imports, images, etc. Rails prefers using helper methods for linking to assets within CSS. Relative paths can cause issues when assets are precompiled for production.
|
|
68
|
+
|
|
61
69
|
### Use your theme in your Rails project
|
|
62
70
|
|
|
63
71
|
Add gem to Rails app:
|
|
@@ -154,7 +162,7 @@ In your Rails project, if you feel `theme_my_theme` is not perfect, and want to
|
|
|
154
162
|
create lib/templates/erb/scaffold/my_theme/default/new.html.erb
|
|
155
163
|
create lib/templates/erb/scaffold/my_theme/default/show.html.erb
|
|
156
164
|
|
|
157
|
-
### Set `
|
|
165
|
+
### Set `theme_my_theme` as default theme
|
|
158
166
|
|
|
159
167
|
If you feel each time to generate scaffold controller has to provide `--theme=my_theme` is annoying, now you can set a default value like this:
|
|
160
168
|
|
|
@@ -174,5 +182,6 @@ in config/application.rb, add `config.generators.theme = :my_theme`
|
|
|
174
182
|
|
|
175
183
|
|
|
176
184
|
|
|
185
|
+
|
|
177
186
|
|
|
178
187
|
|
data/lib/themeable/command.rb
CHANGED
|
@@ -37,7 +37,7 @@ module Themeable
|
|
|
37
37
|
|
|
38
38
|
# rakes
|
|
39
39
|
template 'resolve_css_path.rake', "lib/tasks/resolve_css_path.rake"
|
|
40
|
-
|
|
40
|
+
append_to_file 'Rakefile' do
|
|
41
41
|
<<-CODE
|
|
42
42
|
require '#{app_name}'
|
|
43
43
|
Dir.glob('lib/tasks/*.rake').each { |r| load r}
|
data/lib/themeable/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: themeable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- xiaohui
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-10-
|
|
11
|
+
date: 2016-10-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|