[devdocsgjs/main: 360/1867] Automatically generate docs.json when it's needed
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 360/1867] Automatically generate docs.json when it's needed
- Date: Fri, 19 Nov 2021 23:47:14 +0000 (UTC)
commit c13fffd0814f91c83bf531bf70b4962b7898810e
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Mon Jul 30 16:54:07 2018 +0200
Automatically generate docs.json when it's needed
.gitignore | 3 ---
lib/app.rb | 3 +++
public/docs/.gitignore | 2 ++
public/docs/docs.json | 1 -
4 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8b222826..ac523dbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,3 @@
tmp
public/assets
public/fonts
-public/docs/**/*
-!public/docs/docs.json
-!public/docs/**/index.json
diff --git a/lib/app.rb b/lib/app.rb
index b5015b3a..217f2c16 100644
--- a/lib/app.rb
+++ b/lib/app.rb
@@ -35,6 +35,9 @@ class App < Sinatra::Application
set :csp, false
+ require 'docs'
+ Docs.generate_manifest
+
Dir[docs_path, root.join(assets_prefix, '*/')].each do |path|
sprockets.append_path(path)
end
diff --git a/public/docs/.gitignore b/public/docs/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/public/docs/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]