@infomaximum/package-cli 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.15.0](https://github.com/Infomaximum/package-cli/compare/v1.14.0...v1.15.0) (2023-12-26)
6
+
7
+
8
+ ### Features
9
+
10
+ * добавлены шаблоны документации, и истории изменений пакета ([125891b](https://github.com/Infomaximum/package-cli/commit/125891bd80741171216698204dbf8387c6bafa1c))
11
+
5
12
  ## [1.14.0](https://github.com/Infomaximum/package-cli/compare/v1.13.0...v1.14.0) (2023-12-25)
6
13
 
7
14
 
@@ -12,6 +12,7 @@ import { WIDGET_PACKAGE_JSON_TEMPLATE } from "../../../templates/widget/widgetPa
12
12
  import { CUSTOM_PACKAGE_CLI_LIB_NAME, CUSTOM_WIDGET_LIB_NAME, MANIFEST_JSON_FILE_NAME, } from "../../../const.js";
13
13
  import { WIDGET_SETTINGS_TEMPLATE } from "../../../templates/widget/src/settings.js";
14
14
  import { WIDGET_PANEL_TEMPLATE } from "../../../templates/widget/src/panel.js";
15
+ import { GET_CHANGELOG_MD, GET_DOC_MD, } from "../../../templates/package/additionalFiles.js";
15
16
  const addIconActionName = "addIcon";
16
17
  const addInitActions = (basePath, plop) => {
17
18
  plop.setActionType(addIconActionName, function (answers, config, plop) {
@@ -45,6 +46,18 @@ const actions = ({ customWidgetVersion, packageCliVersion }) => {
45
46
  path: `package/resources/${packageIconName}.png`,
46
47
  template: PACKAGE_ICON_TEMPLATE,
47
48
  },
49
+ ...["ru", "en"].flatMap((language) => [
50
+ {
51
+ type: "add",
52
+ path: `package/${language}/doc.md`,
53
+ template: GET_DOC_MD(language),
54
+ },
55
+ {
56
+ type: "add",
57
+ path: `package/${language}/changelog.md`,
58
+ template: GET_CHANGELOG_MD(language),
59
+ },
60
+ ]),
48
61
  {
49
62
  type: "add",
50
63
  path: MANIFEST_JSON_FILE_NAME,
@@ -0,0 +1,20 @@
1
+ export const GET_CHANGELOG_MD = (language) => {
2
+ switch (language) {
3
+ case "en":
4
+ return "<!-- Description of changes -->";
5
+ case "ru":
6
+ return "<!-- Описание изменений -->";
7
+ default:
8
+ return "";
9
+ }
10
+ };
11
+ export const GET_DOC_MD = (language) => {
12
+ switch (language) {
13
+ case "en":
14
+ return "<!-- Package documentation -->";
15
+ case "ru":
16
+ return "<!-- Документация по пакету -->";
17
+ default:
18
+ return "";
19
+ }
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infomaximum/package-cli",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "exports": "./dist/index.js",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",