diff --git a/.travis.yml b/.travis.yml index 802d02a..189df88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ julia: matrix: allow_failures: - julia: nightly + - julia: 0.7 branches: only: - master @@ -20,7 +21,9 @@ jobs: julia: 0.6 os: linux script: - - julia -e 'Pkg.clone(pwd()); Pkg.build("Literate"); Pkg.add("Documenter"); cd(Pkg.dir("Literate")); include("docs/make.jl")' + - julia -e 'Pkg.clone(pwd()); Pkg.build("Literate")' + - julia -e 'Pkg.add("Documenter"); Pkg.add("Plots"); Pkg.build("Plots")' + - julia -e 'cd(Pkg.dir("Literate")); include("docs/make.jl")' notifications: email: false git: diff --git a/docs/make.jl b/docs/make.jl index 0298836..e7cd5df 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,6 +1,10 @@ using Documenter using Literate +# import these to make sure they precompile here instead of when generating output +import Plots +import GR + # generate examples EXAMPLE = joinpath(@__DIR__, "..", "examples", "example.jl") OUTPUT = joinpath(@__DIR__, "src/generated") diff --git a/examples/example.jl b/examples/example.jl index 5f526e5..4a3c586 100644 --- a/examples/example.jl +++ b/examples/example.jl @@ -59,6 +59,16 @@ end foo() +# Both Documenter's `@example` block and notebooks can display images. Here is an example +# where we generate a simple plot using the +# [Plots.jl](https://github.com/JuliaPlots/Plots.jl) package + +using Plots +x = linspace(0, 6π, 1000) +y1 = sin.(x) +y2 = cos.(x) +plot(x, [y1, y2]) + # ### Custom processing # # It is possible to give Literate custom pre- and post-processing functions.