web-documentation 1.0.27 → 1.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-documentation",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Declarative multilanguage documentation website generator",
5
5
  "keywords": [
6
6
  "documentation",
@@ -204,9 +204,8 @@
204
204
  "ejs": {
205
205
  "options": {
206
206
  "locals": {
207
- "API_DOCUMENTATION_PATH": {
208
- "__evaluate__": "path.resolve(currentPath, 'api/')"
209
- },
207
+ "API_DOCUMENTATION_PATH": "api/",
208
+ "HAS_API_DOCUMENTATION": true,
210
209
  "CONTENT": "source/dummyReadme.md",
211
210
  "DISTRIBUTION_BUNDLE_FILE_PATH": "dummyDistributionBundle.zip",
212
211
  "LANGUAGES": {
package/source/deploy.ts CHANGED
@@ -88,7 +88,7 @@ const BUILD_DOCUMENTATION_PAGE_CONFIGURATION = {
88
88
  }
89
89
  },
90
90
  /*
91
- NOTE: We habe to disable offline features since the domains cache is
91
+ NOTE: We have to disable offline features since the domains cache is
92
92
  already in use for the main home page.
93
93
  */
94
94
  offline: null
@@ -179,7 +179,7 @@ const stream2buffer = async (stream: Stream): Promise<Buffer> => {
179
179
  * @param temporaryDocumentationFolderPath - Location where to build
180
180
  * documentation build.
181
181
  * @param distributionBundleFilePath - Location where to save the exported
182
- * build artefacts.
182
+ * build artifacts.
183
183
  * @returns A promise resolving when build process has finished.
184
184
  */
185
185
  const generateAndPushNewDocumentationPage = async (
@@ -259,6 +259,7 @@ const generateAndPushNewDocumentationPage = async (
259
259
  ...parameters,
260
260
  CONTENT,
261
261
  API_DOCUMENTATION_PATH: apiDocumentationPath,
262
+ HAS_API_DOCUMENTATION,
262
263
  DISTRIBUTION_BUNDLE_FILE_PATH:
263
264
  await isFile(DISTRIBUTION_BUNDLE_FILE_PATH) ?
264
265
  relative('./', DISTRIBUTION_BUNDLE_FILE_PATH) :
@@ -721,7 +722,7 @@ const main = async (): Promise<void> => {
721
722
  Boolean(SCOPE.scripts) &&
722
723
  Object.prototype.hasOwnProperty.call(SCOPE.scripts, 'build')
723
724
  )
724
- // Prepare build artefacts for further local usage.
725
+ // Prepare build artifacts for further local usage.
725
726
  log.debug(run('yarn build'))
726
727
  }
727
728
  }
@@ -115,10 +115,7 @@ _%>
115
115
  numberOfLanguageLinks = _.LANGUAGES.length
116
116
  START_UP_ANIMATION_NUMBER += numberOfLanguageLinks
117
117
  }
118
- if (
119
- _.API_DOCUMENTATION_PATH &&
120
- _.IS_DIRECTORY(_.API_DOCUMENTATION_PATH)
121
- )
118
+ if (_.HAS_API_DOCUMENTATION)
122
119
  START_UP_ANIMATION_NUMBER += 3
123
120
  else
124
121
  START_UP_ANIMATION_NUMBER += 2
@@ -158,12 +155,8 @@ _%>
158
155
  class="header__inner__links__lang tools-hidden-on-javascript-disabled wu-start-up-animation-number-<%- START_UP_ANIMATION_NUMBER %>"
159
156
  href="#lang-<%- language %>"
160
157
  ><%- language.slice(0, 2) %></a>
161
- <%_ }
162
- if (
163
- _.API_DOCUMENTATION_PATH &&
164
- _.IS_DIRECTORY(_.API_DOCUMENTATION_PATH)
165
- ) {
166
- _%>
158
+ <%_ } _%>
159
+ <%_ if (_.HAS_API_DOCUMENTATION) { _%>
167
160
  <%_ START_UP_ANIMATION_NUMBER -= 1 _%>
168
161
  <a
169
162
  class="header__inner__links__api-link wu-start-up-animation-number-<%- START_UP_ANIMATION_NUMBER %>"