frontend-generators 0.0.1 → 0.0.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 +47 -3
- data/assets/bootstrap/{fonts → public/fonts}/glyphicons-halflings-regular.eot +0 -0
- data/assets/bootstrap/{fonts → public/fonts}/glyphicons-halflings-regular.svg +0 -0
- data/assets/bootstrap/{fonts → public/fonts}/glyphicons-halflings-regular.ttf +0 -0
- data/assets/bootstrap/{fonts → public/fonts}/glyphicons-halflings-regular.woff +0 -0
- data/assets/bootstrap/{fonts → public/fonts}/glyphicons-halflings-regular.woff2 +0 -0
- data/assets/bootstrap/{bootstrap.js → vendor/assets/javascripts/bootstrap.js} +0 -0
- data/assets/bootstrap/{bootstrap.css → vendor/assets/stylesheets/bootstrap.css} +0 -0
- data/assets/creative/app/assets/images/creative/header.jpg +0 -0
- data/assets/creative/app/assets/images/creative/portfolio/1.jpg +0 -0
- data/assets/creative/app/assets/images/creative/portfolio/2.jpg +0 -0
- data/assets/creative/app/assets/images/creative/portfolio/3.jpg +0 -0
- data/assets/creative/app/assets/images/creative/portfolio/4.jpg +0 -0
- data/assets/creative/app/assets/images/creative/portfolio/5.jpg +0 -0
- data/assets/creative/app/assets/images/creative/portfolio/6.jpg +0 -0
- data/assets/creative/app/assets/javascripts/creative/cbpAnimatedHeader.js +44 -0
- data/assets/creative/app/assets/javascripts/creative/classie.js +84 -0
- data/assets/creative/app/assets/javascripts/creative/creative.js +53 -0
- data/assets/creative/app/assets/javascripts/creative/creative_mainfest.js +11 -0
- data/assets/creative/app/assets/javascripts/creative/jquery.easing.min.js +44 -0
- data/assets/creative/app/assets/javascripts/creative/jquery.fittext.js +43 -0
- data/assets/creative/app/assets/javascripts/creative/manifest.js +11 -0
- data/assets/creative/app/assets/javascripts/creative/wow.min.js +2 -0
- data/assets/creative/app/assets/stylesheets/creative/animate.min.css +6 -0
- data/assets/creative/app/assets/stylesheets/creative/creative.css.scss +476 -0
- data/assets/creative/app/assets/stylesheets/creative/manifest.css +8 -0
- data/assets/creative/app/controllers/creatives_controller.rb +6 -0
- data/assets/creative/app/views/creatives/_bg_primary.html.erb +13 -0
- data/assets/creative/app/views/creatives/_call_to_action.html.erb +9 -0
- data/assets/creative/app/views/creatives/_contact.html.erb +20 -0
- data/assets/creative/app/views/creatives/_header.html.erb +11 -0
- data/assets/creative/app/views/creatives/_navbar.html.erb +35 -0
- data/assets/creative/app/views/creatives/_portfolio.html.erb +97 -0
- data/assets/creative/app/views/creatives/_services.html.erb +43 -0
- data/assets/creative/app/views/creatives/index.html.erb +8 -0
- data/assets/creative/app/views/layouts/creative.html.erb +18 -0
- data/assets/font_awesome/{fonts → public/fonts}/FontAwesome.otf +0 -0
- data/assets/font_awesome/{fonts → public/fonts}/fontawesome-webfont.eot +0 -0
- data/assets/font_awesome/{fonts → public/fonts}/fontawesome-webfont.svg +0 -0
- data/assets/font_awesome/{fonts → public/fonts}/fontawesome-webfont.ttf +0 -0
- data/assets/font_awesome/{fonts → public/fonts}/fontawesome-webfont.woff +0 -0
- data/assets/font_awesome/{fonts → public/fonts}/fontawesome-webfont.woff2 +0 -0
- data/assets/font_awesome/{font_awesome.css → vendor/assets/stylesheets/font_awesome.css} +0 -0
- data/assets/stylish_portfolio/app/assets/images/stylish_portfolio/bg.jpg +0 -0
- data/assets/stylish_portfolio/app/assets/images/stylish_portfolio/callout.jpg +0 -0
- data/assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-1.jpg +0 -0
- data/assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-2.jpg +0 -0
- data/assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-3.jpg +0 -0
- data/assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-4.jpg +0 -0
- data/assets/stylish_portfolio/app/assets/javascripts/manifest.js +6 -0
- data/assets/stylish_portfolio/app/assets/javascripts/stylish_portfolio.js +29 -0
- data/assets/stylish_portfolio/app/assets/stylesheets/manifest.css +6 -0
- data/assets/stylish_portfolio/app/assets/stylesheets/stylish_portfolio.css.scss +239 -0
- data/assets/stylish_portfolio/app/controllers/stylish_portfolios_controller.rb +6 -0
- data/assets/stylish_portfolio/app/views/layouts/stylish_portfolio.html.erb +15 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_about.html.erb +10 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_call_to_action.html.erb +11 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_callout.html.erb +5 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_footer.html.erb +30 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_header.html.erb +8 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_map.html.erb +8 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_navigation.html.erb +24 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_portfolio.html.erb +45 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/_services.html.erb +69 -0
- data/assets/stylish_portfolio/app/views/stylish_portfolios/index.html.erb +9 -0
- data/frontend-generators.gemspec +2 -0
- data/lib/frontend_generators/assets_copier.rb +56 -0
- data/lib/frontend_generators/version.rb +1 -1
- data/lib/frontend_generators.rb +3 -2
- data/lib/tasks/add_assets.rake +16 -2
- metadata +81 -18
- data/lib/frontend_generators/bootstrap.rb +0 -38
- data/lib/frontend_generators/font_awesome.rb +0 -30
@@ -0,0 +1,56 @@
|
|
1
|
+
module FrontendGenerators; class AssetsCopier
|
2
|
+
|
3
|
+
attr_reader :local_asset_dirname
|
4
|
+
|
5
|
+
# local_asset_dirname is assets/bootstrap/ or assets/font_awesome/
|
6
|
+
|
7
|
+
def initialize(local_asset_dirname, destination_root = Rails.root)
|
8
|
+
@local_asset_dirname = local_asset_dirname
|
9
|
+
@destination_root = destination_root
|
10
|
+
end
|
11
|
+
|
12
|
+
def copy_assets
|
13
|
+
local_assets.each do |local_asset_path|
|
14
|
+
d = destination_asset_dirname(local_asset_path)
|
15
|
+
p message(local_asset_path)
|
16
|
+
FileUtils.mkdir_p(d)
|
17
|
+
copy_asset(local_asset_path)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def message(local_asset_path)
|
22
|
+
puts "#{Rainbow("create").green} #{destination_truncated_path(local_asset_path)}"
|
23
|
+
end
|
24
|
+
|
25
|
+
def local_assets_root
|
26
|
+
"#{root}/#{local_asset_dirname}"
|
27
|
+
end
|
28
|
+
|
29
|
+
def local_assets
|
30
|
+
Dir.glob("#{local_assets_root}**/*").select{|f| File.file?(f)}
|
31
|
+
end
|
32
|
+
|
33
|
+
def destination_asset_dirname(local_asset_path)
|
34
|
+
p = local_asset_path.gsub(local_assets_root, destination_root)
|
35
|
+
File.dirname(p)
|
36
|
+
end
|
37
|
+
|
38
|
+
def destination_truncated_path(local_asset_path)
|
39
|
+
local_asset_path.gsub(local_assets_root, "")
|
40
|
+
end
|
41
|
+
|
42
|
+
def copy_asset(local_asset_path)
|
43
|
+
destination = destination_asset_dirname(local_asset_path)
|
44
|
+
FileUtils.cp(local_asset_path, destination)
|
45
|
+
end
|
46
|
+
|
47
|
+
def root
|
48
|
+
File.expand_path("../../", File.dirname(__FILE__))
|
49
|
+
end
|
50
|
+
|
51
|
+
def destination_root
|
52
|
+
"#{@destination_root}/"
|
53
|
+
end
|
54
|
+
|
55
|
+
end; end
|
56
|
+
|
data/lib/frontend_generators.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "frontend_generators/version"
|
2
|
-
require_relative "./frontend_generators/
|
3
|
-
|
2
|
+
require_relative "./frontend_generators/assets_copier.rb"
|
3
|
+
|
4
|
+
require "rainbow"
|
4
5
|
|
5
6
|
module FrontendGenerators
|
6
7
|
|
data/lib/tasks/add_assets.rake
CHANGED
@@ -2,12 +2,26 @@ namespace :add_assets do
|
|
2
2
|
|
3
3
|
desc "Add Bootstrap assets to your project"
|
4
4
|
task :bootstrap do
|
5
|
-
FrontendGenerators::
|
5
|
+
copier = FrontendGenerators::AssetsCopier.new("assets/bootstrap/")
|
6
|
+
copier.copy_assets
|
6
7
|
end
|
7
8
|
|
8
9
|
desc "Add Font-Awesome assets to your project"
|
9
10
|
task :font_awesome do
|
10
|
-
FrontendGenerators::
|
11
|
+
copier = FrontendGenerators::AssetsCopier.new("assets/font_awesome/")
|
12
|
+
copier.copy_assets
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "Add stylish_portfolio to your project"
|
16
|
+
task :stylish_portfolio do
|
17
|
+
copier = FrontendGenerators::AssetsCopier.new("assets/stylish_portfolio/")
|
18
|
+
copier.copy_assets
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Add Start Bootstrap Creative to your project"
|
22
|
+
task :creative do
|
23
|
+
copier = FrontendGenerators::AssetsCopier.new("assets/creative/")
|
24
|
+
copier.copy_assets
|
11
25
|
end
|
12
26
|
|
13
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frontend-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MrPowers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rainbow
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.0.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.0.0
|
69
83
|
description: There are separate Ruby gems to access Bootstrap and Font Awesome in
|
70
84
|
your Rails application, but they can be annoying when it comes time to deploy or
|
71
85
|
when you want to look at the source code. These rake tasks actually move the source
|
@@ -83,26 +97,75 @@ files:
|
|
83
97
|
- LICENSE.txt
|
84
98
|
- README.md
|
85
99
|
- Rakefile
|
86
|
-
- assets/bootstrap/
|
87
|
-
- assets/bootstrap/
|
88
|
-
- assets/bootstrap/fonts/glyphicons-halflings-regular.
|
89
|
-
- assets/bootstrap/fonts/glyphicons-halflings-regular.
|
90
|
-
- assets/bootstrap/fonts/glyphicons-halflings-regular.
|
91
|
-
- assets/bootstrap/
|
92
|
-
- assets/bootstrap/
|
93
|
-
- assets/
|
94
|
-
- assets/
|
95
|
-
- assets/
|
96
|
-
- assets/
|
97
|
-
- assets/
|
98
|
-
- assets/
|
99
|
-
- assets/
|
100
|
+
- assets/bootstrap/public/fonts/glyphicons-halflings-regular.eot
|
101
|
+
- assets/bootstrap/public/fonts/glyphicons-halflings-regular.svg
|
102
|
+
- assets/bootstrap/public/fonts/glyphicons-halflings-regular.ttf
|
103
|
+
- assets/bootstrap/public/fonts/glyphicons-halflings-regular.woff
|
104
|
+
- assets/bootstrap/public/fonts/glyphicons-halflings-regular.woff2
|
105
|
+
- assets/bootstrap/vendor/assets/javascripts/bootstrap.js
|
106
|
+
- assets/bootstrap/vendor/assets/stylesheets/bootstrap.css
|
107
|
+
- assets/creative/app/assets/images/creative/header.jpg
|
108
|
+
- assets/creative/app/assets/images/creative/portfolio/1.jpg
|
109
|
+
- assets/creative/app/assets/images/creative/portfolio/2.jpg
|
110
|
+
- assets/creative/app/assets/images/creative/portfolio/3.jpg
|
111
|
+
- assets/creative/app/assets/images/creative/portfolio/4.jpg
|
112
|
+
- assets/creative/app/assets/images/creative/portfolio/5.jpg
|
113
|
+
- assets/creative/app/assets/images/creative/portfolio/6.jpg
|
114
|
+
- assets/creative/app/assets/javascripts/creative/cbpAnimatedHeader.js
|
115
|
+
- assets/creative/app/assets/javascripts/creative/classie.js
|
116
|
+
- assets/creative/app/assets/javascripts/creative/creative.js
|
117
|
+
- assets/creative/app/assets/javascripts/creative/creative_mainfest.js
|
118
|
+
- assets/creative/app/assets/javascripts/creative/jquery.easing.min.js
|
119
|
+
- assets/creative/app/assets/javascripts/creative/jquery.fittext.js
|
120
|
+
- assets/creative/app/assets/javascripts/creative/manifest.js
|
121
|
+
- assets/creative/app/assets/javascripts/creative/wow.min.js
|
122
|
+
- assets/creative/app/assets/stylesheets/creative/animate.min.css
|
123
|
+
- assets/creative/app/assets/stylesheets/creative/creative.css.scss
|
124
|
+
- assets/creative/app/assets/stylesheets/creative/manifest.css
|
125
|
+
- assets/creative/app/controllers/creatives_controller.rb
|
126
|
+
- assets/creative/app/views/creatives/_bg_primary.html.erb
|
127
|
+
- assets/creative/app/views/creatives/_call_to_action.html.erb
|
128
|
+
- assets/creative/app/views/creatives/_contact.html.erb
|
129
|
+
- assets/creative/app/views/creatives/_header.html.erb
|
130
|
+
- assets/creative/app/views/creatives/_navbar.html.erb
|
131
|
+
- assets/creative/app/views/creatives/_portfolio.html.erb
|
132
|
+
- assets/creative/app/views/creatives/_services.html.erb
|
133
|
+
- assets/creative/app/views/creatives/index.html.erb
|
134
|
+
- assets/creative/app/views/layouts/creative.html.erb
|
135
|
+
- assets/font_awesome/public/fonts/FontAwesome.otf
|
136
|
+
- assets/font_awesome/public/fonts/fontawesome-webfont.eot
|
137
|
+
- assets/font_awesome/public/fonts/fontawesome-webfont.svg
|
138
|
+
- assets/font_awesome/public/fonts/fontawesome-webfont.ttf
|
139
|
+
- assets/font_awesome/public/fonts/fontawesome-webfont.woff
|
140
|
+
- assets/font_awesome/public/fonts/fontawesome-webfont.woff2
|
141
|
+
- assets/font_awesome/vendor/assets/stylesheets/font_awesome.css
|
142
|
+
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/bg.jpg
|
143
|
+
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/callout.jpg
|
144
|
+
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-1.jpg
|
145
|
+
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-2.jpg
|
146
|
+
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-3.jpg
|
147
|
+
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-4.jpg
|
148
|
+
- assets/stylish_portfolio/app/assets/javascripts/manifest.js
|
149
|
+
- assets/stylish_portfolio/app/assets/javascripts/stylish_portfolio.js
|
150
|
+
- assets/stylish_portfolio/app/assets/stylesheets/manifest.css
|
151
|
+
- assets/stylish_portfolio/app/assets/stylesheets/stylish_portfolio.css.scss
|
152
|
+
- assets/stylish_portfolio/app/controllers/stylish_portfolios_controller.rb
|
153
|
+
- assets/stylish_portfolio/app/views/layouts/stylish_portfolio.html.erb
|
154
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_about.html.erb
|
155
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_call_to_action.html.erb
|
156
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_callout.html.erb
|
157
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_footer.html.erb
|
158
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_header.html.erb
|
159
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_map.html.erb
|
160
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_navigation.html.erb
|
161
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_portfolio.html.erb
|
162
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/_services.html.erb
|
163
|
+
- assets/stylish_portfolio/app/views/stylish_portfolios/index.html.erb
|
100
164
|
- bin/console
|
101
165
|
- bin/setup
|
102
166
|
- frontend-generators.gemspec
|
103
167
|
- lib/frontend_generators.rb
|
104
|
-
- lib/frontend_generators/
|
105
|
-
- lib/frontend_generators/font_awesome.rb
|
168
|
+
- lib/frontend_generators/assets_copier.rb
|
106
169
|
- lib/frontend_generators/version.rb
|
107
170
|
- lib/tasks/add_assets.rake
|
108
171
|
- lib/tasks/console.rake
|
@@ -1,38 +0,0 @@
|
|
1
|
-
module FrontendGenerators; class Bootstrap
|
2
|
-
|
3
|
-
def add_assets
|
4
|
-
FileUtils.cp(bootstrap_css, css_destination)
|
5
|
-
FileUtils.cp(bootstrap_js, js_destination)
|
6
|
-
FileUtils.mkdir_p(fonts_dirname)
|
7
|
-
FileUtils.cp(fonts, fonts_dirname)
|
8
|
-
end
|
9
|
-
|
10
|
-
def fonts
|
11
|
-
Dir.glob("#{root}/assets/bootstrap/fonts/**/*")
|
12
|
-
end
|
13
|
-
|
14
|
-
def fonts_dirname
|
15
|
-
File.join(Rails.root, "public", "fonts")
|
16
|
-
end
|
17
|
-
|
18
|
-
def css_destination
|
19
|
-
File.join(Rails.root, "vendor", "assets", "stylesheets")
|
20
|
-
end
|
21
|
-
|
22
|
-
def bootstrap_css
|
23
|
-
File.join(root, "assets", "bootstrap", "bootstrap.css")
|
24
|
-
end
|
25
|
-
|
26
|
-
def bootstrap_js
|
27
|
-
File.join(root, "assets", "bootstrap", "bootstrap.js")
|
28
|
-
end
|
29
|
-
|
30
|
-
def js_destination
|
31
|
-
File.join(Rails.root, "vendor", "assets", "javascripts")
|
32
|
-
end
|
33
|
-
|
34
|
-
def root
|
35
|
-
File.expand_path("../../", File.dirname(__FILE__))
|
36
|
-
end
|
37
|
-
|
38
|
-
end; end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
module FrontendGenerators; class FontAwesome
|
2
|
-
|
3
|
-
def add_assets
|
4
|
-
FileUtils.cp(font_awesome_css, css_destination)
|
5
|
-
FileUtils.mkdir_p(fonts_dirname)
|
6
|
-
FileUtils.cp(fonts, fonts_dirname)
|
7
|
-
end
|
8
|
-
|
9
|
-
def fonts
|
10
|
-
Dir.glob("#{root}/assets/font_awesome/fonts/**/*")
|
11
|
-
end
|
12
|
-
|
13
|
-
def fonts_dirname
|
14
|
-
File.join(Rails.root, "public", "fonts")
|
15
|
-
end
|
16
|
-
|
17
|
-
def css_destination
|
18
|
-
File.join(Rails.root, "vendor", "assets", "stylesheets")
|
19
|
-
end
|
20
|
-
|
21
|
-
def font_awesome_css
|
22
|
-
File.join(root, "assets", "font_awesome", "font_awesome.css")
|
23
|
-
end
|
24
|
-
|
25
|
-
def root
|
26
|
-
File.expand_path("../../", File.dirname(__FILE__))
|
27
|
-
end
|
28
|
-
|
29
|
-
end; end
|
30
|
-
|