From ca67c3f5a380d1245266ef1691787360c3180cef Mon Sep 17 00:00:00 2001 From: Nathan Kennedy Date: Tue, 19 Mar 2024 15:47:58 +1300 Subject: [PATCH] Updated some Hugo CLI flags --- package-lock.json | 4 +-- package.json | 2 +- src/options/hugo-options.js | 54 ++++++++++++++++++++++++++++--------- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a1a544..28e7d1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cloudcannon/command-builder", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@cloudcannon/command-builder", - "version": "1.1.1", + "version": "1.1.2", "license": "ISC", "devDependencies": { "eslint": "^7.27.0", diff --git a/package.json b/package.json index 74bfbbe..676ad2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cloudcannon/command-builder", - "version": "1.1.1", + "version": "1.1.2", "description": "A script that builds the script that builds your site", "main": "src/index.js", "scripts": { diff --git a/src/options/hugo-options.js b/src/options/hugo-options.js index 12003a4..112ca7a 100644 --- a/src/options/hugo-options.js +++ b/src/options/hugo-options.js @@ -181,13 +181,6 @@ module.exports = { type: 'boolean', default: false }, - i18nWarnings: { - name: 'I18n Warnings', - description: 'Print missing translations.', - option: '--i18n-warnings', - type: 'boolean', - default: false - }, ignoreCache: { name: 'Ignore Cache', description: 'Ignores the cache directory.', @@ -230,17 +223,31 @@ module.exports = { type: 'boolean', default: true }, - pathWarnings: { - name: 'Path Warnings', - description: 'Print warnings on duplicate target paths, etc.', - option: '--path-warnings', + printI18nWarnings: { + name: 'Print I18n Warnings', + description: 'Print missing translations.', + option: '--printI18nWarnings', type: 'boolean', default: false }, - mem: { + printMemoryUsage: { name: 'Print Memory', description: 'Print memory usage to screen at intervals.', - option: '--print-mem', + option: '--printMemoryUsage', + type: 'boolean', + default: false + }, + printPathWarnings: { + name: 'Path Warnings', + description: 'Print warnings on duplicate target paths, etc.', + option: '--printPathWarnings', + type: 'boolean', + default: false + }, + printUnusedTemplates: { + name: 'Print Unused Templates', + description: 'Print warnings on unused templates.', + option: '--printUnusedTemplates', type: 'boolean', default: false }, @@ -279,6 +286,27 @@ module.exports = { option: '--verboseLog', type: 'boolean', default: false + }, + i18nWarnings: { + name: 'I18n Warnings (Deprecated)', + description: '[Deprecated in Hugo version >=0.93.0] Print missing translations.', + option: '--i18n-warnings', + type: 'boolean', + default: false + }, + pathWarnings: { + name: 'Path Warnings (Deprecated)', + description: '[Deprecated in Hugo version >=0.93.0] Print warnings on duplicate target paths, etc.', + option: '--path-warnings', + type: 'boolean', + default: false + }, + mem: { + name: 'Print Memory (Deprecated)', + description: '[Deprecated in Hugo version >=0.93.0] Print memory usage to screen at intervals.', + option: '--print-mem', + type: 'boolean', + default: false } } };