@cas-smartdesign/messages-generator 1.6.1 → 1.6.3

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.
Files changed (2) hide show
  1. package/dist/docs/doc.js +21 -128
  2. package/package.json +2 -2
package/dist/docs/doc.js CHANGED
@@ -1,140 +1,33 @@
1
- var n=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var e=n((m,t)=>{t.exports={}});var a=n((s,d)=>{d.exports={html:`<h1>SmartDesign - Elements</h1>
2
- <p>A shared library of Web Components used by both the SmartDesign Web Client and SmartDesign Integrated Web Applications.</p>
3
- <h1>Prerequisites</h1>
4
- <p>The project setup and build configuration requires the followings to be installed.</p>
1
+ var n=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var a=n((m,t)=>{t.exports={}});var d=n((b,e)=>{e.exports={html:`<h1>@cas-smartdesign/messages-generator</h1>
2
+ <p>A CLI tool to convert usual SmartDesign translations into JSON based Messages.</p>
3
+ <p>The expected naming of the input translation files is <code>[name]_[ISO 639-1].properties</code> (for example <i>translations_de.properties</i>).</p>
4
+ <h2>The following files are generated:</h2>
5
5
  <ul>
6
- <li>node 16.x <a href="https://nodejs.org/en/download/">download</a></li>
7
- <li>pnpm 7.x <a href="https://pnpm.io/installation/">download</a></li>
8
- </ul>
9
- <h1>Install project dependencies</h1>
10
- <ul>
11
- <li>configure nexus credentials for nexus.cas.de</li>
12
- <li>step into project root</li>
13
- <li>execute pnpm <code>$&gt; pnpm i</code><ul>
14
- <li>this installs dependencies across the workspace</li>
15
- </ul>
16
- </li>
17
- </ul>
18
- <h1>Linters / formatters</h1>
19
- <p>The project has certain linting / formatting rules defined via stylelint and eslint and prettier.</p>
20
- <p>The linters can be executed via <code>pnpm lint:check</code>, the formatter can be executed via <code>pnpm format:check</code>.
21
- Both of these have a <code>fix</code> variant as well (<code>pnpm lint:fix</code> and <code>pnpm format:fix</code>), which also tries to automatically fix the linting/formatting errors.</p>
22
- <p>It is advised to configure the necessary extensions for the IDE for automatic linting and formatting.</p>
23
- <p>Note that the CI build is configured to fail if there are linting or formatting errors.</p>
24
- <p>For a faster feedback, the linting / formatting can be executed automatically in a pre-commit hook.
25
- This can be installed via <code>pnpm prepare-hooks</code>.</p>
26
- <h2>Building individual packages</h2>
27
- <p><strong>There is no project wide build configuration at the moment</strong></p>
28
- <ul>
29
- <li>open terminal in the desired package</li>
30
- <li>execute the build script via <code>$&gt; pnpm build</code></li>
31
- <li>during development time one can (and should) use <code>$&gt; pnpm dev</code> which starts a webpack-dev-server instance<ul>
32
- <li>the es5 can be set as a target environment with --env es5 like <code>$&gt; pnpm dev --env es5=true</code> which makes it possible to test the elements for example also in IE 11</li>
33
- </ul>
34
- </li>
35
- </ul>
36
- <h2>Cross project dependencies</h2>
37
- <ul>
38
- <li>one may configure a dependency from within the workspace without any additional configuration<ul>
39
- <li>e.g. sd-z-layout -&gt; sd-custom-element-loader</li>
6
+ <li><code>messages.ts</code><ul>
7
+ <li>Contains a util which if initialized with a language the corresponding texts are provided from the dictionary.</li>
40
8
  </ul>
41
9
  </li>
42
- </ul>
43
- <h2>Publishing</h2>
44
- <p><strong>Publishing is handled automatically by the build pipeline, do not manually publish unless absolutely necessary</strong></p>
45
- <p>The .npmrc contains an auth token for the @cas-smartdesign scope, thus <code>pnpm publish</code> works by default.</p>
46
- <p>Note that pnpm checks if the current branch is your publish branch (<code>main</code>), clean, and up-to-date.</p>
47
- <p>If you don&#39;t have the <code>main</code> branch tracked, do it via <code>$&gt; git checkout -t origin/main</code>, otherwise
48
- use <code>$&gt; git checkout main &amp;&amp; git pull</code> to check out and update your local branch.</p>
49
- <h2>Releasing versions</h2>
50
- <p>Release versions should be prepared using the <code>npm version major|minor|patch --no-git-tag-version</code> command.
51
- If a change affects all packages one might run <code>pnpm --recursive exec npm --no-git-tag-version version patch</code> to prepare a new version for all packages.</p>
52
- <p>Releases are done by CI when the build pipeline succeeds on the main branch for all packages in the monorepo.</p>
53
- <h2>Testing</h2>
54
- <ul>
55
- <li><p>Cypress</p>
56
- <ul>
57
- <li>For UI testing we recommend Cypress, for an example on how to setup for a package, see the radio-button package.</li>
58
- <li>Note that if you want to use TypeScript and add a custom command, currently you have to add your command into the global cypress config (located inside the cypress folder in the root directory) and type it manually in the types.ts file.</li>
59
- </ul>
60
- </li>
61
- <li><p>Jest</p>
62
- <ul>
63
- <li>For unit testing we recommend Jest, visit the web-api package to see an example how to use it.</li>
10
+ <li><code>dictionary.ts</code><ul>
11
+ <li>Contains the generated JSON object from all the translations and the types based on the found translation files.</li>
64
12
  </ul>
65
13
  </li>
66
14
  </ul>
67
- `,raw:`# SmartDesign - Elements\r
68
- \r
69
- A shared library of Web Components used by both the SmartDesign Web Client and SmartDesign Integrated Web Applications.\r
70
- \r
71
- # Prerequisites\r
72
- \r
73
- The project setup and build configuration requires the followings to be installed.\r
74
- \r
75
- - node 16.x [download](https://nodejs.org/en/download/)\r
76
- - pnpm 7.x [download](https://pnpm.io/installation/)\r
77
- \r
78
- # Install project dependencies\r
79
- \r
80
- - configure nexus credentials for nexus.cas.de\r
81
- - step into project root\r
82
- - execute pnpm \`$> pnpm i\`\r
83
- - this installs dependencies across the workspace\r
84
- \r
85
- # Linters / formatters\r
86
- \r
87
- The project has certain linting / formatting rules defined via stylelint and eslint and prettier.\r
88
- \r
89
- The linters can be executed via \`pnpm lint:check\`, the formatter can be executed via \`pnpm format:check\`.\r
90
- Both of these have a \`fix\` variant as well (\`pnpm lint:fix\` and \`pnpm format:fix\`), which also tries to automatically fix the linting/formatting errors.\r
91
- \r
92
- It is advised to configure the necessary extensions for the IDE for automatic linting and formatting.\r
93
- \r
94
- Note that the CI build is configured to fail if there are linting or formatting errors.\r
95
- \r
96
- For a faster feedback, the linting / formatting can be executed automatically in a pre-commit hook.\r
97
- This can be installed via \`pnpm prepare-hooks\`.\r
98
- \r
99
- ## Building individual packages\r
100
- \r
101
- **There is no project wide build configuration at the moment**\r
102
- \r
103
- - open terminal in the desired package\r
104
- - execute the build script via \`$> pnpm build\`\r
105
- - during development time one can (and should) use \`$> pnpm dev\` which starts a webpack-dev-server instance\r
106
- - the es5 can be set as a target environment with --env es5 like \`$> pnpm dev --env es5=true\` which makes it possible to test the elements for example also in IE 11\r
107
- \r
108
- ## Cross project dependencies\r
109
- \r
110
- - one may configure a dependency from within the workspace without any additional configuration\r
111
- - e.g. sd-z-layout -> sd-custom-element-loader\r
112
- \r
113
- ## Publishing\r
114
- \r
115
- **Publishing is handled automatically by the build pipeline, do not manually publish unless absolutely necessary**\r
116
- \r
117
- The .npmrc contains an auth token for the @cas-smartdesign scope, thus \`pnpm publish\` works by default.\r
118
- \r
119
- Note that pnpm checks if the current branch is your publish branch (\`main\`), clean, and up-to-date.\r
120
- \r
121
- If you don't have the \`main\` branch tracked, do it via \`$> git checkout -t origin/main\`, otherwise\r
122
- use \`$> git checkout main && git pull\` to check out and update your local branch.\r
123
- \r
124
- ## Releasing versions\r
15
+ <h2>Options:</h2>
16
+ <p>Start with <code>-h</code> or <code>--help</code> to list the possible options.</p>
17
+ `,raw:`# @cas-smartdesign/messages-generator\r
125
18
  \r
126
- Release versions should be prepared using the \`npm version major|minor|patch --no-git-tag-version\` command.\r
127
- If a change affects all packages one might run \`pnpm --recursive exec npm --no-git-tag-version version patch\` to prepare a new version for all packages.\r
19
+ A CLI tool to convert usual SmartDesign translations into JSON based Messages.\r
128
20
  \r
129
- Releases are done by CI when the build pipeline succeeds on the main branch for all packages in the monorepo.\r
21
+ The expected naming of the input translation files is \`[name]_[ISO 639-1].properties\` (for example <i>translations_de.properties</i>).\r
130
22
  \r
131
- ## Testing\r
23
+ ## The following files are generated:\r
132
24
  \r
133
- - Cypress\r
25
+ - \`messages.ts\`\r
26
+ - Contains a util which if initialized with a language the corresponding texts are provided from the dictionary.\r
27
+ - \`dictionary.ts\`\r
28
+ - Contains the generated JSON object from all the translations and the types based on the found translation files.\r
134
29
  \r
135
- - For UI testing we recommend Cypress, for an example on how to setup for a package, see the radio-button package.\r
136
- - Note that if you want to use TypeScript and add a custom command, currently you have to add your command into the global cypress config (located inside the cypress folder in the root directory) and type it manually in the types.ts file.\r
30
+ ## Options:\r
137
31
  \r
138
- - Jest\r
139
- - For unit testing we recommend Jest, visit the web-api package to see an example how to use it.\r
140
- `,filename:"readme.md"}});e();var i=a().html;document.querySelector("#markdown-container").innerHTML=i;
32
+ Start with \`-h\` or \`--help\` to list the possible options.\r
33
+ `,filename:"readme.md"}});a();var i=d().html;document.querySelector("#markdown-container").innerHTML=i;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cas-smartdesign/messages-generator",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "A CLI tool to convert usual SmartDesign translations into JSON based Messages",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "tsup": "^8.0.1",
26
- "@cas-smartdesign/license-generator": "^1.6.1"
26
+ "@cas-smartdesign/license-generator": "^1.6.3"
27
27
  },
28
28
  "scripts": {
29
29
  "version": "pnpm version",