fomantic-ui 2.10.0-beta.0 → 2.10.0-beta.10

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 (288) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/.eslintrc.js +0 -10
  3. package/.github/workflows/ci.yml +3 -3
  4. package/CONTRIBUTING.md +4 -1
  5. package/CONTRIBUTORS.md +1 -0
  6. package/FAQ.md +7 -2
  7. package/README.md +5 -9
  8. package/ROADMAP.md +4 -4
  9. package/SECURITY.md +8 -7
  10. package/changelog-setup.js +64 -70
  11. package/dist/components/accordion.css +1 -1
  12. package/dist/components/accordion.js +103 -142
  13. package/dist/components/accordion.min.css +1 -1
  14. package/dist/components/accordion.min.js +2 -2
  15. package/dist/components/ad.css +1 -1
  16. package/dist/components/ad.min.css +1 -1
  17. package/dist/components/api.js +157 -210
  18. package/dist/components/api.min.js +2 -2
  19. package/dist/components/breadcrumb.css +1 -1
  20. package/dist/components/breadcrumb.min.css +1 -1
  21. package/dist/components/button.css +1 -2
  22. package/dist/components/button.min.css +2 -2
  23. package/dist/components/calendar.css +1 -2
  24. package/dist/components/calendar.js +314 -352
  25. package/dist/components/calendar.min.css +2 -2
  26. package/dist/components/calendar.min.js +2 -2
  27. package/dist/components/card.css +1 -1
  28. package/dist/components/card.min.css +1 -1
  29. package/dist/components/checkbox.css +1 -2
  30. package/dist/components/checkbox.js +85 -135
  31. package/dist/components/checkbox.min.css +2 -2
  32. package/dist/components/checkbox.min.js +2 -2
  33. package/dist/components/comment.css +1 -1
  34. package/dist/components/comment.min.css +1 -1
  35. package/dist/components/container.css +2 -4
  36. package/dist/components/container.min.css +2 -2
  37. package/dist/components/dimmer.css +1 -11
  38. package/dist/components/dimmer.js +61 -94
  39. package/dist/components/dimmer.min.css +2 -2
  40. package/dist/components/dimmer.min.js +2 -2
  41. package/dist/components/divider.css +1 -2
  42. package/dist/components/divider.min.css +2 -2
  43. package/dist/components/dropdown.css +30 -51
  44. package/dist/components/dropdown.js +736 -1055
  45. package/dist/components/dropdown.min.css +2 -2
  46. package/dist/components/dropdown.min.js +2 -2
  47. package/dist/components/embed.css +1 -1
  48. package/dist/components/embed.js +85 -114
  49. package/dist/components/embed.min.css +1 -1
  50. package/dist/components/embed.min.js +2 -2
  51. package/dist/components/emoji.css +3809 -7617
  52. package/dist/components/emoji.min.css +2 -2
  53. package/dist/components/feed.css +1 -1
  54. package/dist/components/feed.min.css +1 -1
  55. package/dist/components/flag.css +1 -1
  56. package/dist/components/flag.min.css +1 -1
  57. package/dist/components/flyout.css +2 -3
  58. package/dist/components/flyout.js +226 -355
  59. package/dist/components/flyout.min.css +2 -2
  60. package/dist/components/flyout.min.js +2 -2
  61. package/dist/components/form.css +5 -95
  62. package/dist/components/form.js +335 -444
  63. package/dist/components/form.min.css +2 -2
  64. package/dist/components/form.min.js +2 -2
  65. package/dist/components/grid.css +2 -58
  66. package/dist/components/grid.min.css +2 -2
  67. package/dist/components/header.css +1 -1
  68. package/dist/components/header.min.css +1 -1
  69. package/dist/components/icon.css +4 -4
  70. package/dist/components/icon.min.css +2 -2
  71. package/dist/components/image.css +1 -1
  72. package/dist/components/image.min.css +1 -1
  73. package/dist/components/input.css +1 -536
  74. package/dist/components/input.min.css +2 -2
  75. package/dist/components/item.css +1 -1
  76. package/dist/components/item.min.css +1 -1
  77. package/dist/components/label.css +1 -1
  78. package/dist/components/label.min.css +1 -1
  79. package/dist/components/list.css +1 -3
  80. package/dist/components/list.min.css +2 -2
  81. package/dist/components/loader.css +1 -1
  82. package/dist/components/loader.min.css +1 -1
  83. package/dist/components/menu.css +1 -9
  84. package/dist/components/menu.min.css +2 -2
  85. package/dist/components/message.css +1 -1
  86. package/dist/components/message.min.css +1 -1
  87. package/dist/components/modal.css +5 -9
  88. package/dist/components/modal.js +261 -384
  89. package/dist/components/modal.min.css +2 -2
  90. package/dist/components/modal.min.js +2 -2
  91. package/dist/components/nag.css +1 -1
  92. package/dist/components/nag.js +68 -98
  93. package/dist/components/nag.min.css +1 -1
  94. package/dist/components/nag.min.js +2 -2
  95. package/dist/components/placeholder.css +1 -1
  96. package/dist/components/placeholder.min.css +1 -1
  97. package/dist/components/popup.css +1 -2
  98. package/dist/components/popup.js +198 -271
  99. package/dist/components/popup.min.css +2 -2
  100. package/dist/components/popup.min.js +2 -2
  101. package/dist/components/progress.css +1 -1
  102. package/dist/components/progress.js +109 -144
  103. package/dist/components/progress.min.css +1 -1
  104. package/dist/components/progress.min.js +2 -2
  105. package/dist/components/rail.css +1 -1
  106. package/dist/components/rail.min.css +1 -1
  107. package/dist/components/rating.css +1 -1
  108. package/dist/components/rating.js +91 -123
  109. package/dist/components/rating.min.css +1 -1
  110. package/dist/components/rating.min.js +2 -2
  111. package/dist/components/reset.css +1 -1
  112. package/dist/components/reset.min.css +1 -1
  113. package/dist/components/reveal.css +1 -1
  114. package/dist/components/reveal.min.css +1 -1
  115. package/dist/components/search.css +2 -9
  116. package/dist/components/search.js +277 -379
  117. package/dist/components/search.min.css +2 -2
  118. package/dist/components/search.min.js +2 -2
  119. package/dist/components/segment.css +2 -7
  120. package/dist/components/segment.min.css +2 -2
  121. package/dist/components/shape.css +1 -2
  122. package/dist/components/shape.js +158 -224
  123. package/dist/components/shape.min.css +2 -2
  124. package/dist/components/shape.min.js +2 -2
  125. package/dist/components/sidebar.css +2 -3
  126. package/dist/components/sidebar.js +124 -206
  127. package/dist/components/sidebar.min.css +2 -2
  128. package/dist/components/sidebar.min.js +2 -2
  129. package/dist/components/site.css +9 -25
  130. package/dist/components/site.js +38 -57
  131. package/dist/components/site.min.css +2 -2
  132. package/dist/components/site.min.js +2 -2
  133. package/dist/components/slider.css +1 -1
  134. package/dist/components/slider.js +246 -329
  135. package/dist/components/slider.min.css +1 -1
  136. package/dist/components/slider.min.js +2 -2
  137. package/dist/components/state.js +70 -100
  138. package/dist/components/state.min.js +2 -2
  139. package/dist/components/statistic.css +1 -1
  140. package/dist/components/statistic.min.css +1 -1
  141. package/dist/components/step.css +1 -1
  142. package/dist/components/step.min.css +1 -1
  143. package/dist/components/sticky.css +1 -1
  144. package/dist/components/sticky.js +135 -180
  145. package/dist/components/sticky.min.css +1 -1
  146. package/dist/components/sticky.min.js +2 -2
  147. package/dist/components/tab.css +1 -1
  148. package/dist/components/tab.js +176 -244
  149. package/dist/components/tab.min.css +1 -1
  150. package/dist/components/tab.min.js +2 -2
  151. package/dist/components/table.css +3 -37
  152. package/dist/components/table.min.css +2 -2
  153. package/dist/components/text.css +1 -1
  154. package/dist/components/text.min.css +1 -1
  155. package/dist/components/toast.css +1 -3
  156. package/dist/components/toast.js +109 -147
  157. package/dist/components/toast.min.css +1 -1
  158. package/dist/components/toast.min.js +2 -2
  159. package/dist/components/transition.css +1 -1
  160. package/dist/components/transition.js +91 -146
  161. package/dist/components/transition.min.css +1 -1
  162. package/dist/components/transition.min.js +2 -2
  163. package/dist/components/visibility.js +146 -224
  164. package/dist/components/visibility.min.js +2 -2
  165. package/dist/semantic.css +3906 -8720
  166. package/dist/semantic.js +4397 -6155
  167. package/dist/semantic.min.css +2 -2
  168. package/dist/semantic.min.js +2 -2
  169. package/examples/assets/show-examples.js +2 -4
  170. package/gulpfile.js +5 -7
  171. package/package.json +20 -16
  172. package/scripts/nightly-version.js +7 -10
  173. package/src/README.md +3 -3
  174. package/src/definitions/behaviors/api.js +156 -209
  175. package/src/definitions/behaviors/form.js +334 -443
  176. package/src/definitions/behaviors/state.js +69 -99
  177. package/src/definitions/behaviors/visibility.js +145 -223
  178. package/src/definitions/collections/form.less +1 -13
  179. package/src/definitions/collections/grid.less +1 -61
  180. package/src/definitions/collections/menu.less +0 -11
  181. package/src/definitions/collections/table.less +1 -35
  182. package/src/definitions/elements/input.less +1 -61
  183. package/src/definitions/elements/segment.less +0 -6
  184. package/src/definitions/globals/site.js +37 -56
  185. package/src/definitions/globals/site.less +2 -18
  186. package/src/definitions/modules/accordion.js +102 -141
  187. package/src/definitions/modules/calendar.js +313 -351
  188. package/src/definitions/modules/checkbox.js +84 -134
  189. package/src/definitions/modules/dimmer.js +60 -93
  190. package/src/definitions/modules/dimmer.less +0 -9
  191. package/src/definitions/modules/dropdown.js +735 -1054
  192. package/src/definitions/modules/dropdown.less +31 -47
  193. package/src/definitions/modules/embed.js +84 -113
  194. package/src/definitions/modules/flyout.js +225 -354
  195. package/src/definitions/modules/modal.js +260 -383
  196. package/src/definitions/modules/modal.less +1 -1
  197. package/src/definitions/modules/nag.js +67 -97
  198. package/src/definitions/modules/popup.js +197 -270
  199. package/src/definitions/modules/progress.js +108 -143
  200. package/src/definitions/modules/rating.js +90 -122
  201. package/src/definitions/modules/search.js +276 -378
  202. package/src/definitions/modules/search.less +0 -3
  203. package/src/definitions/modules/shape.js +157 -223
  204. package/src/definitions/modules/sidebar.js +123 -205
  205. package/src/definitions/modules/slider.js +245 -328
  206. package/src/definitions/modules/slider.less +1 -1
  207. package/src/definitions/modules/sticky.js +134 -179
  208. package/src/definitions/modules/tab.js +175 -243
  209. package/src/definitions/modules/toast.js +108 -146
  210. package/src/definitions/modules/toast.less +1 -1
  211. package/src/definitions/modules/transition.js +90 -145
  212. package/src/theme.less +0 -13
  213. package/src/themes/basic/elements/icon.variables +1 -1
  214. package/src/themes/default/collections/grid.variables +0 -30
  215. package/src/themes/default/collections/table.variables +1 -5
  216. package/src/themes/default/elements/icon.variables +3 -3
  217. package/src/themes/default/globals/site.variables +8 -15
  218. package/src/themes/default/globals/variation.variables +1 -2
  219. package/src/themes/default/modules/dropdown.variables +1 -0
  220. package/src/themes/default/modules/slider.variables +1 -1
  221. package/src/themes/github/elements/icon.variables +1 -1
  222. package/src/themes/material/elements/icon.variables +1 -1
  223. package/tasks/README.md +1 -1
  224. package/tasks/admin/components/create.js +89 -122
  225. package/tasks/admin/components/init.js +34 -65
  226. package/tasks/admin/components/update.js +50 -61
  227. package/tasks/admin/distributions/create.js +71 -111
  228. package/tasks/admin/distributions/init.js +32 -63
  229. package/tasks/admin/distributions/update.js +49 -57
  230. package/tasks/admin/publish.js +1 -1
  231. package/tasks/admin/register.js +14 -19
  232. package/tasks/admin/release.js +2 -2
  233. package/tasks/build/assets.js +14 -18
  234. package/tasks/build/css.js +59 -68
  235. package/tasks/build/javascript.js +48 -56
  236. package/tasks/build.js +4 -6
  237. package/tasks/check-install.js +5 -8
  238. package/tasks/clean.js +5 -7
  239. package/tasks/collections/admin.js +14 -16
  240. package/tasks/collections/build.js +6 -8
  241. package/tasks/collections/docs.js +4 -6
  242. package/tasks/collections/install.js +2 -4
  243. package/tasks/collections/rtl.js +2 -4
  244. package/tasks/collections/various.js +2 -4
  245. package/tasks/config/admin/github.js +9 -19
  246. package/tasks/config/admin/templates/README.md +2 -2
  247. package/tasks/config/admin/templates/bower.json +2 -4
  248. package/tasks/config/admin/templates/composer.json +1 -1
  249. package/tasks/config/admin/templates/css-package.js +1 -4
  250. package/tasks/config/admin/templates/less-package.js +1 -3
  251. package/tasks/config/defaults.js +0 -1
  252. package/tasks/config/npm/gulpfile.js +4 -6
  253. package/tasks/config/project/config.js +27 -35
  254. package/tasks/config/project/install.js +64 -82
  255. package/tasks/config/project/release.js +7 -9
  256. package/tasks/config/tasks.js +16 -30
  257. package/tasks/config/user.js +14 -20
  258. package/tasks/docs/build.js +26 -31
  259. package/tasks/docs/metadata.js +30 -39
  260. package/tasks/docs/serve.js +23 -27
  261. package/tasks/install.js +94 -128
  262. package/tasks/rtl/build.js +2 -4
  263. package/tasks/rtl/watch.js +3 -5
  264. package/tasks/watch.js +13 -13
  265. package/test/meteor/fonts.js +1 -2
  266. package/test/modules/module.spec.js +16 -18
  267. package/types/fomantic-ui-calendar.d.ts +1 -1
  268. package/types/fomantic-ui-dropdown.d.ts +45 -1
  269. package/types/fomantic-ui-embed.d.ts +1 -1
  270. package/types/fomantic-ui-flyout.d.ts +1 -1
  271. package/types/fomantic-ui-form.d.ts +0 -7
  272. package/types/fomantic-ui-modal.d.ts +1 -1
  273. package/types/fomantic-ui-search.d.ts +12 -6
  274. package/types/fomantic-ui-toast.d.ts +1 -1
  275. package/src/themes/basic/assets/fonts/icons.woff +0 -0
  276. package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
  277. package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
  278. package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
  279. package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
  280. package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
  281. package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
  282. package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
  283. package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
  284. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  285. package/src/themes/default/assets/fonts/icons.woff +0 -0
  286. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  287. package/src/themes/github/assets/fonts/octicons.woff +0 -0
  288. package/src/themes/material/assets/fonts/icons.woff +0 -0
@@ -8,41 +8,36 @@
8
8
 
9
9
  * Commits changes from create repo
10
10
  * Pushes changes to GitHub
11
- * Tag new releases if version changed in main repo
11
+ * Tag new releases if the version changed in main repo
12
12
 
13
13
  */
14
14
 
15
- const
16
- // node dependencies
17
- fs = require('fs'),
18
- path = require('path'),
19
- console = require('@fomantic/better-console'),
20
- gulp = require('gulp'),
21
- git = require('@fomantic/gulp-git'),
15
+ // node dependencies
16
+ const fs = require('node:fs');
17
+ const path = require('node:path');
18
+ const console = require('@fomantic/better-console');
19
+ const gulp = require('gulp');
20
+ const git = require('@fomantic/gulp-git');
22
21
 
23
- // admin files
24
- release = require('../../config/admin/release'),
25
- project = require('../../config/project/release'),
22
+ // admin files
23
+ const release = require('../../config/admin/release');
24
+ const project = require('../../config/project/release');
26
25
 
27
- // oAuth configuration for GitHub
28
- oAuth = fs.existsSync(path.join(__dirname, '/../../config/admin/oauth.js'))
29
- ? require('../../config/admin/oauth.js') // eslint-disable-line import/extensions
30
- : false,
26
+ // oAuth configuration for GitHub
27
+ const oAuth = fs.existsSync(path.join(__dirname, '/../../config/admin/oauth.js'))
28
+ ? require('../../config/admin/oauth.js') // eslint-disable-line import/extensions
29
+ : false;
31
30
 
32
- // shorthand
33
- version = project.version
34
- ;
31
+ // shorthand
32
+ const version = project.version;
35
33
 
36
34
  module.exports = function (callback) {
37
35
  const github = require('../../config/admin/github'); // eslint-disable-line global-require
38
36
 
39
- let
40
- index = -1,
41
- total = release.distributions.length,
42
- timer,
43
- stream,
44
- stepRepo
45
- ;
37
+ let index = -1;
38
+ let total = release.distributions.length;
39
+ let timer;
40
+ let stepRepo;
46
41
 
47
42
  if (!oAuth) {
48
43
  console.error('Must add oauth token for GitHub in tasks/config/admin/oauth.js');
@@ -50,7 +45,7 @@ module.exports = function (callback) {
50
45
  return;
51
46
  }
52
47
 
53
- // Do Git commands synchronously per distribution, to avoid issues
48
+ // Do the Git commands synchronously per distribution, to avoid issues
54
49
  stepRepo = function () {
55
50
  index += 1;
56
51
  if (index >= total) {
@@ -59,37 +54,35 @@ module.exports = function (callback) {
59
54
  return;
60
55
  }
61
56
 
62
- let
63
- distribution = release.distributions[index],
64
- outputDirectory = path.resolve(path.join(release.outputRoot, distribution.toLowerCase())),
65
- repoName = release.distRepoRoot + distribution,
57
+ let distribution = release.distributions[index];
58
+ let outputDirectory = path.resolve(path.join(release.outputRoot, distribution.toLowerCase()));
59
+ let repoName = release.distRepoRoot + distribution;
66
60
 
67
- commitArgs = oAuth.name !== undefined && oAuth.email !== undefined
68
- ? '--author "' + oAuth.name + ' <' + oAuth.email + '>"'
69
- : '',
61
+ let commitArgs = oAuth.name !== undefined && oAuth.email !== undefined
62
+ ? '--author "' + oAuth.name + ' <' + oAuth.email + '>"'
63
+ : '';
70
64
 
71
- distributionPackage = fs.existsSync(outputDirectory + 'package.json')
72
- ? require(outputDirectory + 'package.json') // eslint-disable-line global-require, import/no-dynamic-require
73
- : false,
65
+ let distributionPackage = fs.existsSync(outputDirectory + 'package.json')
66
+ ? require(outputDirectory + 'package.json') // eslint-disable-line global-require, import/no-dynamic-require
67
+ : false;
74
68
 
75
- isNewVersion = version && distributionPackage.version !== version,
69
+ let isNewVersion = version && distributionPackage.version !== version;
76
70
 
77
- commitMessage = isNewVersion
78
- ? 'Updated distribution to version ' + version
79
- : 'Updated files from main repo',
71
+ let commitMessage = isNewVersion
72
+ ? 'Updated distribution to version ' + version
73
+ : 'Updated files from main repo';
80
74
 
81
- gitOptions = { cwd: outputDirectory, encoding: false },
82
- commitOptions = { args: commitArgs, cwd: outputDirectory },
83
- releaseOptions = { tag_name: version, owner: release.org, repo: repoName },
75
+ let gitOptions = { cwd: outputDirectory, encoding: false };
76
+ let commitOptions = { args: commitArgs, cwd: outputDirectory };
77
+ let releaseOptions = { tag_name: version, owner: release.org, repo: repoName };
84
78
 
85
- fileModeOptions = { args: 'config core.fileMode false', cwd: outputDirectory },
86
- usernameOptions = { args: 'config user.name "' + oAuth.name + '"', cwd: outputDirectory },
87
- emailOptions = { args: 'config user.email "' + oAuth.email + '"', cwd: outputDirectory },
88
- versionOptions = { args: 'rev-parse --verify HEAD', cwd: outputDirectory },
79
+ let fileModeOptions = { args: 'config core.fileMode false', cwd: outputDirectory };
80
+ let usernameOptions = { args: 'config user.name "' + oAuth.name + '"', cwd: outputDirectory };
81
+ let emailOptions = { args: 'config user.email "' + oAuth.email + '"', cwd: outputDirectory };
82
+ let versionOptions = { args: 'rev-parse --verify HEAD', cwd: outputDirectory };
89
83
 
90
- localRepoSetup = fs.existsSync(path.join(outputDirectory, '.git')),
91
- canProceed = true
92
- ;
84
+ let localRepoSetup = fs.existsSync(path.join(outputDirectory, '.git'));
85
+ let canProceed = true;
93
86
 
94
87
  console.info('Processing repository:' + outputDirectory);
95
88
 
@@ -110,24 +103,23 @@ module.exports = function (callback) {
110
103
  gulp.src('./', gitOptions)
111
104
  .pipe(git.add(gitOptions))
112
105
  .pipe(git.commit(commitMessage, commitOptions), function () {})
113
- .on('error', function (error) {
106
+ .on('error', function () {
114
107
  // canProceed = false; bug in git commit <https://github.com/stevelacy/gulp-git/issues/49>
115
108
  })
116
- .on('finish', function (callback) {
109
+ .on('finish', function () {
117
110
  if (canProceed) {
118
111
  pushFiles();
119
112
  } else {
120
113
  console.info('Nothing new to commit');
121
114
  nextRepo();
122
115
  }
123
- })
124
- ;
116
+ });
125
117
  }
126
118
 
127
119
  // push changes to remote
128
120
  function pushFiles() {
129
121
  console.info('Pushing files for ' + distribution);
130
- git.push('origin', 'master', { args: '', cwd: outputDirectory }, function (error) {
122
+ git.push('origin', 'master', { args: '', cwd: outputDirectory }, function () {
131
123
  console.info('Push completed successfully');
132
124
  getSHA();
133
125
  });
@@ -148,10 +140,10 @@ module.exports = function (callback) {
148
140
  }
149
141
  github.repos.createRelease(releaseOptions, function () {
150
142
  nextRepo();
151
- });
143
+ }).then();
152
144
  }
153
145
 
154
- // Steps to next repository
146
+ // Steps to the next repository
155
147
  function nextRepo() {
156
148
  console.log('Sleeping for 1 second...');
157
149
  // avoid rate throttling
@@ -15,6 +15,6 @@ const gulp = require('gulp');
15
15
  module.exports = function (callback) {
16
16
  gulp.series(
17
17
  'update distributions', // commit less/css versions to github
18
- 'update components' // commit components to github
18
+ 'update components' // commit components to GitHub
19
19
  )(callback);
20
20
  };
@@ -4,30 +4,27 @@
4
4
 
5
5
  /*
6
6
  Task to register component repos with Package Managers
7
- * Registers component with bower
8
- * Registers component with NPM
7
+ * Registers a component with bower
8
+ * Registers a component with NPM
9
9
  */
10
10
 
11
11
  // node dependencies
12
- const process = require('child_process');
12
+ const process = require('node:child_process');
13
13
 
14
14
  // config
15
15
  const release = require('../config/admin/release');
16
16
 
17
- let
18
- // register components and distributions
19
- repos = release.distributions.concat(release.components),
20
- total = repos.length,
21
- index = -1,
17
+ // register components and distributions
18
+ let repos = release.distributions.concat(release.components);
19
+ let total = repos.length;
20
+ let index = -1;
22
21
 
23
- stream,
24
- stepRepo
25
- ;
22
+ let stepRepo;
26
23
 
27
24
  module.exports = function (callback) {
28
25
  console.log('Registering repos with package managers');
29
26
 
30
- // Do Git commands synchronously per component, to avoid issues
27
+ // Do the Git commands synchronously per component, to avoid issues
31
28
  stepRepo = function () {
32
29
  index += 1;
33
30
  if (index >= total) {
@@ -35,13 +32,11 @@ module.exports = function (callback) {
35
32
 
36
33
  return;
37
34
  }
38
- let
39
- repo = repos[index].toLowerCase(),
40
- outputDirectory = release.outputRoot + repo + '/',
41
- exec = process.exec,
42
- execSettings = { cwd: outputDirectory },
43
- updateNPM = 'npm publish;meteor publish;'
44
- ;
35
+ let repo = repos[index].toLowerCase();
36
+ let outputDirectory = release.outputRoot + repo + '/';
37
+ let exec = process.exec;
38
+ let execSettings = { cwd: outputDirectory };
39
+ let updateNPM = 'npm publish;meteor publish;';
45
40
 
46
41
  /* Register with NPM */
47
42
  exec(updateNPM, execSettings, function (err, stdout, stderr) {
@@ -16,9 +16,9 @@ const gulp = require('gulp');
16
16
  module.exports = function (callback) {
17
17
  gulp.series(
18
18
  // 'build', // build Fomantic
19
- 'init distributions', // sync with current github version
19
+ 'init distributions', // sync with the current GitHub version
20
20
  'create distributions', // update each repo with changes from master repo
21
- 'init components', // sync with current github version
21
+ 'init components', // sync with the current GitHub version
22
22
  'create components' // update each repo
23
23
  )(callback);
24
24
  };
@@ -2,29 +2,26 @@
2
2
  Build Task
3
3
  *******************************/
4
4
 
5
- const
6
- gulp = require('gulp'),
5
+ const gulp = require('gulp');
7
6
 
8
- // gulp dependencies
9
- chmod = require('gulp-chmod'),
10
- gulpif = require('gulp-if'),
11
- normalize = require('normalize-path'),
12
- print = require('gulp-print').default,
7
+ // gulp dependencies
8
+ const chmod = require('gulp-chmod');
9
+ const gulpif = require('gulp-if');
10
+ const normalize = require('normalize-path');
11
+ const print = require('gulp-print').default;
13
12
 
14
- // config
15
- config = require('../config/user'),
16
- tasks = require('../config/tasks'),
17
- install = require('../config/project/install'),
13
+ // config
14
+ const config = require('../config/user');
15
+ const tasks = require('../config/tasks');
16
+ const install = require('../config/project/install');
18
17
 
19
- log = tasks.log
20
- ;
18
+ const log = tasks.log;
21
19
 
22
20
  function build(src, config) {
23
21
  return gulp.src(src, { base: config.paths.source.themes, encoding: false })
24
22
  .pipe(gulpif(config.hasPermissions, chmod(config.parsedPermissions)))
25
23
  .pipe(gulp.dest(config.paths.output.themes))
26
- .pipe(print(log.created))
27
- ;
24
+ .pipe(print(log.created));
28
25
  }
29
26
 
30
27
  function buildAssets(src, config, callback) {
@@ -42,7 +39,7 @@ function buildAssets(src, config, callback) {
42
39
  }
43
40
 
44
41
  // copy assets
45
- let assets = () => build(src, config);
42
+ let assets = () => build(src, config);
46
43
  assets.displayName = 'Building Assets';
47
44
 
48
45
  gulp.series(assets)(callback);
@@ -59,8 +56,7 @@ module.exports.watch = function (type, config) {
59
56
  console.log('Change in assets detected');
60
57
 
61
58
  return gulp.series((callback) => buildAssets(path, config, callback))();
62
- })
63
- ;
59
+ });
64
60
  };
65
61
 
66
62
  module.exports.buildAssets = buildAssets;
@@ -2,50 +2,48 @@
2
2
  * Build Task
3
3
  *******************************/
4
4
 
5
- const
6
- gulp = require('gulp'),
7
-
8
- // node dependencies
9
- console = require('@fomantic/better-console'),
10
-
11
- // gulp dependencies
12
- autoprefixer = require('gulp-autoprefixer'),
13
- chmod = require('gulp-chmod'),
14
- concatCSS = require('@fomantic/gulp-concat-css'),
15
- dedupe = require('@fomantic/gulp-dedupe'),
16
- flatten = require('gulp-flatten'),
17
- gulpif = require('gulp-if'),
18
- header = require('@fomantic/gulp-header'),
19
- less = require('gulp-less'),
20
- minifyCSS = require('gulp-clean-css'),
21
- normalize = require('normalize-path'),
22
- ordered = require('ordered-read-streams'),
23
- plumber = require('@fomantic/gulp-plumber'),
24
- print = require('gulp-print').default,
25
- rename = require('gulp-rename'),
26
- replace = require('gulp-replace'),
27
- replaceExt = require('replace-ext'),
28
- rtlcss = require('gulp-rtlcss'),
29
-
30
- // config
31
- config = require('../config/user'),
32
- docsConfig = require('../config/docs'),
33
- tasks = require('../config/tasks'),
34
- install = require('../config/project/install'),
35
-
36
- // shorthand
37
- globs = config.globs,
38
- assets = config.paths.assets,
39
-
40
- banner = tasks.banner,
41
- filenames = tasks.filenames,
42
- comments = tasks.regExp.comments,
43
- log = tasks.log,
44
- settings = tasks.settings
45
- ;
5
+ const gulp = require('gulp');
6
+
7
+ // node dependencies
8
+ const console = require('@fomantic/better-console');
9
+
10
+ // gulp dependencies
11
+ const autoprefixer = require('gulp-autoprefixer');
12
+ const chmod = require('gulp-chmod');
13
+ const concatCSS = require('@fomantic/gulp-concat-css');
14
+ const dedupe = require('@fomantic/gulp-dedupe');
15
+ const flatten = require('gulp-flatten');
16
+ const gulpif = require('gulp-if');
17
+ const header = require('@fomantic/gulp-header');
18
+ const less = require('gulp-less');
19
+ const minifyCSS = require('gulp-clean-css');
20
+ const normalize = require('normalize-path');
21
+ const ordered = require('ordered-read-streams');
22
+ const plumber = require('@fomantic/gulp-plumber');
23
+ const print = require('gulp-print').default;
24
+ const rename = require('gulp-rename');
25
+ const replace = require('gulp-replace');
26
+ const replaceExt = require('replace-ext');
27
+ const rtlcss = require('gulp-rtlcss');
28
+
29
+ // config
30
+ const config = require('../config/user');
31
+ const docsConfig = require('../config/docs');
32
+ const tasks = require('../config/tasks');
33
+ const install = require('../config/project/install');
34
+
35
+ // shorthand
36
+ const globs = config.globs;
37
+ const assets = config.paths.assets;
38
+
39
+ const banner = tasks.banner;
40
+ const filenames = tasks.filenames;
41
+ const comments = tasks.regExp.comments;
42
+ const log = tasks.log;
43
+ const settings = tasks.settings;
46
44
 
47
45
  /**
48
- * Builds the css
46
+ * Builds the CSS
49
47
  * @param src
50
48
  * @param type
51
49
  * @param compress
@@ -82,17 +80,16 @@ function build(src, type, compress, config, opts) {
82
80
  .pipe(gulpif(fileExtension, rename(fileExtension)))
83
81
  .pipe(gulpif(config.hasPermissions, chmod(config.parsedPermissions)))
84
82
  .pipe(gulp.dest(compress ? config.paths.output.compressed : config.paths.output.uncompressed))
85
- .pipe(print(log.created))
86
- ;
83
+ .pipe(print(log.created));
87
84
  }
88
85
 
89
86
  /**
90
87
  * Packages the css files in dist
91
- * @param {string} type - type of the css processing (none, rtl, docs)
88
+ * @param {string} type - type of the CSS processing (none, rtl, docs)
92
89
  * @param {boolean} compress - should the output be compressed
93
90
  */
94
91
  function pack(type, compress) {
95
- const output = type === 'docs' ? docsConfig.paths.output : config.paths.output;
92
+ const output = type === 'docs' ? docsConfig.paths.output : config.paths.output;
96
93
  const ignoredGlobs = type === 'rtl' ? globs.ignoredRTL + '.rtl.css' : globs.ignored + '.css';
97
94
 
98
95
  let concatenatedCSS;
@@ -112,8 +109,7 @@ function pack(type, compress) {
112
109
  }
113
110
 
114
111
  return gulp.src(srcSingle);
115
- })
116
- ;
112
+ });
117
113
 
118
114
  return ordered(src)
119
115
  .pipe(plumber())
@@ -125,8 +121,7 @@ function pack(type, compress) {
125
121
  .pipe(gulpif(compress, minifyCSS(settings.concatMinify)))
126
122
  .pipe(header(banner, settings.header))
127
123
  .pipe(gulp.dest(output.packaged))
128
- .pipe(print(log.created))
129
- ;
124
+ .pipe(print(log.created));
130
125
  }
131
126
 
132
127
  function buildCSS(src, type, config, opts, callback) {
@@ -151,16 +146,16 @@ function buildCSS(src, type, config, opts, callback) {
151
146
  src = config.paths.source.definitions + '/**/{' + components + '}.less';
152
147
  }
153
148
 
154
- const buildUncompressed = () => build(src, type, false, config, opts);
149
+ const buildUncompressed = () => build(src, type, false, config, opts);
155
150
  buildUncompressed.displayName = 'Building uncompressed CSS';
156
151
 
157
- const buildCompressed = () => build(src, type, true, config, opts);
152
+ const buildCompressed = () => build(src, type, true, config, opts);
158
153
  buildCompressed.displayName = 'Building compressed CSS';
159
154
 
160
- const packUncompressed = () => pack(type, false);
155
+ const packUncompressed = () => pack(type, false);
161
156
  packUncompressed.displayName = 'Packing uncompressed CSS';
162
157
 
163
- const packCompressed = () => pack(type, true);
158
+ const packCompressed = () => pack(type, true);
164
159
  packCompressed.displayName = 'Packing compressed CSS';
165
160
 
166
161
  gulp.parallel(
@@ -178,9 +173,9 @@ function rtlAndNormal(src, callback) {
178
173
  src = config.paths.source.definitions + '/**/' + config.globs.components + '.less';
179
174
  }
180
175
 
181
- const rtl = (callback) => buildCSS(src, 'rtl', config, {}, callback);
176
+ const rtl = (callback) => buildCSS(src, 'rtl', config, {}, callback);
182
177
  rtl.displayName = 'CSS Right-To-Left';
183
- const css = (callback) => buildCSS(src, 'default', config, {}, callback);
178
+ const css = (callback) => buildCSS(src, 'default', config, {}, callback);
184
179
  css.displayName = 'CSS';
185
180
 
186
181
  if (config.rtl === true || config.rtl === 'Yes') {
@@ -198,7 +193,7 @@ function docs(src, callback) {
198
193
  src = config.paths.source.definitions + '/**/' + config.globs.components + '.less';
199
194
  }
200
195
 
201
- const func = (callback) => buildCSS(src, 'docs', config, {}, callback);
196
+ const func = (callback) => buildCSS(src, 'docs', config, {}, callback);
202
197
  func.displayName = 'CSS Docs';
203
198
 
204
199
  func(callback);
@@ -208,10 +203,8 @@ function docs(src, callback) {
208
203
  module.exports = rtlAndNormal;
209
204
 
210
205
  // We keep the changed files in an array to call build with all of them at the same time
211
- let
212
- timeout,
213
- files = []
214
- ;
206
+ let timeout;
207
+ let files = [];
215
208
 
216
209
  /**
217
210
  * Watch changes in CSS files and call the correct build pipe
@@ -235,8 +228,7 @@ module.exports.watch = function (type, config) {
235
228
  files = [];
236
229
 
237
230
  return gulp.series(method)();
238
- })
239
- ;
231
+ });
240
232
 
241
233
  // Watch any less / overrides / variables files
242
234
  gulp.watch([
@@ -273,7 +265,7 @@ module.exports.watch = function (type, config) {
273
265
  lessPath = path;
274
266
  }
275
267
 
276
- // Add file to internal changed files array
268
+ // Add the file to the internal changed files array
277
269
  if (!files.includes(lessPath)) {
278
270
  files.push(lessPath);
279
271
  }
@@ -284,12 +276,11 @@ module.exports.watch = function (type, config) {
284
276
  const buildFiles = [...files];
285
277
  // Call method
286
278
  gulp.series((callback) => method(buildFiles, callback))();
287
- // Reset internal changed files array
279
+ // Reset the internal changed files array
288
280
  files = [];
289
281
  }, 1000);
290
- })
291
- ;
282
+ });
292
283
  };
293
284
 
294
- // Expose build css method
285
+ // Expose build CSS method
295
286
  module.exports.buildCSS = buildCSS;