Skip to content

Commit

Permalink
Copy static assets into build path
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
adam12 committed Jan 25, 2018
1 parent 7d8b446 commit 917c90a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## master
- Copy static assets before building site
- Remove html extension from default filename
- Show missing view filename in 404 error
- More verbose url skipping
Expand Down
6 changes: 6 additions & 0 deletions lib/inert/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def initialize(app)
end

def call(starting_url)
copy_static

save(starting_url)
history.add(starting_url)

Expand Down Expand Up @@ -61,6 +63,10 @@ def save(url)
end
end

def copy_static
FileUtils.cp_r(app.opts[:public_root]+"/.", build_path)
end

def already_visited?(url)
history.include?(url)
end
Expand Down

0 comments on commit 917c90a

Please sign in to comment.