diff --git a/.gitignore b/.gitignore index 8c960ec..ef17dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.jl.cov *.jl.*.cov *.jl.mem +/docs/build/ +/docs/Manifest.toml diff --git a/.travis.yml b/.travis.yml index 3ed3dbf..1d0a566 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ os: julia: - 0.6 - 0.7 + - 1.0 - nightly # # Uncomment the following lines to allow failures on nightly julia @@ -23,5 +24,16 @@ notifications: # - julia -e 'Pkg.clone(pwd()); Pkg.build("Example"); Pkg.test("Example"; coverage=true)'; after_success: - - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; -# - julia -e 'cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; + - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'; +# - julia -e 'if VERSION >= v"0.7.0-" using Pkg end; cd(Pkg.dir("Example")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'; + +jobs: + include: + - stage: "Documentation" + julia: 1.0 + os: linux + script: + - julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); + Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=docs/ docs/make.jl + after_success: skip diff --git a/README.md b/README.md index 6ce22ff..1c2bf3f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Example Julia package repo. [![Example](http://pkg.julialang.org/badges/Example_0.6.svg)](http://pkg.julialang.org/?pkg=Example) [![Example](http://pkg.julialang.org/badges/Example_0.7.svg)](http://pkg.julialang.org/?pkg=Example) +[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaLang.github.io/Example.jl/stable) +[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaLang.github.io/Example.jl/dev) Linux and macOS: [![Build Status](https://travis-ci.org/JuliaLang/Example.jl.svg?branch=master)](https://travis-ci.org/JuliaLang/Example.jl) diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..c278538 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[compat] +Documenter = "~0.20" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..4be27ac --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,7 @@ +using Documenter, Example + +makedocs(modules = [Example], sitename = "Example.jl") + +deploydocs( + repo = "github.com/JuliaLang/Example.jl.git", +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..b1cee35 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,7 @@ +# Example + +Example Julia package repo. + +```@autodocs +Modules = [Example] +``` diff --git a/src/Example.jl b/src/Example.jl index cd1d31b..d719874 100644 --- a/src/Example.jl +++ b/src/Example.jl @@ -1,7 +1,18 @@ module Example export hello, domath +""" + hello(who::String) + +Return "Hello, `who`". +""" hello(who::String) = "Hello, $who" + +""" + domath(x::Number) + +Return `x + 5`. +""" domath(x::Number) = x + 5 end