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.
- package/.all-contributorsrc +9 -0
- package/.eslintrc.js +0 -10
- package/.github/workflows/ci.yml +3 -3
- package/CONTRIBUTING.md +4 -1
- package/CONTRIBUTORS.md +1 -0
- package/FAQ.md +7 -2
- package/README.md +5 -9
- package/ROADMAP.md +4 -4
- package/SECURITY.md +8 -7
- package/changelog-setup.js +64 -70
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +103 -142
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +157 -210
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -2
- package/dist/components/calendar.js +314 -352
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -2
- package/dist/components/checkbox.js +85 -135
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +2 -4
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +1 -11
- package/dist/components/dimmer.js +61 -94
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -2
- package/dist/components/divider.min.css +2 -2
- package/dist/components/dropdown.css +30 -51
- package/dist/components/dropdown.js +736 -1055
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +85 -114
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +3809 -7617
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -3
- package/dist/components/flyout.js +226 -355
- package/dist/components/flyout.min.css +2 -2
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +5 -95
- package/dist/components/form.js +335 -444
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +2 -58
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +4 -4
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -536
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -3
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -9
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +5 -9
- package/dist/components/modal.js +261 -384
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +68 -98
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -2
- package/dist/components/popup.js +198 -271
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +109 -144
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +91 -123
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +2 -9
- package/dist/components/search.js +277 -379
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +2 -7
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -2
- package/dist/components/shape.js +158 -224
- package/dist/components/shape.min.css +2 -2
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +2 -3
- package/dist/components/sidebar.js +124 -206
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +9 -25
- package/dist/components/site.js +38 -57
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +246 -329
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +70 -100
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +135 -180
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +176 -244
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +3 -37
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -3
- package/dist/components/toast.js +109 -147
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +91 -146
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +146 -224
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +3906 -8720
- package/dist/semantic.js +4397 -6155
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/assets/show-examples.js +2 -4
- package/gulpfile.js +5 -7
- package/package.json +20 -16
- package/scripts/nightly-version.js +7 -10
- package/src/README.md +3 -3
- package/src/definitions/behaviors/api.js +156 -209
- package/src/definitions/behaviors/form.js +334 -443
- package/src/definitions/behaviors/state.js +69 -99
- package/src/definitions/behaviors/visibility.js +145 -223
- package/src/definitions/collections/form.less +1 -13
- package/src/definitions/collections/grid.less +1 -61
- package/src/definitions/collections/menu.less +0 -11
- package/src/definitions/collections/table.less +1 -35
- package/src/definitions/elements/input.less +1 -61
- package/src/definitions/elements/segment.less +0 -6
- package/src/definitions/globals/site.js +37 -56
- package/src/definitions/globals/site.less +2 -18
- package/src/definitions/modules/accordion.js +102 -141
- package/src/definitions/modules/calendar.js +313 -351
- package/src/definitions/modules/checkbox.js +84 -134
- package/src/definitions/modules/dimmer.js +60 -93
- package/src/definitions/modules/dimmer.less +0 -9
- package/src/definitions/modules/dropdown.js +735 -1054
- package/src/definitions/modules/dropdown.less +31 -47
- package/src/definitions/modules/embed.js +84 -113
- package/src/definitions/modules/flyout.js +225 -354
- package/src/definitions/modules/modal.js +260 -383
- package/src/definitions/modules/modal.less +1 -1
- package/src/definitions/modules/nag.js +67 -97
- package/src/definitions/modules/popup.js +197 -270
- package/src/definitions/modules/progress.js +108 -143
- package/src/definitions/modules/rating.js +90 -122
- package/src/definitions/modules/search.js +276 -378
- package/src/definitions/modules/search.less +0 -3
- package/src/definitions/modules/shape.js +157 -223
- package/src/definitions/modules/sidebar.js +123 -205
- package/src/definitions/modules/slider.js +245 -328
- package/src/definitions/modules/slider.less +1 -1
- package/src/definitions/modules/sticky.js +134 -179
- package/src/definitions/modules/tab.js +175 -243
- package/src/definitions/modules/toast.js +108 -146
- package/src/definitions/modules/toast.less +1 -1
- package/src/definitions/modules/transition.js +90 -145
- package/src/theme.less +0 -13
- package/src/themes/basic/elements/icon.variables +1 -1
- package/src/themes/default/collections/grid.variables +0 -30
- package/src/themes/default/collections/table.variables +1 -5
- package/src/themes/default/elements/icon.variables +3 -3
- package/src/themes/default/globals/site.variables +8 -15
- package/src/themes/default/globals/variation.variables +1 -2
- package/src/themes/default/modules/dropdown.variables +1 -0
- package/src/themes/default/modules/slider.variables +1 -1
- package/src/themes/github/elements/icon.variables +1 -1
- package/src/themes/material/elements/icon.variables +1 -1
- package/tasks/README.md +1 -1
- package/tasks/admin/components/create.js +89 -122
- package/tasks/admin/components/init.js +34 -65
- package/tasks/admin/components/update.js +50 -61
- package/tasks/admin/distributions/create.js +71 -111
- package/tasks/admin/distributions/init.js +32 -63
- package/tasks/admin/distributions/update.js +49 -57
- package/tasks/admin/publish.js +1 -1
- package/tasks/admin/register.js +14 -19
- package/tasks/admin/release.js +2 -2
- package/tasks/build/assets.js +14 -18
- package/tasks/build/css.js +59 -68
- package/tasks/build/javascript.js +48 -56
- package/tasks/build.js +4 -6
- package/tasks/check-install.js +5 -8
- package/tasks/clean.js +5 -7
- package/tasks/collections/admin.js +14 -16
- package/tasks/collections/build.js +6 -8
- package/tasks/collections/docs.js +4 -6
- package/tasks/collections/install.js +2 -4
- package/tasks/collections/rtl.js +2 -4
- package/tasks/collections/various.js +2 -4
- package/tasks/config/admin/github.js +9 -19
- package/tasks/config/admin/templates/README.md +2 -2
- package/tasks/config/admin/templates/bower.json +2 -4
- package/tasks/config/admin/templates/composer.json +1 -1
- package/tasks/config/admin/templates/css-package.js +1 -4
- package/tasks/config/admin/templates/less-package.js +1 -3
- package/tasks/config/defaults.js +0 -1
- package/tasks/config/npm/gulpfile.js +4 -6
- package/tasks/config/project/config.js +27 -35
- package/tasks/config/project/install.js +64 -82
- package/tasks/config/project/release.js +7 -9
- package/tasks/config/tasks.js +16 -30
- package/tasks/config/user.js +14 -20
- package/tasks/docs/build.js +26 -31
- package/tasks/docs/metadata.js +30 -39
- package/tasks/docs/serve.js +23 -27
- package/tasks/install.js +94 -128
- package/tasks/rtl/build.js +2 -4
- package/tasks/rtl/watch.js +3 -5
- package/tasks/watch.js +13 -13
- package/test/meteor/fonts.js +1 -2
- package/test/modules/module.spec.js +16 -18
- package/types/fomantic-ui-calendar.d.ts +1 -1
- package/types/fomantic-ui-dropdown.d.ts +45 -1
- package/types/fomantic-ui-embed.d.ts +1 -1
- package/types/fomantic-ui-flyout.d.ts +1 -1
- package/types/fomantic-ui-form.d.ts +0 -7
- package/types/fomantic-ui-modal.d.ts +1 -1
- package/types/fomantic-ui-search.d.ts +12 -6
- package/types/fomantic-ui-toast.d.ts +1 -1
- package/src/themes/basic/assets/fonts/icons.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
- package/src/themes/default/assets/fonts/icons.woff +0 -0
- package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
- package/src/themes/github/assets/fonts/octicons.woff +0 -0
- package/src/themes/material/assets/fonts/icons.woff +0 -0
@@ -3,7 +3,6 @@
|
|
3
3
|
*******************************/
|
4
4
|
|
5
5
|
@import "variation.variables";
|
6
|
-
@supportIE: true;
|
7
6
|
|
8
7
|
/* -------------------
|
9
8
|
Fonts
|
@@ -44,7 +43,7 @@
|
|
44
43
|
@fonts: {
|
45
44
|
@regularLatin: {
|
46
45
|
font-family: @fontName;
|
47
|
-
src: url("@{fontPath}/@{fontFileNameLatin}-Regular.woff2") format("woff2")
|
46
|
+
src: url("@{fontPath}/@{fontFileNameLatin}-Regular.woff2") format("woff2");
|
48
47
|
font-style: normal;
|
49
48
|
font-weight: @normal;
|
50
49
|
font-display: @fontDisplay;
|
@@ -53,7 +52,7 @@
|
|
53
52
|
};
|
54
53
|
@boldLatin: {
|
55
54
|
font-family: @fontName;
|
56
|
-
src: url("@{fontPath}/@{fontFileNameLatin}-Bold.woff2") format("woff2")
|
55
|
+
src: url("@{fontPath}/@{fontFileNameLatin}-Bold.woff2") format("woff2");
|
57
56
|
font-style: normal;
|
58
57
|
font-weight: @bold;
|
59
58
|
font-display: @fontDisplay;
|
@@ -62,7 +61,7 @@
|
|
62
61
|
};
|
63
62
|
@italicLatin: {
|
64
63
|
font-family: @fontName;
|
65
|
-
src: url("@{fontPath}/@{fontFileNameLatin}-Italic.woff2") format("woff2")
|
64
|
+
src: url("@{fontPath}/@{fontFileNameLatin}-Italic.woff2") format("woff2");
|
66
65
|
font-style: italic;
|
67
66
|
font-weight: @normal;
|
68
67
|
font-display: @fontDisplay;
|
@@ -71,7 +70,7 @@
|
|
71
70
|
};
|
72
71
|
@boldItalicLatin: {
|
73
72
|
font-family: @fontName;
|
74
|
-
src: url("@{fontPath}/@{fontFileNameLatin}-BoldItalic.woff2") format("woff2")
|
73
|
+
src: url("@{fontPath}/@{fontFileNameLatin}-BoldItalic.woff2") format("woff2");
|
75
74
|
font-style: italic;
|
76
75
|
font-weight: @bold;
|
77
76
|
font-display: @fontDisplay;
|
@@ -80,7 +79,7 @@
|
|
80
79
|
};
|
81
80
|
@regularSupplement: {
|
82
81
|
font-family: @fontName;
|
83
|
-
src: url("@{fontPath}/@{fontFileNameSupplement}-Regular.woff2") format("woff2")
|
82
|
+
src: url("@{fontPath}/@{fontFileNameSupplement}-Regular.woff2") format("woff2");
|
84
83
|
font-style: normal;
|
85
84
|
font-weight: @normal;
|
86
85
|
font-display: @fontDisplay;
|
@@ -89,7 +88,7 @@
|
|
89
88
|
};
|
90
89
|
@boldSupplement: {
|
91
90
|
font-family: @fontName;
|
92
|
-
src: url("@{fontPath}/@{fontFileNameSupplement}-Bold.woff2") format("woff2")
|
91
|
+
src: url("@{fontPath}/@{fontFileNameSupplement}-Bold.woff2") format("woff2");
|
93
92
|
font-style: normal;
|
94
93
|
font-weight: @bold;
|
95
94
|
font-display: @fontDisplay;
|
@@ -98,7 +97,7 @@
|
|
98
97
|
};
|
99
98
|
@italicSupplement: {
|
100
99
|
font-family: @fontName;
|
101
|
-
src: url("@{fontPath}/@{fontFileNameSupplement}-Italic.woff2") format("woff2")
|
100
|
+
src: url("@{fontPath}/@{fontFileNameSupplement}-Italic.woff2") format("woff2");
|
102
101
|
font-style: italic;
|
103
102
|
font-weight: @normal;
|
104
103
|
font-display: @fontDisplay;
|
@@ -107,7 +106,7 @@
|
|
107
106
|
};
|
108
107
|
@boldItalicSupplement: {
|
109
108
|
font-family: @fontName;
|
110
|
-
src: url("@{fontPath}/@{fontFileNameSupplement}-BoldItalic.woff2") format("woff2")
|
109
|
+
src: url("@{fontPath}/@{fontFileNameSupplement}-BoldItalic.woff2") format("woff2");
|
111
110
|
font-style: italic;
|
112
111
|
font-weight: @bold;
|
113
112
|
font-display: @fontDisplay;
|
@@ -276,12 +275,6 @@
|
|
276
275
|
@thumbInvertedInactiveBackground: rgba(255, 255, 255, 0.15);
|
277
276
|
@thumbInvertedHoverBackground: rgba(255, 255, 255, 0.35);
|
278
277
|
|
279
|
-
/* IE needs hex values */
|
280
|
-
@trackBackgroundHex: #e6e6e6;
|
281
|
-
@thumbBackgroundHex: #bfbfbf;
|
282
|
-
@trackInvertedBackgroundHex: #323232;
|
283
|
-
@thumbInvertedBackgroundHex: #656565;
|
284
|
-
|
285
278
|
/* Scrolling */
|
286
279
|
@scrollingMobileMaxHeight: 15em;
|
287
280
|
@scrollingTabletMaxHeight: 18em;
|
@@ -293,7 +293,6 @@
|
|
293
293
|
|
294
294
|
/* Grid */
|
295
295
|
@variationGridInverted: true;
|
296
|
-
@variationGridPage: true;
|
297
296
|
@variationGridCelled: true;
|
298
297
|
@variationGridCentered: true;
|
299
298
|
@variationGridRelaxed: true;
|
@@ -790,7 +789,7 @@
|
|
790
789
|
|
791
790
|
/* Emojis */
|
792
791
|
@variationEmojiColons: true;
|
793
|
-
@variationEmojiNoColons:
|
792
|
+
@variationEmojiNoColons: false;
|
794
793
|
@variationEmojiDisabled: true;
|
795
794
|
@variationEmojiLoading: true;
|
796
795
|
@variationEmojiLink: true;
|
@@ -3,7 +3,7 @@
|
|
3
3
|
@fonts: {
|
4
4
|
@solid: {
|
5
5
|
font-family: @fontName;
|
6
|
-
src: url("@{fontPath}/@{fontName}.woff2") format("woff2")
|
6
|
+
src: url("@{fontPath}/@{fontName}.woff2") format("woff2");
|
7
7
|
font-style: normal;
|
8
8
|
font-weight: @normal;
|
9
9
|
font-variant: normal;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
@fonts: {
|
3
3
|
@solid: {
|
4
4
|
font-family: @fontName;
|
5
|
-
src: url("@{fontPath}/@{fontName}.woff2") format("woff2")
|
5
|
+
src: url("@{fontPath}/@{fontName}.woff2") format("woff2");
|
6
6
|
font-style: normal;
|
7
7
|
font-weight: @normal;
|
8
8
|
font-variant: normal;
|
package/tasks/README.md
CHANGED
@@ -7,123 +7,102 @@
|
|
7
7
|
|
8
8
|
* copy component files from release
|
9
9
|
* create commonjs files as index.js for NPM release
|
10
|
-
* create release notes that filter only items related to component
|
10
|
+
* create release notes that filter only items related to the component
|
11
11
|
* custom package.json file from template
|
12
12
|
* create bower.json from template
|
13
13
|
* create README from template
|
14
14
|
* create meteor.js file
|
15
15
|
*/
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
gulp = require('gulp'),
|
17
|
+
// node dependencies
|
18
|
+
const fs = require('node:fs');
|
19
|
+
const path = require('node:path');
|
20
|
+
const gulp = require('gulp');
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
22
|
+
// admin dependencies
|
23
|
+
const concatFileNames = require('@fomantic/gulp-concat-filenames');
|
24
|
+
const flatten = require('gulp-flatten');
|
25
|
+
const jsonEditor = require('gulp-json-editor');
|
26
|
+
const plumber = require('@fomantic/gulp-plumber');
|
27
|
+
const rename = require('gulp-rename');
|
28
|
+
const replace = require('gulp-replace');
|
29
|
+
const tap = require('gulp-tap');
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
// config
|
32
|
+
const config = require('../../config/user');
|
33
|
+
const release = require('../../config/admin/release');
|
34
|
+
const project = require('../../config/project/release');
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
;
|
36
|
+
// shorthand
|
37
|
+
const version = project.version;
|
38
|
+
const output = config.paths.output;
|
41
39
|
|
42
40
|
module.exports = function (callback) {
|
43
|
-
let
|
44
|
-
|
45
|
-
index,
|
46
|
-
tasks = []
|
47
|
-
;
|
41
|
+
let index;
|
42
|
+
let tasks = [];
|
48
43
|
|
49
44
|
for (index in release.components) {
|
50
|
-
let
|
51
|
-
component = release.components[index]
|
52
|
-
;
|
45
|
+
let component = release.components[index];
|
53
46
|
|
54
47
|
// streams... designed to save time and make coding fun...
|
55
48
|
(function (component) {
|
56
|
-
let
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
49
|
+
let outputDirectory = path.join(release.outputRoot, component);
|
50
|
+
let isJavascript = fs.existsSync(output.compressed + component + '.js');
|
51
|
+
let isCSS = fs.existsSync(output.compressed + component + '.css');
|
52
|
+
let capitalizedComponent = component.charAt(0).toUpperCase() + component.slice(1);
|
53
|
+
let packageName = release.packageRoot + component;
|
54
|
+
let repoName = release.componentRepoRoot + capitalizedComponent;
|
55
|
+
let gitURL = 'https://github.com/' + release.org + '/' + repoName + '.git';
|
56
|
+
let concatSettings = {
|
57
|
+
newline: '',
|
58
|
+
root: outputDirectory,
|
59
|
+
prepend: " '",
|
60
|
+
append: "',",
|
61
|
+
};
|
62
|
+
let regExp = {
|
63
|
+
match: {
|
64
|
+
// templated values
|
65
|
+
name: '{component}',
|
66
|
+
titleName: '{Component}',
|
67
|
+
version: '{version}',
|
68
|
+
files: '{files}',
|
69
|
+
// release notes
|
70
|
+
spacedVersions: /(###.*\n)\n+(?=###)/gm,
|
71
|
+
spacedLists: /(^- .*\n)\n+(?=^-)/gm,
|
72
|
+
trim: /^\s+|\s+$/g,
|
73
|
+
unrelatedNotes: new RegExp('^((?!(^.*(' + component + ').*$|###.*)).)*$', 'gmi'),
|
74
|
+
whitespace: /\n\s*\n\s*\n/gm,
|
75
|
+
// npm
|
76
|
+
componentExport: /(.*)\$\.fn\.\w+\s*=\s*function\(([^)]*)\)\s*{/g,
|
77
|
+
componentReference: '$.fn.' + component,
|
78
|
+
settingsExport: /\$\.fn\.\w+\.settings\s*=/g,
|
79
|
+
settingsReference: /\$\.fn\.\w+\.settings/g,
|
80
|
+
trailingComma: /,(?=[^,]*$)/,
|
81
|
+
jQuery: /jQuery/g,
|
70
82
|
},
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
settingsExport: /\$\.fn\.\w+\.settings\s*=/g,
|
88
|
-
settingsReference: /\$\.fn\.\w+\.settings/g,
|
89
|
-
trailingComma: /,(?=[^,]*$)/,
|
90
|
-
jQuery: /jQuery/g,
|
91
|
-
},
|
92
|
-
replace: {
|
93
|
-
// readme
|
94
|
-
name: component,
|
95
|
-
titleName: capitalizedComponent,
|
96
|
-
// release notes
|
97
|
-
spacedVersions: '',
|
98
|
-
spacedLists: '$1',
|
99
|
-
trim: '',
|
100
|
-
unrelatedNotes: '',
|
101
|
-
whitespace: '\n\n',
|
102
|
-
// npm
|
103
|
-
componentExport: 'var _module = module;\n$1module.exports = function($2) {',
|
104
|
-
componentReference: '_module.exports',
|
105
|
-
settingsExport: 'module.exports.settings =',
|
106
|
-
settingsReference: '_module.exports.settings',
|
107
|
-
jQuery: 'require("jquery")',
|
108
|
-
},
|
83
|
+
replace: {
|
84
|
+
// readme
|
85
|
+
name: component,
|
86
|
+
titleName: capitalizedComponent,
|
87
|
+
// release notes
|
88
|
+
spacedVersions: '',
|
89
|
+
spacedLists: '$1',
|
90
|
+
trim: '',
|
91
|
+
unrelatedNotes: '',
|
92
|
+
whitespace: '\n\n',
|
93
|
+
// npm
|
94
|
+
componentExport: 'var _module = module;\n$1module.exports = function($2) {',
|
95
|
+
componentReference: '_module.exports',
|
96
|
+
settingsExport: 'module.exports.settings =',
|
97
|
+
settingsReference: '_module.exports.settings',
|
98
|
+
jQuery: 'require("jquery")',
|
109
99
|
},
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
notes: component + ' create release notes',
|
117
|
-
composer: component + ' create composer.json',
|
118
|
-
package: component + ' create package.json',
|
119
|
-
meteor: component + ' create meteor package.js',
|
120
|
-
},
|
121
|
-
// paths to includable assets
|
122
|
-
manifest = {
|
123
|
-
assets: outputDirectory + '/assets/**/' + component + '?(s).*',
|
124
|
-
component: outputDirectory + '/' + component + '+(.js|.css)',
|
125
|
-
}
|
126
|
-
;
|
100
|
+
};
|
101
|
+
// paths to includable assets
|
102
|
+
let manifest = {
|
103
|
+
assets: outputDirectory + '/assets/**/' + component + '?(s).*',
|
104
|
+
component: outputDirectory + '/' + component + '+(.js|.css)',
|
105
|
+
};
|
127
106
|
|
128
107
|
// copy dist files into output folder adjusting asset paths
|
129
108
|
function copyDist() {
|
@@ -131,8 +110,7 @@ module.exports = function (callback) {
|
|
131
110
|
.pipe(plumber())
|
132
111
|
.pipe(flatten())
|
133
112
|
.pipe(replace(release.paths.source, release.paths.output))
|
134
|
-
.pipe(gulp.dest(outputDirectory))
|
135
|
-
;
|
113
|
+
.pipe(gulp.dest(outputDirectory));
|
136
114
|
}
|
137
115
|
|
138
116
|
// create npm module
|
@@ -146,8 +124,7 @@ module.exports = function (callback) {
|
|
146
124
|
.pipe(replace(regExp.match.settingsReference, regExp.replace.settingsReference))
|
147
125
|
.pipe(replace(regExp.match.jQuery, regExp.replace.jQuery))
|
148
126
|
.pipe(rename('index.js'))
|
149
|
-
.pipe(gulp.dest(outputDirectory))
|
150
|
-
;
|
127
|
+
.pipe(gulp.dest(outputDirectory));
|
151
128
|
}
|
152
129
|
|
153
130
|
// create readme
|
@@ -157,8 +134,7 @@ module.exports = function (callback) {
|
|
157
134
|
.pipe(flatten())
|
158
135
|
.pipe(replace(regExp.match.name, regExp.replace.name))
|
159
136
|
.pipe(replace(regExp.match.titleName, regExp.replace.titleName))
|
160
|
-
.pipe(gulp.dest(outputDirectory))
|
161
|
-
;
|
137
|
+
.pipe(gulp.dest(outputDirectory));
|
162
138
|
}
|
163
139
|
|
164
140
|
// extend bower.json
|
@@ -184,8 +160,7 @@ module.exports = function (callback) {
|
|
184
160
|
|
185
161
|
return bower;
|
186
162
|
}))
|
187
|
-
.pipe(gulp.dest(outputDirectory))
|
188
|
-
;
|
163
|
+
.pipe(gulp.dest(outputDirectory));
|
189
164
|
}
|
190
165
|
|
191
166
|
// extend package.json
|
@@ -213,8 +188,7 @@ module.exports = function (callback) {
|
|
213
188
|
|
214
189
|
return npm;
|
215
190
|
}))
|
216
|
-
.pipe(gulp.dest(outputDirectory))
|
217
|
-
;
|
191
|
+
.pipe(gulp.dest(outputDirectory));
|
218
192
|
}
|
219
193
|
|
220
194
|
// extend composer.json
|
@@ -237,8 +211,7 @@ module.exports = function (callback) {
|
|
237
211
|
|
238
212
|
return composer;
|
239
213
|
}))
|
240
|
-
.pipe(gulp.dest(outputDirectory))
|
241
|
-
;
|
214
|
+
.pipe(gulp.dest(outputDirectory));
|
242
215
|
}
|
243
216
|
|
244
217
|
// create release notes
|
@@ -252,15 +225,12 @@ module.exports = function (callback) {
|
|
252
225
|
.pipe(replace(regExp.match.spacedVersions, regExp.replace.spacedVersions))
|
253
226
|
.pipe(replace(regExp.match.spacedLists, regExp.replace.spacedLists))
|
254
227
|
.pipe(replace(regExp.match.trim, regExp.replace.trim))
|
255
|
-
.pipe(gulp.dest(outputDirectory))
|
256
|
-
;
|
228
|
+
.pipe(gulp.dest(outputDirectory));
|
257
229
|
}
|
258
230
|
|
259
231
|
// Creates meteor package.js
|
260
232
|
function createMeteorPackage() {
|
261
|
-
let
|
262
|
-
filenames = ''
|
263
|
-
;
|
233
|
+
let filenames = '';
|
264
234
|
|
265
235
|
return gulp.src(manifest.component)
|
266
236
|
.pipe(concatFileNames('empty.txt', concatSettings))
|
@@ -284,12 +254,9 @@ module.exports = function (callback) {
|
|
284
254
|
.pipe(replace(regExp.match.version, version))
|
285
255
|
.pipe(replace(regExp.match.files, filenames))
|
286
256
|
.pipe(rename(release.files.meteor))
|
287
|
-
.pipe(gulp.dest(outputDirectory))
|
288
|
-
|
289
|
-
|
290
|
-
;
|
291
|
-
})
|
292
|
-
;
|
257
|
+
.pipe(gulp.dest(outputDirectory));
|
258
|
+
});
|
259
|
+
});
|
293
260
|
}
|
294
261
|
|
295
262
|
tasks.push(gulp.series(
|
@@ -6,45 +6,31 @@
|
|
6
6
|
|
7
7
|
This task pulls the latest version of each component from GitHub
|
8
8
|
|
9
|
-
* Creates new repo if doesn't exist (locally & GitHub)
|
10
|
-
* Adds remote it doesn't
|
9
|
+
* Creates new repo if it doesn't exist (locally & GitHub)
|
10
|
+
* Adds remote if it doesn't exist
|
11
11
|
* Pulls latest changes from repo
|
12
12
|
|
13
13
|
*/
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
console = require('@fomantic/better-console'),
|
21
|
-
gulp = require('gulp'),
|
22
|
-
git = require('@fomantic/gulp-git'),
|
23
|
-
mkdirp = require('mkdirp'),
|
24
|
-
|
25
|
-
// admin files
|
26
|
-
release = require('../../config/admin/release'),
|
27
|
-
project = require('../../config/project/release'),
|
28
|
-
|
29
|
-
// oAuth configuration for GitHub
|
30
|
-
oAuth = fs.existsSync(path.join(__dirname, '/../../config/admin/oauth.js'))
|
31
|
-
? require('../../config/admin/oauth.js') // eslint-disable-line import/extensions
|
32
|
-
: false,
|
33
|
-
|
34
|
-
// shorthand
|
35
|
-
version = project.version
|
36
|
-
;
|
15
|
+
// node dependencies
|
16
|
+
const fs = require('fs-extra');
|
17
|
+
const path = require('node:path');
|
18
|
+
const console = require('@fomantic/better-console');
|
19
|
+
const git = require('@fomantic/gulp-git');
|
37
20
|
|
38
|
-
|
39
|
-
|
21
|
+
// admin files
|
22
|
+
const release = require('../../config/admin/release');
|
23
|
+
|
24
|
+
// oAuth configuration for GitHub
|
25
|
+
const oAuth = fs.pathExistsSync(path.join(__dirname, '/../../config/admin/oauth.js'))
|
26
|
+
? require('../../config/admin/oauth.js') // eslint-disable-line import/extensions
|
27
|
+
: false;
|
40
28
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
stepRepo
|
47
|
-
;
|
29
|
+
module.exports = function (callback) {
|
30
|
+
let index = -1;
|
31
|
+
let total = release.components.length;
|
32
|
+
let timer;
|
33
|
+
let stepRepo;
|
48
34
|
|
49
35
|
if (!oAuth) {
|
50
36
|
console.error('Must add oauth token for GitHub in tasks/config/admin/oauth.js');
|
@@ -52,7 +38,7 @@ module.exports = function (callback) {
|
|
52
38
|
return;
|
53
39
|
}
|
54
40
|
|
55
|
-
// Do Git commands synchronously per component
|
41
|
+
// Do Git commands synchronously per component to avoid issues
|
56
42
|
stepRepo = function () {
|
57
43
|
index += 1;
|
58
44
|
|
@@ -62,32 +48,27 @@ module.exports = function (callback) {
|
|
62
48
|
return;
|
63
49
|
}
|
64
50
|
|
65
|
-
let
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
repoName = release.componentRepoRoot + capitalizedComponent,
|
51
|
+
let component = release.components[index];
|
52
|
+
let outputDirectory = path.resolve(release.outputRoot + component);
|
53
|
+
let capitalizedComponent = component.charAt(0).toUpperCase() + component.slice(1);
|
54
|
+
let repoName = release.componentRepoRoot + capitalizedComponent;
|
70
55
|
|
71
|
-
|
72
|
-
|
73
|
-
|
56
|
+
let gitOptions = { cwd: outputDirectory };
|
57
|
+
let pullOptions = { args: '-q', cwd: outputDirectory, quiet: true };
|
58
|
+
let resetOptions = { args: '-q --hard', cwd: outputDirectory, quiet: true };
|
74
59
|
|
75
|
-
|
76
|
-
|
77
|
-
localRepoSetup = fs.existsSync(path.join(outputDirectory, '.git'))
|
78
|
-
;
|
60
|
+
let gitURL = 'git@github.com:' + release.org + '/' + repoName + '.git';
|
61
|
+
let localRepoSetup = fs.pathExistsSync(path.join(outputDirectory, '.git'));
|
79
62
|
|
80
63
|
console.log('Processing repository: ' + outputDirectory);
|
81
64
|
|
82
|
-
// create folder if doesn't exist
|
83
|
-
|
84
|
-
mkdirp.sync(outputDirectory);
|
85
|
-
}
|
65
|
+
// create folder if it doesn't exist
|
66
|
+
fs.ensureDirSync(outputDirectory);
|
86
67
|
|
87
68
|
// clean folder
|
88
69
|
if (release.outputRoot.startsWith('../repos')) {
|
89
70
|
console.info('Cleaning dir', outputDirectory);
|
90
|
-
|
71
|
+
fs.removeSync(outputDirectory);
|
91
72
|
}
|
92
73
|
|
93
74
|
// set-up local repo
|
@@ -109,17 +90,6 @@ module.exports = function (callback) {
|
|
109
90
|
});
|
110
91
|
}
|
111
92
|
|
112
|
-
function createRepo() {
|
113
|
-
console.info('Creating GitHub repo ' + repoURL);
|
114
|
-
github.repos.createFromOrg({
|
115
|
-
org: release.org,
|
116
|
-
name: repoName,
|
117
|
-
homepage: release.homepage,
|
118
|
-
}, function () {
|
119
|
-
setupRepo();
|
120
|
-
});
|
121
|
-
}
|
122
|
-
|
123
93
|
function addRemote() {
|
124
94
|
console.info('Adding remote origin as ' + gitURL);
|
125
95
|
git.addRemote('origin', gitURL, gitOptions, function () {
|
@@ -129,14 +99,14 @@ module.exports = function (callback) {
|
|
129
99
|
|
130
100
|
function pullFiles() {
|
131
101
|
console.info('Pulling ' + component + ' files');
|
132
|
-
git.pull('origin', 'master', pullOptions, function (
|
102
|
+
git.pull('origin', 'master', pullOptions, function () {
|
133
103
|
resetFiles();
|
134
104
|
});
|
135
105
|
}
|
136
106
|
|
137
107
|
function resetFiles() {
|
138
108
|
console.info('Resetting files to head');
|
139
|
-
git.reset('HEAD', resetOptions, function (
|
109
|
+
git.reset('HEAD', resetOptions, function () {
|
140
110
|
nextRepo();
|
141
111
|
});
|
142
112
|
}
|
@@ -154,7 +124,6 @@ module.exports = function (callback) {
|
|
154
124
|
pullFiles();
|
155
125
|
} else {
|
156
126
|
setupRepo();
|
157
|
-
// createRepo() only use to create remote repo (easier to do manually)
|
158
127
|
}
|
159
128
|
};
|
160
129
|
|