diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a8e5700 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# Changelog + +## Version 0.0.1 +* First release \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a75a7f4 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/package.json b/package.json index 25015e7..7672d9b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "type": "git", "url": "https://github.com/nidib/term-preview" }, - "version": "0.0.1", + "version": "0.0.1-alpha", "engines": { "vscode": "^1.63.0" }, @@ -53,7 +53,7 @@ "markdownDescription": "Whether or not to display the language flag", "default": false }, - "termPreview.watchFile": { + "termPreview.watchForChanges": { "type": "boolean", "markdownDescription": "Whether or not to keep watching for changes on your file", "default": false diff --git a/src/@types/types.ts b/src/@types/types.ts index 0477f88..27c5f25 100644 --- a/src/@types/types.ts +++ b/src/@types/types.ts @@ -10,7 +10,7 @@ export interface ExtensionConfig { language: string; path: string | null; showFlag: boolean; - watchFiles: boolean; + watchForChanges: boolean; } export type Map = { [key: string]: T }; diff --git a/src/app/app.ts b/src/app/app.ts index b1643a1..d019221 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -70,7 +70,7 @@ class App { this.terms = this.getTermsFromFile(); termHover = new TermHover(this.getTerms, showFlag, language); - if (this.config.watchFiles) { + if (this.config.watchForChanges) { fs.watchFile(path, this.handleFileChange); } diff --git a/src/utils/helpers/getConfig.ts b/src/utils/helpers/getConfig.ts index 60d627c..52520e9 100644 --- a/src/utils/helpers/getConfig.ts +++ b/src/utils/helpers/getConfig.ts @@ -8,15 +8,15 @@ function getInitialConfig(): ExtensionConfig { const abs = hoverTestConfiguration.get('absolutePathToProjectRoot', configDefaults.ABS_PATH); const rel = hoverTestConfiguration.get('innerPathToTermsRoot', configDefaults.REL_PATH); const filePrefix = hoverTestConfiguration.get('filePrefix', configDefaults.FILE_PREFIX); - const language: string = hoverTestConfiguration.get('language', configDefaults.LANGUAGE); + const language = hoverTestConfiguration.get('language', configDefaults.LANGUAGE); const fileSuffix = hoverTestConfiguration.get('fileSuffix', configDefaults.FILE_SUFFIX); const fileSeparator = hoverTestConfiguration.get('fileSeparator', configDefaults.FILE_SEPARATOR); const showFlag = hoverTestConfiguration.get('showFlag', configDefaults.SHOW_FLAG); - const watchFiles = hoverTestConfiguration.get('watchFile', configDefaults.WATCH_FILES); + const watchForChanges = hoverTestConfiguration.get('watchForChanges', configDefaults.WATCH_FILES); const file = [filePrefix, language, fileSuffix].join(fileSeparator); const path = (abs && rel && file) ? nodePath.join(abs, rel, file): null; - return { language, path, showFlag, watchFiles }; + return { language, path, showFlag, watchForChanges }; } export default getInitialConfig; \ No newline at end of file