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
@@ -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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
24
|
-
|
25
|
-
|
22
|
+
// admin files
|
23
|
+
const release = require('../../config/admin/release');
|
24
|
+
const project = require('../../config/project/release');
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
33
|
-
|
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
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
64
|
-
|
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
|
-
|
68
|
-
|
69
|
-
|
61
|
+
let commitArgs = oAuth.name !== undefined && oAuth.email !== undefined
|
62
|
+
? '--author "' + oAuth.name + ' <' + oAuth.email + '>"'
|
63
|
+
: '';
|
70
64
|
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
-
|
69
|
+
let isNewVersion = version && distributionPackage.version !== version;
|
76
70
|
|
77
|
-
|
78
|
-
|
79
|
-
|
71
|
+
let commitMessage = isNewVersion
|
72
|
+
? 'Updated distribution to version ' + version
|
73
|
+
: 'Updated files from main repo';
|
80
74
|
|
81
|
-
|
82
|
-
|
83
|
-
|
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
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
-
|
91
|
-
|
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 (
|
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 (
|
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 (
|
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
|
package/tasks/admin/publish.js
CHANGED
@@ -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
|
18
|
+
'update components' // commit components to GitHub
|
19
19
|
)(callback);
|
20
20
|
};
|
package/tasks/admin/register.js
CHANGED
@@ -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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
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
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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) {
|
package/tasks/admin/release.js
CHANGED
@@ -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
|
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
|
21
|
+
'init components', // sync with the current GitHub version
|
22
22
|
'create components' // update each repo
|
23
23
|
)(callback);
|
24
24
|
};
|
package/tasks/build/assets.js
CHANGED
@@ -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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
// config
|
14
|
+
const config = require('../config/user');
|
15
|
+
const tasks = require('../config/tasks');
|
16
|
+
const install = require('../config/project/install');
|
18
17
|
|
19
|
-
|
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
|
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;
|
package/tasks/build/css.js
CHANGED
@@ -2,50 +2,48 @@
|
|
2
2
|
* Build Task
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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
|
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
|
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
|
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
|
149
|
+
const buildUncompressed = () => build(src, type, false, config, opts);
|
155
150
|
buildUncompressed.displayName = 'Building uncompressed CSS';
|
156
151
|
|
157
|
-
const buildCompressed
|
152
|
+
const buildCompressed = () => build(src, type, true, config, opts);
|
158
153
|
buildCompressed.displayName = 'Building compressed CSS';
|
159
154
|
|
160
|
-
const packUncompressed
|
155
|
+
const packUncompressed = () => pack(type, false);
|
161
156
|
packUncompressed.displayName = 'Packing uncompressed CSS';
|
162
157
|
|
163
|
-
const packCompressed
|
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
|
176
|
+
const rtl = (callback) => buildCSS(src, 'rtl', config, {}, callback);
|
182
177
|
rtl.displayName = 'CSS Right-To-Left';
|
183
|
-
const css
|
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
|
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
|
-
|
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
|
285
|
+
// Expose build CSS method
|
295
286
|
module.exports.buildCSS = buildCSS;
|