thematic 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/lib/thematic/tasks/thematic.rake +8 -10
- data/lib/thematic/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: 449212ed6179813cd5dbdcf4f385f8d494a68e81
|
4
|
+
data.tar.gz: 4f90ff7035688cf9d4386f4bc996ab9572f24b67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c50cc05fdc65b389f75c15aa7da049dad5797a7f9e08d7e1c0c077baeda9d3d3d0a652f2b3460bb12fec8b09a417820b036b4abe9f1a01444ed0395f9491bacf
|
7
|
+
data.tar.gz: b1488a54b1bb1da2898abc25c62bc71f0684104e6578bf2f64510cc433b6f05d56d00661dc5574b0c1024fb4cc900d4a4b9d8842e0b4c130323e737ca9eed9f2
|
data/README.md
CHANGED
@@ -12,11 +12,13 @@ Add this line to your application's Gemfile:
|
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
+
You can watch a [video demo!](https://vimeo.com/126414898) of Thematic being used in action.
|
16
|
+
|
15
17
|
Navigate to the root folder of your application, and run the following command:
|
16
18
|
|
17
19
|
rake thematic:install[../relative/path/to/the/root/folder/of/your/theme]
|
18
20
|
|
19
|
-
The root folder of your theme should be the one that contains the folders 'css' and 'js', as is standard in
|
21
|
+
The root folder of your theme should be the one that contains the folders 'css', 'img', and 'js', as is standard in many themes.
|
20
22
|
|
21
23
|
You can also automatically grab an entire HTML template from the theme as well, and copy it into your app/views/layouts/application.html.erb. (WARNING: THIS WILL OVERWRITE ANY CUSTOM CODE YOU HAVE THERE. So this is something you would do early on in your project.) To do so, run this command:
|
22
24
|
|
@@ -26,7 +28,13 @@ The installation only copies JavaScript from the JS folder, but if there are add
|
|
26
28
|
|
27
29
|
rake thematic:plugin[../relative/path/to/your/plugin/folder]
|
28
30
|
|
29
|
-
|
31
|
+
By default, it is assumed that the images are found in a folder called 'img', and that the JavaScript is found in a folder called 'js', but if either of these are not the case, you can specify as such in IMAGES and JAVASCRIPT environment variables. For example, if the images folder was called 'images', and the JavaScript folder was called 'javascripts', you'd run the command as follows:
|
32
|
+
|
33
|
+
rake thematic:install[../relative/path/to/the/root/folder/of/your/theme] IMAGES=images JAVASCRIPT=javascripts
|
34
|
+
|
35
|
+
Thematic, by default, will create subfolders throughout your application called 'theme'. If you want to choose a different name for that subfolder, can do so with the THEME environment variable. For example:
|
36
|
+
|
37
|
+
rake thematic:install[../relative/path/to/the/root/folder/of/your/theme] THEME=cowabunga
|
30
38
|
|
31
39
|
## Contributing
|
32
40
|
|
@@ -10,13 +10,9 @@ namespace :thematic do
|
|
10
10
|
|
11
11
|
# We will search the entire theme and all subfolders for all css files
|
12
12
|
copy_from_path = args[:filepath]
|
13
|
-
theme_subfolder = "theme"
|
14
|
-
|
15
|
-
|
16
|
-
images_folder = "img"
|
17
|
-
elsif File.exist?("#{args[:filepath]}/images")
|
18
|
-
images_folder = "images"
|
19
|
-
end
|
13
|
+
theme_subfolder = ENV["THEME"] || "theme"
|
14
|
+
images_folder = ENV["IMAGES"] || "img"
|
15
|
+
javascript_folder = ENV["JAVASCRIPT"] || "js"
|
20
16
|
|
21
17
|
FileUtils.remove_dir "vendor/assets/stylesheets/#{theme_subfolder}" if File.exist?("vendor/assets/stylesheets/#{theme_subfolder}")
|
22
18
|
FileUtils.mkdir "vendor/assets/stylesheets/#{theme_subfolder}"
|
@@ -50,7 +46,7 @@ namespace :thematic do
|
|
50
46
|
puts "Installing JS..."
|
51
47
|
|
52
48
|
# We will only search the js folder for js files; plugins can be added via the plugin task below
|
53
|
-
copy_from_path = "#{args[:filepath]}
|
49
|
+
copy_from_path = "#{args[:filepath]}/#{javascript_folder}"
|
54
50
|
|
55
51
|
FileUtils.remove_dir "vendor/assets/javascripts/#{theme_subfolder}" if File.exist?("vendor/assets/javascripts/#{theme_subfolder}")
|
56
52
|
FileUtils.mkdir "vendor/assets/javascripts/#{theme_subfolder}"
|
@@ -160,7 +156,8 @@ namespace :thematic do
|
|
160
156
|
|
161
157
|
task :plugin, [:filepath] do |task, args|
|
162
158
|
copy_from_path = args[:filepath]
|
163
|
-
theme_subfolder = "theme"
|
159
|
+
theme_subfolder = ENV["THEME"] || "theme"
|
160
|
+
|
164
161
|
|
165
162
|
file_to_edit = "app/assets/javascripts/application.js"
|
166
163
|
f = File.new(file_to_edit)
|
@@ -188,7 +185,8 @@ namespace :thematic do
|
|
188
185
|
end
|
189
186
|
|
190
187
|
task :template, [:filepath] do |task, args|
|
191
|
-
theme_subfolder = "theme"
|
188
|
+
theme_subfolder = ENV["THEME"] || "theme"
|
189
|
+
images_folder = ENV["IMAGES"] || "img"
|
192
190
|
|
193
191
|
# user is expected to input which html template to copy from
|
194
192
|
sourcefile = File.open(args[:filepath], 'r')
|
data/lib/thematic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thematic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Wengrow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|