frontend-generators 0.0.2 → 0.0.3
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/assets/freelancer/app/assets/images/freelancer/portfolio/cabin.png +0 -0
- data/assets/freelancer/app/assets/images/freelancer/portfolio/cake.png +0 -0
- data/assets/freelancer/app/assets/images/freelancer/portfolio/circus.png +0 -0
- data/assets/freelancer/app/assets/images/freelancer/portfolio/game.png +0 -0
- data/assets/freelancer/app/assets/images/freelancer/portfolio/safe.png +0 -0
- data/assets/freelancer/app/assets/images/freelancer/portfolio/submarine.png +0 -0
- data/assets/freelancer/app/assets/images/freelancer/profile.png +0 -0
- data/assets/freelancer/app/assets/javascripts/freelancer/cbpAnimatedHeader.js +44 -0
- data/assets/freelancer/app/assets/javascripts/freelancer/classie.js +84 -0
- data/assets/freelancer/app/assets/javascripts/freelancer/contact_me.js +73 -0
- data/assets/freelancer/app/assets/javascripts/freelancer/freelancer.js +41 -0
- data/assets/freelancer/app/assets/javascripts/freelancer/jqBootstrapValidation.js +912 -0
- data/assets/freelancer/app/assets/javascripts/freelancer/manifest.js +9 -0
- data/assets/freelancer/app/assets/stylesheets/freelancer/bootswatch_bootstrap.css +7065 -0
- data/assets/freelancer/app/assets/stylesheets/freelancer/freelancer.css +459 -0
- data/assets/freelancer/app/assets/stylesheets/freelancer/manifest.css +7 -0
- data/assets/freelancer/app/controllers/freelancers_controller.rb +7 -0
- data/assets/freelancer/app/views/freelancers/_about.html.erb +24 -0
- data/assets/freelancer/app/views/freelancers/_contact.html.erb +54 -0
- data/assets/freelancer/app/views/freelancers/_footer.html.erb +277 -0
- data/assets/freelancer/app/views/freelancers/_header.html.erb +15 -0
- data/assets/freelancer/app/views/freelancers/_navigation.html.erb +35 -0
- data/assets/freelancer/app/views/freelancers/_portfolio.html.erb +73 -0
- data/assets/freelancer/app/views/freelancers/index.html.erb +7 -0
- data/assets/freelancer/app/views/layouts/freelancer.html.erb +19 -0
- data/config/turf/default.rb +11 -0
- data/config/turf/development.rb +4 -0
- data/config/turf/local.rb +4 -0
- data/config/turf/production.rb +3 -0
- data/config/turf/test.rb +7 -0
- data/frontend-generators.gemspec +1 -0
- data/lib/frontend_generators.rb +7 -2
- data/lib/frontend_generators/asset_copier.rb +36 -0
- data/lib/frontend_generators/assets_copier.rb +10 -41
- data/lib/frontend_generators/version.rb +1 -1
- metadata +47 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Start Bootstrap Freelancer</title>
|
5
|
+
<%= stylesheet_link_tag 'freelancer/manifest.css', media: 'all' %>
|
6
|
+
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
7
|
+
<link href="http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic" rel="stylesheet" type="text/css">
|
8
|
+
<%= javascript_include_tag 'freelancer/manifest.js' %>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
</head>
|
11
|
+
|
12
|
+
<body id="page-top" class="index">
|
13
|
+
|
14
|
+
<%= yield %>
|
15
|
+
|
16
|
+
</body>
|
17
|
+
</html>
|
18
|
+
|
19
|
+
|
data/config/turf/test.rb
ADDED
data/frontend-generators.gemspec
CHANGED
data/lib/frontend_generators.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
+
require "rainbow"
|
2
|
+
require "turf"
|
3
|
+
|
4
|
+
turf_path = File.expand_path("../config/turf/", File.dirname(__FILE__))
|
5
|
+
Dir.glob("#{turf_path}/*.rb").each {|f| require f}
|
6
|
+
|
1
7
|
require "frontend_generators/version"
|
8
|
+
require_relative "./frontend_generators/asset_copier.rb"
|
2
9
|
require_relative "./frontend_generators/assets_copier.rb"
|
3
10
|
|
4
|
-
require "rainbow"
|
5
|
-
|
6
11
|
module FrontendGenerators
|
7
12
|
|
8
13
|
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module FrontendGenerators; class AssetCopier
|
2
|
+
|
3
|
+
attr_reader :asset_path, :asset_root_dirname
|
4
|
+
|
5
|
+
def initialize(asset_path, asset_root_dirname)
|
6
|
+
@asset_path = asset_path
|
7
|
+
@asset_root_dirname = asset_root_dirname
|
8
|
+
end
|
9
|
+
|
10
|
+
def full_copy
|
11
|
+
FileUtils.mkdir_p(destination_dirname)
|
12
|
+
copy_asset
|
13
|
+
puts message
|
14
|
+
end
|
15
|
+
|
16
|
+
def copy_asset
|
17
|
+
FileUtils.cp(asset_path, destination_dirname)
|
18
|
+
end
|
19
|
+
|
20
|
+
def message
|
21
|
+
"#{Rainbow("create").green} #{destination_partial_path}"
|
22
|
+
end
|
23
|
+
|
24
|
+
def destination_dirname
|
25
|
+
p = asset_path.gsub(asset_root_dirname, Turf.find(:destination_root))
|
26
|
+
dirname = File.dirname(p)
|
27
|
+
FileUtils.mkdir_p(dirname)
|
28
|
+
dirname
|
29
|
+
end
|
30
|
+
|
31
|
+
def destination_partial_path
|
32
|
+
asset_path.gsub(asset_root_dirname, "")
|
33
|
+
end
|
34
|
+
|
35
|
+
end; end
|
36
|
+
|
@@ -1,55 +1,24 @@
|
|
1
1
|
module FrontendGenerators; class AssetsCopier
|
2
2
|
|
3
|
-
attr_reader :
|
3
|
+
attr_reader :asset
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
def initialize(local_asset_dirname, destination_root = Rails.root)
|
8
|
-
@local_asset_dirname = local_asset_dirname
|
9
|
-
@destination_root = destination_root
|
5
|
+
def initialize(asset)
|
6
|
+
@asset = asset
|
10
7
|
end
|
11
8
|
|
12
9
|
def copy_assets
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
FileUtils.mkdir_p(d)
|
17
|
-
copy_asset(local_asset_path)
|
10
|
+
asset_files.each do |asset_path|
|
11
|
+
copier = AssetCopier.new(asset_path, asset_root_dirname)
|
12
|
+
copier.full_copy
|
18
13
|
end
|
19
14
|
end
|
20
15
|
|
21
|
-
def
|
22
|
-
|
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__))
|
16
|
+
def asset_root_dirname
|
17
|
+
File.join(Turf.find(:root), "assets", asset.to_s)
|
49
18
|
end
|
50
19
|
|
51
|
-
def
|
52
|
-
"#{
|
20
|
+
def asset_files
|
21
|
+
Dir.glob("#{asset_root_dirname}/**/*").select{|f| File.file?(f)}
|
53
22
|
end
|
54
23
|
|
55
24
|
end; 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.3
|
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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: turf
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.0.5
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.0.5
|
83
97
|
description: There are separate Ruby gems to access Bootstrap and Font Awesome in
|
84
98
|
your Rails application, but they can be annoying when it comes time to deploy or
|
85
99
|
when you want to look at the source code. These rake tasks actually move the source
|
@@ -139,6 +153,31 @@ files:
|
|
139
153
|
- assets/font_awesome/public/fonts/fontawesome-webfont.woff
|
140
154
|
- assets/font_awesome/public/fonts/fontawesome-webfont.woff2
|
141
155
|
- assets/font_awesome/vendor/assets/stylesheets/font_awesome.css
|
156
|
+
- assets/freelancer/app/assets/images/freelancer/portfolio/cabin.png
|
157
|
+
- assets/freelancer/app/assets/images/freelancer/portfolio/cake.png
|
158
|
+
- assets/freelancer/app/assets/images/freelancer/portfolio/circus.png
|
159
|
+
- assets/freelancer/app/assets/images/freelancer/portfolio/game.png
|
160
|
+
- assets/freelancer/app/assets/images/freelancer/portfolio/safe.png
|
161
|
+
- assets/freelancer/app/assets/images/freelancer/portfolio/submarine.png
|
162
|
+
- assets/freelancer/app/assets/images/freelancer/profile.png
|
163
|
+
- assets/freelancer/app/assets/javascripts/freelancer/cbpAnimatedHeader.js
|
164
|
+
- assets/freelancer/app/assets/javascripts/freelancer/classie.js
|
165
|
+
- assets/freelancer/app/assets/javascripts/freelancer/contact_me.js
|
166
|
+
- assets/freelancer/app/assets/javascripts/freelancer/freelancer.js
|
167
|
+
- assets/freelancer/app/assets/javascripts/freelancer/jqBootstrapValidation.js
|
168
|
+
- assets/freelancer/app/assets/javascripts/freelancer/manifest.js
|
169
|
+
- assets/freelancer/app/assets/stylesheets/freelancer/bootswatch_bootstrap.css
|
170
|
+
- assets/freelancer/app/assets/stylesheets/freelancer/freelancer.css
|
171
|
+
- assets/freelancer/app/assets/stylesheets/freelancer/manifest.css
|
172
|
+
- assets/freelancer/app/controllers/freelancers_controller.rb
|
173
|
+
- assets/freelancer/app/views/freelancers/_about.html.erb
|
174
|
+
- assets/freelancer/app/views/freelancers/_contact.html.erb
|
175
|
+
- assets/freelancer/app/views/freelancers/_footer.html.erb
|
176
|
+
- assets/freelancer/app/views/freelancers/_header.html.erb
|
177
|
+
- assets/freelancer/app/views/freelancers/_navigation.html.erb
|
178
|
+
- assets/freelancer/app/views/freelancers/_portfolio.html.erb
|
179
|
+
- assets/freelancer/app/views/freelancers/index.html.erb
|
180
|
+
- assets/freelancer/app/views/layouts/freelancer.html.erb
|
142
181
|
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/bg.jpg
|
143
182
|
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/callout.jpg
|
144
183
|
- assets/stylish_portfolio/app/assets/images/stylish_portfolio/portfolio-1.jpg
|
@@ -163,8 +202,14 @@ files:
|
|
163
202
|
- assets/stylish_portfolio/app/views/stylish_portfolios/index.html.erb
|
164
203
|
- bin/console
|
165
204
|
- bin/setup
|
205
|
+
- config/turf/default.rb
|
206
|
+
- config/turf/development.rb
|
207
|
+
- config/turf/local.rb
|
208
|
+
- config/turf/production.rb
|
209
|
+
- config/turf/test.rb
|
166
210
|
- frontend-generators.gemspec
|
167
211
|
- lib/frontend_generators.rb
|
212
|
+
- lib/frontend_generators/asset_copier.rb
|
168
213
|
- lib/frontend_generators/assets_copier.rb
|
169
214
|
- lib/frontend_generators/version.rb
|
170
215
|
- lib/tasks/add_assets.rake
|