umberto 2.1.7 → 2.1.8

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": "umberto",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "CKSource Documentation builder",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -60,7 +60,7 @@
60
60
  "chokidar": "^3.5.3",
61
61
  "eslint": "^8.21.0",
62
62
  "eslint-config-ckeditor5": "^4.0.1",
63
- "husky": "^8.0.0",
63
+ "husky": "^8.0.2",
64
64
  "lint-staged": "^13.0.3",
65
65
  "mocha": "^10.0.0",
66
66
  "mockery": "^2.1.0",
@@ -71,6 +71,7 @@
71
71
  "npm": ">=5.7.1"
72
72
  },
73
73
  "scripts": {
74
+ "postinstall": "node ./scripts/postinstall.js",
74
75
  "dev:build-single": "node ./scripts-dev/build-single.js",
75
76
  "dev:build-multi": "node ./scripts-dev/build-multi.js",
76
77
  "dev:serve": "node ./scripts-dev/serve.js",
@@ -79,8 +80,7 @@
79
80
  "coverage": "nyc --reporter=lcov --reporter=text-summary --cache false npm run test",
80
81
  "changelog": "node ./scripts-dev/changelog.js",
81
82
  "release:bump-version": "node ./scripts-dev/bump-version.js",
82
- "release:publish": "node ./scripts-dev/publish.js",
83
- "prepare": "husky install"
83
+ "release:publish": "node ./scripts-dev/publish.js"
84
84
  },
85
85
  "author": "CKSource (http://cksource.com/)",
86
86
  "license": "MIT",
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license Copyright (c) 2017-2022, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ /* eslint-env node */
9
+
10
+ const path = require( 'path' );
11
+ const fs = require( 'fs' );
12
+ const ROOT_DIRECTORY = path.join( __dirname, '..' );
13
+
14
+ // When installing a repository as a dependency, the `.git` directory does not exist.
15
+ // In such a case, husky should not attach its hooks as npm treats it as a package, not a git repository.
16
+ if ( fs.existsSync( path.join( ROOT_DIRECTORY, '.git' ) ) ) {
17
+ require( 'husky' ).install();
18
+ }
@@ -368,7 +368,7 @@ function getPackagesPathsInfo( rootPath, slug, directory ) {
368
368
  // CKEditor 5 can have packages that do not start with `ckeditor5-` prefix.
369
369
  const slugOrRegExp = slug === 'ckeditor5' ? /ckeditor5?-/ : `${ slug }-`;
370
370
 
371
- return glob.sync( upath.resolve( rootPath, directory, '*' ) )
371
+ return glob.sync( upath.resolve( rootPath, directory ) )
372
372
  .map( p => {
373
373
  const relativePath = p.replace( rootPath + '/', '' );
374
374
 
@@ -10,6 +10,11 @@ mixin classItem( item )
10
10
  li( class="collapsing-list__item collapsing-list__item--visible" )&attributes( attrData )
11
11
  div( class="collapsing-list__term" id=item.id )
12
12
  h3
13
+ if isNonEmptyArray( item.badges )
14
+ p.badges
15
+ each badge in item.badges
16
+ +badge( badge )
17
+
13
18
  code
14
19
  +linkOrText( item.longname, {
15
20
  doStripLongname: false,
@@ -18,10 +23,6 @@ mixin classItem( item )
18
23
 
19
24
  +devNames( item.longname )
20
25
 
21
- if isNonEmptyArray( item.badges )
22
- p.badges
23
- each badge in item.badges
24
- +badge( badge )
25
26
  if ( item.description && item.description.excerpt )
26
27
  div.collapsing-list__description
27
28
  p( class="collapsing-list__excerpt collapsing-list__excerpt--short" )
@@ -1,3 +1,3 @@
1
1
  mixin devNames( name )
2
- span.collapsing-list__dev-names( aria-hidden='true' )
2
+ span.collapsing-list__dev-names( aria-hidden='true', title=name )
3
3
  code #{ name }
@@ -16,6 +16,12 @@ mixin method( met )
16
16
  - const id = encodeURI( met.id )
17
17
  div( class="collapsing-list__term toggler--collapsed" id=id )
18
18
  h3
19
+ //- badges
20
+ if isNonEmptyArray( met.badges )
21
+ p.badges
22
+ each badge in met.badges
23
+ +badge( badge )
24
+
19
25
  code
20
26
  a( class="member-name" href="#" + id ) #{ met.name }
21
27
 
@@ -41,13 +47,9 @@ mixin method( met )
41
47
  if isNonEmptyArray( met.returns[0].types )
42
48
  +type( met.returns[0].types )
43
49
 
44
- +devNames( met.longname )
45
50
 
46
- //- badges
47
- if isNonEmptyArray( met.badges )
48
- p.badges
49
- each badge in met.badges
50
- +badge( badge )
51
+
52
+ +devNames( met.longname )
51
53
 
52
54
  div.collapsing-list__description
53
55
  if ( met.description && met.description.excerpt )
@@ -12,6 +12,11 @@ mixin property( prop )
12
12
  li( class = itemClasses )&attributes( attrData )
13
13
  div( class="collapsing-list__term toggler--collapsed" id=prop.id )
14
14
  h3
15
+ if isNonEmptyArray( prop.badges )
16
+ p.badges
17
+ each badge in prop.badges
18
+ +badge( badge )
19
+
15
20
  code
16
21
  a( class="member-name" href="#" + prop.id ) #{ prop.name }
17
22
 
@@ -21,11 +26,6 @@ mixin property( prop )
21
26
 
22
27
  +devNames( prop.longname )
23
28
 
24
- if isNonEmptyArray( prop.badges )
25
- p.badges
26
- each badge in prop.badges
27
- +badge( badge )
28
-
29
29
  div.collapsing-list__description
30
30
  if ( prop.description && prop.description.excerpt )
31
31
  div.collapsing-list__excerpt
@@ -6,7 +6,7 @@
6
6
 
7
7
  div.info-box.notice.notice__feedback
8
8
  p
9
- | Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing?
9
+ | Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing?
10
10
  | Please report it via our!{' '}
11
11
  a( href=githubUrl.toString() id='report-widget-issue-tracker' ) issue tracker
12
12
  | .
@@ -148,10 +148,17 @@ ul.collapsing-list {
148
148
 
149
149
  margin-bottom: 0;
150
150
  padding-top: 0;
151
+ width: 100%;
151
152
 
152
153
  &:first-of-type {
153
154
  flex: 2;
154
155
  }
156
+
157
+ .badges {
158
+ text-align: right;
159
+ float: right;
160
+ margin-left: u-spacing( 0 );
161
+ }
155
162
  }
156
163
 
157
164
  p {
@@ -159,11 +166,6 @@ ul.collapsing-list {
159
166
  padding-top: 0;
160
167
  }
161
168
 
162
- .badges {
163
- text-align: right;
164
- margin-left: u-spacing( 0 );
165
- }
166
-
167
169
  &.hidden {
168
170
  &::before {
169
171
  display: none;
@@ -241,6 +243,12 @@ ul.collapsing-list {
241
243
  color: u-color( 'text', 40% );
242
244
  font-size: u-font-size( -1 );
243
245
  cursor: default;
246
+ white-space: nowrap;
247
+ overflow: hidden;
248
+ text-overflow: ellipsis;
249
+ direction: rtl;
250
+ text-align: left;
251
+ width: 100%;
244
252
  }
245
253
  & code {
246
254
  display: none;