mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-18 16:51:51 +03:00
Merge pull request #3353 from Matthew-Mosior/clean-does-not-remove-generated-docs
Clean removes generated docs
This commit is contained in:
commit
d9049e82ff
@ -256,4 +256,5 @@ This CHANGELOG describes the merged but unreleased changes. Please see [CHANGELO
|
||||
|
||||
#### Documentation
|
||||
|
||||
* Module docstrings are now displayed for namespace indexes when documentation is built via --mkdoc.
|
||||
* Module docstrings are now displayed for namespace indexes when documentation is built via `--mkdoc`.
|
||||
* Generated documentation are now removed via `--clean`.
|
||||
|
@ -843,6 +843,10 @@ clean pkg opts -- `opts` is not used but might be in the future
|
||||
deleteFolder builddir []
|
||||
maybe (pure ()) (\e => delete (outputdir </> e))
|
||||
(executable pkg)
|
||||
-- clean out the generated docs
|
||||
let build = build_dir (dirs (options defs))
|
||||
deleteDocsFolder $ build </> "docs" </> "docs"
|
||||
deleteDocsFolder $ build </> "docs"
|
||||
runScript (postclean pkg)
|
||||
where
|
||||
delete : String -> Core ()
|
||||
@ -859,6 +863,14 @@ clean pkg opts -- `opts` is not used but might be in the future
|
||||
delete $ ttFile <.> "ttc"
|
||||
delete $ ttFile <.> "ttm"
|
||||
|
||||
deleteDocsFolder : String -> Core ()
|
||||
deleteDocsFolder dir
|
||||
= do Right docbasefiles <- coreLift $ listDir dir
|
||||
| Left err => pure ()
|
||||
traverse_ (\x => delete $ dir </> x)
|
||||
docbasefiles
|
||||
deleteFolder dir []
|
||||
|
||||
-- Just load the given module, if it exists, which will involve building
|
||||
-- it if necessary
|
||||
runRepl : {auto c : Ref Ctxt Defs} ->
|
||||
|
Loading…
Reference in New Issue
Block a user