umberto 2.1.6 → 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.6",
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,21 +47,18 @@ 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 )
54
56
  div.collapsing-list__excerpt
55
57
  p !{ met.description.excerpt }
56
- +seeSource( met )
57
58
 
58
59
  div.collapsing-list__content
60
+ +seeSource( met )
61
+
59
62
  if ( met.description )
60
63
  | !{ met.description.content }
61
64
 
@@ -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,18 +26,14 @@ 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
32
32
  p !{ prop.description.excerpt }
33
- +seeSource( prop )
34
33
 
35
34
  div.collapsing-list__content
35
+ +seeSource( prop )
36
+
36
37
  if ( prop.description )
37
38
  | !{ prop.description.content }
38
39
 
@@ -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
  | .
@@ -26,7 +26,9 @@
26
26
  .toggler--expanded + .collapsing-list__description {
27
27
  .see-source {
28
28
  display: block;
29
+ float: right;
29
30
  margin-left: 50px;
31
+ margin-bottom: 12px;
30
32
  }
31
33
  }
32
34
  }
@@ -123,7 +123,9 @@ ul.collapsing-list {
123
123
 
124
124
  .see-source {
125
125
  display: block;
126
+ float: right;
126
127
  margin-left: 50px;
128
+ margin-bottom: 12px;
127
129
  }
128
130
  }
129
131
  }
@@ -146,10 +148,17 @@ ul.collapsing-list {
146
148
 
147
149
  margin-bottom: 0;
148
150
  padding-top: 0;
151
+ width: 100%;
149
152
 
150
153
  &:first-of-type {
151
154
  flex: 2;
152
155
  }
156
+
157
+ .badges {
158
+ text-align: right;
159
+ float: right;
160
+ margin-left: u-spacing( 0 );
161
+ }
153
162
  }
154
163
 
155
164
  p {
@@ -157,11 +166,6 @@ ul.collapsing-list {
157
166
  padding-top: 0;
158
167
  }
159
168
 
160
- .badges {
161
- text-align: right;
162
- margin-left: u-spacing( 0 );
163
- }
164
-
165
169
  &.hidden {
166
170
  &::before {
167
171
  display: none;
@@ -239,6 +243,12 @@ ul.collapsing-list {
239
243
  color: u-color( 'text', 40% );
240
244
  font-size: u-font-size( -1 );
241
245
  cursor: default;
246
+ white-space: nowrap;
247
+ overflow: hidden;
248
+ text-overflow: ellipsis;
249
+ direction: rtl;
250
+ text-align: left;
251
+ width: 100%;
242
252
  }
243
253
  & code {
244
254
  display: none;