Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added font support. original author @jasonwebster #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/forge/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ def build_assets
end
end

# Copy the images directory over
# Copy the images & fonts directly directory over
FileUtils.cp_r(File.join(@assets_path, 'images'), @project.build_path) if File.exists?(File.join(@assets_path, 'images'))
FileUtils.cp_r(File.join(@assets_path, 'fonts'), @project.build_path) if File.exists?(File.join(@assets_path, 'fonts'))

# Check for screenshot and move it into main build directory
Dir.glob(File.join(@project.build_path, 'images', '*')).each do |filename|
Expand Down Expand Up @@ -215,7 +216,7 @@ def copy_paths_with_erb(paths, source_dir, destination_dir)
def init_sprockets
@sprockets = Sprockets::Environment.new

['javascripts', 'stylesheets', 'lib'].each do |dir|
['javascripts', 'stylesheets', 'lib', 'fonts'].each do |dir|
@sprockets.append_path File.join(@assets_path, dir)
end

Expand Down
4 changes: 4 additions & 0 deletions lib/forge/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def assets_path
@assets_path ||= File.join(self.source_path, 'assets')
end

def fonts_path
File.join(self.assets_path, 'fonts')
end

def build_path
File.join(self.root, '.forge', 'build')
end
Expand Down