File tree 2 files changed +9
-394
lines changed
2 files changed +9
-394
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Loops through the files in the examples folder and adds them (with any header co
5
5
markdown file.
6
6
"""
7
7
function generateExamples ()
8
- f = open ( joinpath ( @__DIR__ , " src/examples.md " ), " w " )
8
+ f = IOBuffer ( )
9
9
write (
10
10
f,
11
11
" ```@meta
@@ -66,7 +66,14 @@ function generateExamples()
66
66
close (opened)
67
67
end
68
68
end
69
- close (f)
69
+ file = joinpath (@__DIR__ , " src/examples.md" )
70
+ current_content = isfile (file) ? read (file, String) : " "
71
+ updated_content = String (take! (f))
72
+ # Only update content if something changed so that the file watcher in
73
+ # LiveServer.jl isn't triggering itself when running make.jl.
74
+ if updated_content != current_content
75
+ write (file, updated_content)
76
+ end
70
77
end
71
78
72
79
generateExamples ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments