Skip to content

Commit c13fffd

Browse files
committed
Automatically generate docs.json when it's needed
1 parent 4e56a77 commit c13fffd

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@
55
tmp
66
public/assets
77
public/fonts
8-
public/docs/**/*
9-
!public/docs/docs.json
10-
!public/docs/**/index.json

lib/app.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ class App < Sinatra::Application
3535

3636
set :csp, false
3737

38+
require 'docs'
39+
Docs.generate_manifest
40+
3841
Dir[docs_path, root.join(assets_prefix, '*/')].each do |path|
3942
sprockets.append_path(path)
4043
end

public/docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

public/docs/docs.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)