Add latex-workshop.latex.clean.onFailBuild.enabled config

This commit is contained in:
James-Yu 2018-08-15 10:29:17 +08:00
parent 5842e429ce
commit 0e8ecae423
3 changed files with 25 additions and 1 deletions

View File

@ -1,5 +1,21 @@
# Change Log # Change Log
## [5.8.0] - 2018-08-15
### Added
- Add config to enable file cleaning after a failed building process.
- (#705) Support `\import` as well as `\subimport` for outline and build.
- (#719) Supersed 'Enter' to automatically add `\item` while itemizing.
- (#720) Support nested `subimport`s `@Moberstein`.
### Fixed
- README contents.
- Make sure magic comments start at the beginning of the line.
- (#696) Make outline handle title with nested braces.
- (#723) Finding root file when using nested `subimport`.
- (#728) Do not autocomplete `\end`.
- (#736) Do not build upon file change if building, suppress next build within 1s.
## [5.7.0] - 2018-07-24 ## [5.7.0] - 2018-07-24
### Added ### Added

View File

@ -3,7 +3,7 @@
"displayName": "LaTeX Workshop", "displayName": "LaTeX Workshop",
"description": "Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.", "description": "Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.",
"icon": "icon.png", "icon": "icon.png",
"version": "5.7.0", "version": "5.8.0",
"publisher": "James-Yu", "publisher": "James-Yu",
"license": "MIT", "license": "MIT",
"homepage": "https://github.com/James-Yu/LaTeX-Workshop", "homepage": "https://github.com/James-Yu/LaTeX-Workshop",
@ -371,6 +371,11 @@
"default": false, "default": false,
"description": "Delete LaTeX auxillary files after building project.\nThis property defines whether LaTeX Workshop will clean up all unnecessary files after building the project." "description": "Delete LaTeX auxillary files after building project.\nThis property defines whether LaTeX Workshop will clean up all unnecessary files after building the project."
}, },
"latex-workshop.latex.clean.onFailBuild.enabled": {
"type": "boolean",
"default": false,
"description": "Delete LaTeX auxillary files after a failed building process.\nThis property defines whether LaTeX Workshop will clean up all unnecessary files upon building errors."
},
"latex-workshop.latex.clean.fileTypes": { "latex-workshop.latex.clean.fileTypes": {
"type": "array", "type": "array",
"default": [ "default": [

View File

@ -110,6 +110,9 @@ export class Builder {
} }
} else { } else {
this.extension.logger.displayStatus('x', 'errorForeground') this.extension.logger.displayStatus('x', 'errorForeground')
if (configuration.get('latex-workshop.latex.clean.onFailBuild.enabled') && !configuration.get('latex.clean.enabled')) {
this.extension.commander.clean()
}
const res = this.extension.logger.showErrorMessage('Recipe terminated with error.', 'Open compiler log') const res = this.extension.logger.showErrorMessage('Recipe terminated with error.', 'Open compiler log')
if (res) { if (res) {
res.then(option => { res.then(option => {