fomantic-ui 2.10.0-beta.6 → 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 +674 -977
- 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 +80 -127
- 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 +192 -274
- 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 +221 -313
- 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 +185 -254
- 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 +89 -139
- 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 +253 -352
- 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 +99 -132
- 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 +4100 -5721
- 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 +673 -976
- package/src/definitions/modules/embed.js +79 -126
- package/src/definitions/modules/flyout.js +191 -273
- package/src/definitions/modules/modal.js +220 -312
- package/src/definitions/modules/nag.js +66 -96
- package/src/definitions/modules/popup.js +184 -253
- package/src/definitions/modules/progress.js +102 -137
- package/src/definitions/modules/rating.js +88 -138
- package/src/definitions/modules/search.js +252 -351
- 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 +98 -131
- 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
@@ -2,12 +2,10 @@
|
|
2
2
|
Set-up
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
path = require('path'),
|
5
|
+
const fs = require('node:fs');
|
6
|
+
const path = require('node:path');
|
8
7
|
|
9
|
-
|
10
|
-
;
|
8
|
+
const defaults = require('../defaults');
|
11
9
|
|
12
10
|
/*******************************
|
13
11
|
Exports
|
@@ -16,26 +14,22 @@ const
|
|
16
14
|
module.exports = {
|
17
15
|
|
18
16
|
getPath: function (file, directory) {
|
19
|
-
let
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
;
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
// reached file system root, let's stop
|
31
|
-
if (nextDirectory === directory) {
|
32
|
-
return;
|
33
|
-
}
|
34
|
-
// otherwise recurse
|
35
|
-
walk(nextDirectory, file);
|
17
|
+
let configPath;
|
18
|
+
let walk = function (directory) {
|
19
|
+
let nextDirectory = path.resolve(path.join(directory, path.sep, '..'));
|
20
|
+
let currentPath = path.normalize(path.join(directory, file));
|
21
|
+
if (fs.existsSync(currentPath)) {
|
22
|
+
// found the file
|
23
|
+
configPath = path.normalize(directory);
|
24
|
+
} else {
|
25
|
+
// reached file system root, let's stop
|
26
|
+
if (nextDirectory === directory) {
|
27
|
+
return;
|
36
28
|
}
|
29
|
+
// otherwise recurse
|
30
|
+
walk(nextDirectory, file);
|
37
31
|
}
|
38
|
-
;
|
32
|
+
};
|
39
33
|
|
40
34
|
// start the walk from outside require-dot-files directory
|
41
35
|
file = file || defaults.files.config;
|
@@ -51,12 +45,10 @@ module.exports = {
|
|
51
45
|
File Paths
|
52
46
|
--------------- */
|
53
47
|
|
54
|
-
let
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
folder
|
59
|
-
;
|
48
|
+
let configPath = this.getPath();
|
49
|
+
let sourcePaths = {};
|
50
|
+
let outputPaths = {};
|
51
|
+
let folder;
|
60
52
|
|
61
53
|
// resolve paths (config location + base + path)
|
62
54
|
for (folder in config.paths.source) {
|
@@ -123,7 +115,7 @@ module.exports = {
|
|
123
115
|
const components = Array.isArray(config.components) && config.components.length > 0
|
124
116
|
? config.components
|
125
117
|
: defaults.components;
|
126
|
-
const individuals =
|
118
|
+
const individuals = Array.isArray(config.individuals) && config.individuals.length > 0
|
127
119
|
? config.individuals
|
128
120
|
: [];
|
129
121
|
const componentsExceptIndividuals = components.filter((component) => !individuals.includes(component));
|
@@ -2,12 +2,10 @@
|
|
2
2
|
Set-up
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
release = require('./release')
|
10
|
-
;
|
5
|
+
const path = require('node:path');
|
6
|
+
const requireDotFile = require('require-dot-file');
|
7
|
+
const defaults = require('../defaults');
|
8
|
+
const release = require('./release');
|
11
9
|
|
12
10
|
/*******************************
|
13
11
|
When to Ask
|
@@ -82,49 +80,43 @@ module.exports = {
|
|
82
80
|
|
83
81
|
// detect whether there is a semantic.json configuration and that the auto-install option is set to true
|
84
82
|
shouldAutoInstall: function () {
|
85
|
-
let
|
86
|
-
config = when.hasConfig()
|
87
|
-
;
|
83
|
+
let config = when.hasConfig();
|
88
84
|
|
89
85
|
return config.autoInstall;
|
90
86
|
},
|
91
87
|
|
92
88
|
// checks if files are in a PM directory
|
93
89
|
getPackageManager: function (directory) {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
name: 'Bower',
|
105
|
-
root: nextDirectory,
|
106
|
-
};
|
107
|
-
}
|
108
|
-
if (folder === 'node_modules') {
|
109
|
-
return {
|
110
|
-
name: 'NPM',
|
111
|
-
root: nextDirectory,
|
112
|
-
};
|
113
|
-
}
|
114
|
-
if (folder === 'composer') {
|
115
|
-
return {
|
116
|
-
name: 'Composer',
|
117
|
-
root: nextDirectory,
|
118
|
-
};
|
119
|
-
}
|
120
|
-
if (path.resolve(directory) === path.resolve(nextDirectory)) {
|
121
|
-
return false;
|
122
|
-
}
|
123
|
-
|
124
|
-
// recurse downward
|
125
|
-
return walk(nextDirectory);
|
90
|
+
// returns last matching result (avoid sub-module detection)
|
91
|
+
let walk = function (directory) {
|
92
|
+
let pathArray = directory.split(path.sep);
|
93
|
+
let folder = pathArray[pathArray.length - 1];
|
94
|
+
let nextDirectory = path.join(directory, path.sep, '..');
|
95
|
+
if (folder === 'bower_components') {
|
96
|
+
return {
|
97
|
+
name: 'Bower',
|
98
|
+
root: nextDirectory,
|
99
|
+
};
|
126
100
|
}
|
127
|
-
|
101
|
+
if (folder === 'node_modules') {
|
102
|
+
return {
|
103
|
+
name: 'NPM',
|
104
|
+
root: nextDirectory,
|
105
|
+
};
|
106
|
+
}
|
107
|
+
if (folder === 'composer') {
|
108
|
+
return {
|
109
|
+
name: 'Composer',
|
110
|
+
root: nextDirectory,
|
111
|
+
};
|
112
|
+
}
|
113
|
+
if (path.resolve(directory) === path.resolve(nextDirectory)) {
|
114
|
+
return false;
|
115
|
+
}
|
116
|
+
|
117
|
+
// recurse downward
|
118
|
+
return walk(nextDirectory);
|
119
|
+
};
|
128
120
|
// start walk from the current directory if none specified
|
129
121
|
directory = directory || path.join(__dirname, path.sep);
|
130
122
|
|
@@ -133,27 +125,23 @@ module.exports = {
|
|
133
125
|
|
134
126
|
// checks if files is PMed submodule
|
135
127
|
isSubModule: function (directory) {
|
136
|
-
let
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
moduleFolders++;
|
146
|
-
} else if (folder === '.pnpm') {
|
147
|
-
moduleFolders--;
|
148
|
-
}
|
149
|
-
if (path.resolve(directory) === path.resolve(nextDirectory)) {
|
150
|
-
return moduleFolders > 1;
|
151
|
-
}
|
152
|
-
|
153
|
-
// recurse downward
|
154
|
-
return walk(nextDirectory);
|
128
|
+
let moduleFolders = 0;
|
129
|
+
let walk = function (directory) {
|
130
|
+
let pathArray = directory.split(path.sep);
|
131
|
+
let folder = pathArray[pathArray.length - 2];
|
132
|
+
let nextDirectory = path.join(directory, path.sep, '..');
|
133
|
+
if (['bower_components', 'node_modules', 'composer'].includes(folder)) {
|
134
|
+
moduleFolders++;
|
135
|
+
} else if (folder === '.pnpm') {
|
136
|
+
moduleFolders--;
|
155
137
|
}
|
156
|
-
|
138
|
+
if (path.resolve(directory) === path.resolve(nextDirectory)) {
|
139
|
+
return moduleFolders > 1;
|
140
|
+
}
|
141
|
+
|
142
|
+
// recurse downward
|
143
|
+
return walk(nextDirectory);
|
144
|
+
};
|
157
145
|
// start walk from current directory if none specified
|
158
146
|
directory = directory || path.join(__dirname, path.sep);
|
159
147
|
|
@@ -161,14 +149,12 @@ module.exports = {
|
|
161
149
|
},
|
162
150
|
|
163
151
|
createJSON: function (answers) {
|
164
|
-
let
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
}
|
171
|
-
;
|
152
|
+
let json = {
|
153
|
+
paths: {
|
154
|
+
source: {},
|
155
|
+
output: {},
|
156
|
+
},
|
157
|
+
};
|
172
158
|
|
173
159
|
// add components
|
174
160
|
if (answers.components) {
|
@@ -4,14 +4,12 @@
|
|
4
4
|
|
5
5
|
const requireDotFile = require('require-dot-file');
|
6
6
|
|
7
|
-
let
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
includeVersionInFileName
|
14
|
-
;
|
7
|
+
let config;
|
8
|
+
let npmPackage;
|
9
|
+
let version;
|
10
|
+
let revision;
|
11
|
+
let versionInFileName;
|
12
|
+
let includeVersionInFileName;
|
15
13
|
|
16
14
|
/*******************************
|
17
15
|
Derived Values
|
package/tasks/config/tasks.js
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
const
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
release = require('./project/release')
|
6
|
-
;
|
1
|
+
const browserslist = require('browserslist');
|
2
|
+
const console = require('@fomantic/better-console');
|
3
|
+
const config = require('./user');
|
4
|
+
const release = require('./project/release');
|
7
5
|
|
8
6
|
let defaultBrowsers = browserslist(browserslist.defaults);
|
9
7
|
let userBrowsers = browserslist();
|
@@ -101,12 +99,10 @@ module.exports = {
|
|
101
99
|
plumber: {
|
102
100
|
less: {
|
103
101
|
errorHandler: function (error) {
|
104
|
-
let
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
element
|
109
|
-
;
|
102
|
+
let regExp = {
|
103
|
+
variable: /@(\S.*?)\s/,
|
104
|
+
};
|
105
|
+
let element;
|
110
106
|
if (error && error.filename && /theme.less/.test(error.filename)) {
|
111
107
|
if (error.line === 9) {
|
112
108
|
element = regExp.variable.exec(error.message)[1];
|
package/tasks/config/user.js
CHANGED
@@ -2,23 +2,19 @@
|
|
2
2
|
Set-up
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
// semantic.json settings
|
20
|
-
userConfig
|
21
|
-
;
|
5
|
+
// npm dependencies
|
6
|
+
const extend = require('extend');
|
7
|
+
const requireDotFile = require('require-dot-file');
|
8
|
+
|
9
|
+
// semantic.json defaults
|
10
|
+
const defaults = require('./defaults');
|
11
|
+
const config = require('./project/config');
|
12
|
+
|
13
|
+
// Final config object
|
14
|
+
let gulpConfig;
|
15
|
+
|
16
|
+
// semantic.json settings
|
17
|
+
let userConfig;
|
22
18
|
|
23
19
|
/*******************************
|
24
20
|
User Config
|
package/tasks/docs/build.js
CHANGED
@@ -2,37 +2,35 @@
|
|
2
2
|
Build Docs
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
|
7
|
-
extend = require('extend'),
|
5
|
+
const fs = require('node:fs');
|
6
|
+
const extend = require('extend');
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
// node dependencies
|
9
|
+
const console = require('@fomantic/better-console');
|
10
|
+
const gulp = require('gulp');
|
11
|
+
const map = require('map-stream');
|
13
12
|
|
14
|
-
|
15
|
-
|
13
|
+
// gulp dependencies
|
14
|
+
const print = require('gulp-print').default;
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
// user config
|
17
|
+
const configDocs = require('../config/docs');
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
// install config
|
20
|
+
const tasks = require('../config/tasks');
|
21
|
+
const configSetup = require('../config/project/config');
|
22
|
+
const install = require('../config/project/install');
|
24
23
|
|
25
|
-
|
26
|
-
|
24
|
+
// metadata parsing
|
25
|
+
const metadata = require('./metadata');
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
// build methods
|
28
|
+
const buildJS = require('../build/javascript').buildJS;
|
29
|
+
const buildCSS = require('../build/css').buildCSS;
|
30
|
+
const buildAssets = require('../build/assets').buildAssets;
|
32
31
|
|
33
|
-
|
34
|
-
|
35
|
-
;
|
32
|
+
// shorthand
|
33
|
+
const log = tasks.log;
|
36
34
|
|
37
35
|
module.exports = function (callback) {
|
38
36
|
// use a different config
|
@@ -40,7 +38,7 @@ module.exports = function (callback) {
|
|
40
38
|
configSetup.addDerivedValues(config);
|
41
39
|
|
42
40
|
// shorthand
|
43
|
-
const globs
|
41
|
+
const globs = config.globs;
|
44
42
|
const output = config.paths.output;
|
45
43
|
|
46
44
|
/* --------------
|
@@ -59,8 +57,7 @@ module.exports = function (callback) {
|
|
59
57
|
.on('end', function () {
|
60
58
|
fs.mkdirSync(output.metadata, { recursive: true });
|
61
59
|
fs.writeFileSync(output.metadata + '/metadata.json', JSON.stringify(metadata.result, null, 2));
|
62
|
-
})
|
63
|
-
;
|
60
|
+
});
|
64
61
|
}
|
65
62
|
|
66
63
|
/* --------------
|
@@ -73,8 +70,7 @@ module.exports = function (callback) {
|
|
73
70
|
|
74
71
|
return gulp.src('examples/**/*.*', { encoding: false })
|
75
72
|
.pipe(gulp.dest(output.examples))
|
76
|
-
.pipe(print(log.created))
|
77
|
-
;
|
73
|
+
.pipe(print(log.created));
|
78
74
|
}
|
79
75
|
|
80
76
|
/* --------------
|
@@ -87,8 +83,7 @@ module.exports = function (callback) {
|
|
87
83
|
|
88
84
|
return gulp.src('src/**/*.*', { encoding: false })
|
89
85
|
.pipe(gulp.dest(output.less))
|
90
|
-
.pipe(print(log.created))
|
91
|
-
;
|
86
|
+
.pipe(print(log.created));
|
92
87
|
}
|
93
88
|
|
94
89
|
/* --------------
|
package/tasks/docs/metadata.js
CHANGED
@@ -2,12 +2,10 @@
|
|
2
2
|
Summarize Docs
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
YAML = require('js-yaml')
|
10
|
-
;
|
5
|
+
// node dependencies
|
6
|
+
const console = require('@fomantic/better-console');
|
7
|
+
const path = require('node:path');
|
8
|
+
const YAML = require('js-yaml');
|
11
9
|
|
12
10
|
let data = {};
|
13
11
|
|
@@ -49,14 +47,12 @@ function parser(file, callback) {
|
|
49
47
|
}
|
50
48
|
|
51
49
|
try {
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
position = filename.indexOf(key)
|
59
|
-
;
|
50
|
+
/** @type {string} */
|
51
|
+
let text = String(file.contents.toString('utf8'));
|
52
|
+
let lines = text.split('\n');
|
53
|
+
let filename = file.path.slice(0, -4);
|
54
|
+
let key = 'server' + path.sep + 'documents';
|
55
|
+
let position = filename.indexOf(key);
|
60
56
|
|
61
57
|
// exit conditions
|
62
58
|
if (!lines) {
|
@@ -68,22 +64,20 @@ function parser(file, callback) {
|
|
68
64
|
|
69
65
|
filename = filename.slice(position + key.length + 1, filename.length).replaceAll(path.win32.sep, path.posix.sep);
|
70
66
|
|
71
|
-
let
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
line
|
86
|
-
;
|
67
|
+
let lineCount = lines.length;
|
68
|
+
let active = false;
|
69
|
+
let yaml = [];
|
70
|
+
let categories = [
|
71
|
+
'UI Element',
|
72
|
+
'UI Global',
|
73
|
+
'UI Collection',
|
74
|
+
'UI View',
|
75
|
+
'UI Module',
|
76
|
+
'UI Behavior',
|
77
|
+
];
|
78
|
+
let index;
|
79
|
+
let meta;
|
80
|
+
let line;
|
87
81
|
|
88
82
|
for (index = 0; index < lineCount; index++) {
|
89
83
|
line = lines[index];
|
package/tasks/docs/serve.js
CHANGED
@@ -2,30 +2,28 @@
|
|
2
2
|
Serve Docs
|
3
3
|
*******************************/
|
4
4
|
|
5
|
-
const
|
6
|
-
extend = require('extend'),
|
5
|
+
const extend = require('extend');
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
// node dependencies
|
8
|
+
const console = require('@fomantic/better-console');
|
9
|
+
const gulp = require('gulp');
|
11
10
|
|
12
|
-
|
13
|
-
|
11
|
+
// gulp dependencies
|
12
|
+
const print = require('gulp-print').default;
|
14
13
|
|
15
|
-
|
16
|
-
|
14
|
+
// user config
|
15
|
+
const configDocs = require('../config/docs');
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
// task config
|
18
|
+
const tasks = require('../config/tasks');
|
19
|
+
const configSetup = require('../config/project/config');
|
21
20
|
|
22
|
-
|
23
|
-
|
21
|
+
// shorthand
|
22
|
+
const log = tasks.log;
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
;
|
24
|
+
const css = require('../build/css');
|
25
|
+
const js = require('../build/javascript');
|
26
|
+
const assets = require('../build/assets');
|
29
27
|
|
30
28
|
module.exports = function (callback) {
|
31
29
|
// use a different config
|
@@ -52,10 +50,8 @@ module.exports = function (callback) {
|
|
52
50
|
encoding: false,
|
53
51
|
})
|
54
52
|
.pipe(gulp.dest(config.paths.output.less))
|
55
|
-
.pipe(print(log.created))
|
56
|
-
|
57
|
-
})
|
58
|
-
;
|
53
|
+
.pipe(print(log.created));
|
54
|
+
});
|
59
55
|
|
60
56
|
/* --------------
|
61
57
|
Copy Examples
|
@@ -74,10 +70,8 @@ module.exports = function (callback) {
|
|
74
70
|
encoding: false,
|
75
71
|
})
|
76
72
|
.pipe(gulp.dest(config.paths.output.examples))
|
77
|
-
.pipe(print(log.created))
|
78
|
-
|
79
|
-
})
|
80
|
-
;
|
73
|
+
.pipe(print(log.created));
|
74
|
+
});
|
81
75
|
|
82
76
|
/* --------------
|
83
77
|
Watch CSS
|