fomantic-ui 2.10.0-beta.7 → 2.10.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +0 -10
- package/README.md +4 -5
- package/changelog-setup.js +64 -70
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +94 -131
- 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 +152 -205
- 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 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +305 -341
- package/dist/components/calendar.min.css +1 -1
- 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 -1
- package/dist/components/checkbox.js +76 -116
- package/dist/components/checkbox.min.css +1 -1
- 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 +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +58 -91
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +651 -941
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +70 -108
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- 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 +1 -1
- package/dist/components/flyout.js +182 -256
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +325 -429
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- 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 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +211 -295
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +67 -97
- 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 -1
- package/dist/components/popup.js +175 -235
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +103 -138
- 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 +79 -120
- 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 +1 -1
- package/dist/components/search.js +239 -333
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +157 -223
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +122 -163
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +38 -57
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +242 -325
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +68 -98
- 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 +116 -159
- 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 +168 -233
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +89 -114
- 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 +86 -141
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +134 -210
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +53 -53
- package/dist/semantic.js +4006 -5558
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/examples/assets/show-examples.js +2 -4
- package/gulpfile.js +5 -7
- package/package.json +1 -1
- package/scripts/nightly-version.js +7 -10
- package/src/definitions/behaviors/api.js +151 -204
- package/src/definitions/behaviors/form.js +324 -428
- package/src/definitions/behaviors/state.js +67 -97
- package/src/definitions/behaviors/visibility.js +133 -209
- package/src/definitions/globals/site.js +37 -56
- package/src/definitions/modules/accordion.js +93 -130
- package/src/definitions/modules/calendar.js +304 -340
- package/src/definitions/modules/checkbox.js +75 -115
- package/src/definitions/modules/dimmer.js +57 -90
- package/src/definitions/modules/dropdown.js +650 -940
- package/src/definitions/modules/embed.js +69 -107
- package/src/definitions/modules/flyout.js +181 -255
- package/src/definitions/modules/modal.js +210 -294
- package/src/definitions/modules/nag.js +66 -96
- package/src/definitions/modules/popup.js +174 -234
- package/src/definitions/modules/progress.js +102 -137
- package/src/definitions/modules/rating.js +78 -119
- package/src/definitions/modules/search.js +238 -332
- package/src/definitions/modules/shape.js +156 -222
- package/src/definitions/modules/sidebar.js +121 -162
- package/src/definitions/modules/slider.js +241 -324
- package/src/definitions/modules/sticky.js +115 -158
- package/src/definitions/modules/tab.js +167 -232
- package/src/definitions/modules/toast.js +88 -113
- package/src/definitions/modules/transition.js +85 -140
- package/tasks/admin/components/create.js +88 -108
- package/tasks/admin/components/init.js +26 -32
- package/tasks/admin/components/update.js +46 -53
- package/tasks/admin/distributions/create.js +71 -101
- package/tasks/admin/distributions/init.js +27 -33
- package/tasks/admin/distributions/update.js +45 -52
- package/tasks/admin/register.js +11 -15
- package/tasks/build/assets.js +14 -18
- package/tasks/build/css.js +54 -63
- package/tasks/build/javascript.js +45 -53
- package/tasks/build.js +4 -6
- package/tasks/check-install.js +5 -7
- package/tasks/clean.js +2 -4
- package/tasks/collections/admin.js +13 -15
- package/tasks/collections/build.js +6 -8
- package/tasks/collections/docs.js +2 -4
- 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 +7 -9
- package/tasks/config/admin/templates/css-package.js +1 -3
- package/tasks/config/admin/templates/less-package.js +1 -3
- package/tasks/config/npm/gulpfile.js +4 -6
- package/tasks/config/project/config.js +22 -30
- package/tasks/config/project/install.js +56 -70
- package/tasks/config/project/release.js +6 -8
- package/tasks/config/tasks.js +8 -12
- package/tasks/config/user.js +13 -17
- package/tasks/docs/build.js +26 -31
- package/tasks/docs/metadata.js +24 -30
- package/tasks/docs/serve.js +20 -26
- package/tasks/install.js +71 -98
- package/tasks/rtl/build.js +2 -4
- package/tasks/rtl/watch.js +2 -4
- package/tasks/watch.js +9 -11
- package/test/meteor/fonts.js +1 -2
- package/test/modules/module.spec.js +16 -18
package/tasks/build/css.js
CHANGED
@@ -2,47 +2,45 @@
|
|
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
46
|
* Builds the CSS
|
@@ -82,8 +80,7 @@ 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
|
/**
|
@@ -92,7 +89,7 @@ function build(src, type, compress, config, opts) {
|
|
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([
|
@@ -287,8 +279,7 @@ module.exports.watch = function (type, config) {
|
|
287
279
|
// Reset the internal changed files array
|
288
280
|
files = [];
|
289
281
|
}, 1000);
|
290
|
-
})
|
291
|
-
;
|
282
|
+
});
|
292
283
|
};
|
293
284
|
|
294
285
|
// Expose build CSS method
|
@@ -2,43 +2,41 @@
|
|
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
|
-
settings = tasks.settings
|
41
|
-
;
|
5
|
+
const gulp = require('gulp');
|
6
|
+
|
7
|
+
// node dependencies
|
8
|
+
const console = require('@fomantic/better-console');
|
9
|
+
|
10
|
+
// gulp dependencies
|
11
|
+
const chmod = require('gulp-chmod');
|
12
|
+
const concat = require('gulp-concat');
|
13
|
+
const dedupe = require('@fomantic/gulp-dedupe');
|
14
|
+
const flatten = require('gulp-flatten');
|
15
|
+
const gulpif = require('gulp-if');
|
16
|
+
const header = require('@fomantic/gulp-header');
|
17
|
+
const normalize = require('normalize-path');
|
18
|
+
const ordered = require('ordered-read-streams');
|
19
|
+
const plumber = require('@fomantic/gulp-plumber');
|
20
|
+
const print = require('gulp-print').default;
|
21
|
+
const rename = require('gulp-rename');
|
22
|
+
const replace = require('gulp-replace');
|
23
|
+
const uglify = require('gulp-uglify');
|
24
|
+
|
25
|
+
// config
|
26
|
+
const config = require('../config/user');
|
27
|
+
const docsConfig = require('../config/docs');
|
28
|
+
const tasks = require('../config/tasks');
|
29
|
+
const install = require('../config/project/install');
|
30
|
+
|
31
|
+
// shorthand
|
32
|
+
const globs = config.globs;
|
33
|
+
const assets = config.paths.assets;
|
34
|
+
|
35
|
+
const banner = tasks.banner;
|
36
|
+
const filenames = tasks.filenames;
|
37
|
+
const comments = tasks.regExp.comments;
|
38
|
+
const log = tasks.log;
|
39
|
+
const settings = tasks.settings;
|
42
40
|
|
43
41
|
/**
|
44
42
|
* Concat and uglify the JavaScript files
|
@@ -60,8 +58,7 @@ function build(src, type, config) {
|
|
60
58
|
.pipe(header(banner, settings.header))
|
61
59
|
.pipe(gulpif(config.hasPermissions, chmod(config.parsedPermissions)))
|
62
60
|
.pipe(gulp.dest(config.paths.output.compressed))
|
63
|
-
.pipe(print(log.created))
|
64
|
-
;
|
61
|
+
.pipe(print(log.created));
|
65
62
|
}
|
66
63
|
|
67
64
|
/**
|
@@ -70,14 +67,13 @@ function build(src, type, config) {
|
|
70
67
|
* @param {boolean} compress - should the output be compressed
|
71
68
|
*/
|
72
69
|
function pack(type, compress) {
|
73
|
-
const output
|
70
|
+
const output = type === 'docs' ? docsConfig.paths.output : config.paths.output;
|
74
71
|
const concatenatedJS = compress ? filenames.concatenatedMinifiedJS : filenames.concatenatedJS;
|
75
72
|
|
76
73
|
let src = globs.components
|
77
74
|
.replace(/[{}]/g, '')
|
78
75
|
.split(',')
|
79
|
-
.map((c) => gulp.src(output.uncompressed + '/**/' + c + globs.ignored + '.js'))
|
80
|
-
;
|
76
|
+
.map((c) => gulp.src(output.uncompressed + '/**/' + c + globs.ignored + '.js'));
|
81
77
|
|
82
78
|
return ordered(src)
|
83
79
|
.pipe(plumber())
|
@@ -89,8 +85,7 @@ function pack(type, compress) {
|
|
89
85
|
.pipe(header(banner, settings.header))
|
90
86
|
.pipe(gulpif(config.hasPermissions, chmod(config.parsedPermissions)))
|
91
87
|
.pipe(gulp.dest(output.packaged))
|
92
|
-
.pipe(print(log.created))
|
93
|
-
;
|
88
|
+
.pipe(print(log.created));
|
94
89
|
}
|
95
90
|
|
96
91
|
function buildJS(src, type, config, callback) {
|
@@ -115,13 +110,13 @@ function buildJS(src, type, config, callback) {
|
|
115
110
|
}
|
116
111
|
|
117
112
|
// copy source javascript
|
118
|
-
const js
|
113
|
+
const js = () => build(src, type, config);
|
119
114
|
js.displayName = 'Building un/compressed Javascript';
|
120
115
|
|
121
|
-
const packUncompressed
|
116
|
+
const packUncompressed = () => pack(type, false);
|
122
117
|
packUncompressed.displayName = 'Packing uncompressed Javascript';
|
123
118
|
|
124
|
-
const packCompressed
|
119
|
+
const packCompressed = () => pack(type, true);
|
125
120
|
packCompressed.displayName = 'Packing compressed Javascript';
|
126
121
|
|
127
122
|
gulp.series(js, gulp.parallel(packUncompressed, packCompressed))(callback);
|
@@ -132,10 +127,8 @@ module.exports = function (callback) {
|
|
132
127
|
};
|
133
128
|
|
134
129
|
// We keep the changed files in an array to call build with all of them at the same time
|
135
|
-
let
|
136
|
-
|
137
|
-
files = []
|
138
|
-
;
|
130
|
+
let timeout;
|
131
|
+
let files = [];
|
139
132
|
|
140
133
|
module.exports.watch = function (type, config) {
|
141
134
|
gulp
|
@@ -166,8 +159,7 @@ module.exports.watch = function (type, config) {
|
|
166
159
|
// Reset internal changed files array
|
167
160
|
files = [];
|
168
161
|
}, 1000);
|
169
|
-
})
|
170
|
-
;
|
162
|
+
});
|
171
163
|
};
|
172
164
|
|
173
165
|
module.exports.buildJS = buildJS;
|
package/tasks/build.js
CHANGED
@@ -2,13 +2,11 @@
|
|
2
2
|
* Build Task
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
gulp = require('gulp'),
|
5
|
+
// dependencies
|
6
|
+
const gulp = require('gulp');
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
;
|
8
|
+
// config
|
9
|
+
const install = require('./config/project/install');
|
12
10
|
|
13
11
|
module.exports = function (callback) {
|
14
12
|
console.info('Building Fomantic');
|
package/tasks/check-install.js
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
* Check Install
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
isSetup = require('./config/project/install').isSetup,
|
5
|
+
// node dependencies
|
6
|
+
const console = require('@fomantic/better-console');
|
7
|
+
const isSetup = require('./config/project/install').isSetup;
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
;
|
9
|
+
const install = require('./install');
|
10
|
+
const watch = require('./watch');
|
13
11
|
|
14
12
|
// export task
|
15
13
|
module.exports = function (callback) {
|
package/tasks/clean.js
CHANGED
@@ -2,10 +2,8 @@
|
|
2
2
|
Clean Task
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
config = require('./config/user')
|
8
|
-
;
|
5
|
+
const fs = require('fs-extra');
|
6
|
+
const config = require('./config/user');
|
9
7
|
|
10
8
|
// cleans distribution files
|
11
9
|
module.exports = function (callback) {
|
@@ -2,21 +2,19 @@
|
|
2
2
|
* Admin Task Collection
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
register = require('../admin/register')
|
19
|
-
;
|
5
|
+
// less/css distributions
|
6
|
+
const initComponents = require('../admin/components/init');
|
7
|
+
const createComponents = require('../admin/components/create');
|
8
|
+
const updateComponents = require('../admin/components/update');
|
9
|
+
|
10
|
+
// single component releases
|
11
|
+
const initDistributions = require('../admin/distributions/init');
|
12
|
+
const createDistributions = require('../admin/distributions/create');
|
13
|
+
const updateDistributions = require('../admin/distributions/update');
|
14
|
+
|
15
|
+
const release = require('../admin/release');
|
16
|
+
const publish = require('../admin/publish');
|
17
|
+
const register = require('../admin/register');
|
20
18
|
|
21
19
|
/*
|
22
20
|
These are tasks to be run by project maintainers
|
@@ -2,15 +2,13 @@
|
|
2
2
|
* Define Build Sub-Tasks
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
watch = require('../watch'),
|
5
|
+
const watch = require('../watch');
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
;
|
7
|
+
// build sub-tasks
|
8
|
+
const build = require('../build');
|
9
|
+
const buildJS = require('../build/javascript');
|
10
|
+
const buildCSS = require('../build/css');
|
11
|
+
const buildAssets = require('../build/assets');
|
14
12
|
|
15
13
|
module.exports = function (gulp) {
|
16
14
|
gulp.task('watch', watch);
|
@@ -3,10 +3,8 @@
|
|
3
3
|
*******************************/
|
4
4
|
|
5
5
|
// docs tasks
|
6
|
-
const
|
7
|
-
|
8
|
-
serveDocs = require('../docs/serve')
|
9
|
-
;
|
6
|
+
const buildDocs = require('../docs/build');
|
7
|
+
const serveDocs = require('../docs/serve');
|
10
8
|
|
11
9
|
/*
|
12
10
|
Lets you serve files to a local documentation instance
|
@@ -3,10 +3,8 @@
|
|
3
3
|
*******************************/
|
4
4
|
|
5
5
|
// docs tasks
|
6
|
-
const
|
7
|
-
|
8
|
-
checkInstall = require('../check-install')
|
9
|
-
;
|
6
|
+
const install = require('../install');
|
7
|
+
const checkInstall = require('../check-install');
|
10
8
|
|
11
9
|
/*
|
12
10
|
Lets you serve files to a local documentation instance
|
package/tasks/collections/rtl.js
CHANGED
@@ -2,10 +2,8 @@
|
|
2
2
|
* Define RTL Sub-Tasks
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
watchRTL = require('../rtl/watch')
|
8
|
-
;
|
5
|
+
const buildRTL = require('../rtl/build');
|
6
|
+
const watchRTL = require('../rtl/watch');
|
9
7
|
|
10
8
|
module.exports = function (gulp) {
|
11
9
|
gulp.task('watch-rtl', watchRTL);
|
@@ -2,10 +2,8 @@
|
|
2
2
|
* Define Various Sub-Tasks
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
version = require('../version')
|
8
|
-
;
|
5
|
+
const clean = require('../clean');
|
6
|
+
const version = require('../version');
|
9
7
|
|
10
8
|
/*
|
11
9
|
Lets you serve files to a local documentation instance
|
@@ -5,16 +5,14 @@
|
|
5
5
|
Logs into GitHub using OAuth
|
6
6
|
*/
|
7
7
|
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
GithubAPI = require('@octokit/rest'),
|
8
|
+
const fs = require('node:fs');
|
9
|
+
const path = require('node:path');
|
10
|
+
const GithubAPI = require('@octokit/rest');
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
;
|
12
|
+
// stores oauth info for GitHub API
|
13
|
+
const oAuth = fs.existsSync(path.join(__dirname, './oauth.js'))
|
14
|
+
? require('./oauth.js') // eslint-disable-line import/extensions
|
15
|
+
: false;
|
18
16
|
|
19
17
|
if (!oAuth) {
|
20
18
|
console.error('Must add oauth token for GitHub in tasks/config/admin/oauth.js');
|
@@ -2,14 +2,12 @@
|
|
2
2
|
* Set-up
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
gulp = require('gulp'),
|
5
|
+
const gulp = require('gulp');
|
7
6
|
|
8
|
-
|
9
|
-
|
7
|
+
// read user config to know what task to load
|
8
|
+
const config = require('./tasks/config/user'); // eslint-disable-line import/extensions
|
10
9
|
|
11
|
-
|
12
|
-
;
|
10
|
+
const rtl = require('./tasks/collections/rtl'); // eslint-disable-line import/extensions
|
13
11
|
|
14
12
|
/*******************************
|
15
13
|
* Tasks
|