fomantic-ui 2.10.0-beta.2 → 2.10.0-beta.4
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/CONTRIBUTING.md +4 -1
- package/CONTRIBUTORS.md +1 -0
- package/FAQ.md +7 -2
- package/README.md +1 -4
- package/ROADMAP.md +4 -4
- package/SECURITY.md +8 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +6 -6
- package/dist/components/api.min.js +1 -1
- 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 +7 -7
- 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 +1 -9
- 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 +4 -4
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -2
- package/dist/components/divider.min.css +2 -2
- package/dist/components/dropdown.css +24 -47
- package/dist/components/dropdown.js +30 -34
- 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 +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- 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 +2 -3
- package/dist/components/flyout.js +5 -45
- 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 +11 -16
- 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 +6 -30
- 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 +2 -2
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- 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 +8 -8
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +7 -7
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- 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 +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- 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 +8 -8
- 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 +2 -2
- package/dist/components/shape.min.css +2 -2
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +2 -3
- package/dist/components/sidebar.js +3 -44
- 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 +1 -1
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +5 -5
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +3 -3
- package/dist/components/state.min.js +1 -1
- 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 +5 -5
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +10 -10
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- 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 +5 -5
- 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 +6 -6
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +92 -1100
- package/dist/semantic.js +142 -264
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +3 -4
- package/src/README.md +3 -3
- package/src/definitions/behaviors/api.js +5 -5
- package/src/definitions/behaviors/form.js +10 -15
- package/src/definitions/behaviors/state.js +2 -2
- package/src/definitions/behaviors/visibility.js +1 -1
- 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.less +2 -18
- package/src/definitions/modules/calendar.js +6 -6
- package/src/definitions/modules/checkbox.js +0 -8
- package/src/definitions/modules/dimmer.js +3 -3
- package/src/definitions/modules/dimmer.less +0 -9
- package/src/definitions/modules/dropdown.js +29 -33
- package/src/definitions/modules/dropdown.less +20 -42
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +4 -44
- package/src/definitions/modules/modal.js +5 -29
- package/src/definitions/modules/modal.less +1 -1
- package/src/definitions/modules/nag.js +1 -1
- package/src/definitions/modules/popup.js +7 -7
- package/src/definitions/modules/progress.js +6 -6
- package/src/definitions/modules/search.js +7 -7
- package/src/definitions/modules/search.less +0 -3
- package/src/definitions/modules/shape.js +1 -1
- package/src/definitions/modules/sidebar.js +2 -43
- package/src/definitions/modules/slider.js +4 -4
- package/src/definitions/modules/slider.less +1 -1
- package/src/definitions/modules/sticky.js +4 -4
- package/src/definitions/modules/tab.js +9 -9
- package/src/definitions/modules/toast.js +4 -4
- package/src/definitions/modules/toast.less +1 -1
- package/src/definitions/modules/transition.js +5 -5
- 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 +0 -1
- 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 +1 -14
- package/tasks/admin/components/init.js +12 -37
- package/tasks/admin/components/update.js +7 -11
- package/tasks/admin/distributions/create.js +1 -11
- package/tasks/admin/distributions/init.js +10 -35
- package/tasks/admin/distributions/update.js +7 -8
- package/tasks/admin/publish.js +1 -1
- package/tasks/admin/register.js +3 -4
- package/tasks/admin/release.js +2 -2
- package/tasks/build/css.js +5 -5
- package/tasks/build/javascript.js +3 -3
- package/tasks/check-install.js +0 -1
- package/tasks/clean.js +5 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +2 -2
- package/tasks/config/admin/github.js +2 -10
- 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 +0 -1
- package/tasks/config/project/config.js +6 -6
- package/tasks/config/project/install.js +3 -4
- package/tasks/config/project/release.js +1 -1
- package/tasks/config/tasks.js +2 -9
- package/tasks/config/user.js +2 -4
- package/tasks/docs/metadata.js +8 -11
- package/tasks/docs/serve.js +3 -1
- package/tasks/install.js +14 -20
- package/tasks/rtl/watch.js +1 -1
- package/tasks/watch.js +4 -2
- package/types/fomantic-ui-calendar.d.ts +1 -1
- package/types/fomantic-ui-dropdown.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 +6 -0
- 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
@@ -20,16 +20,8 @@ if (!oAuth) {
|
|
20
20
|
console.error('Must add oauth token for GitHub in tasks/config/admin/oauth.js');
|
21
21
|
}
|
22
22
|
|
23
|
-
let github = new GithubAPI({
|
24
|
-
|
25
|
-
debug: true,
|
26
|
-
protocol: 'https',
|
27
|
-
timeout: 5000,
|
28
|
-
});
|
29
|
-
|
30
|
-
github.authenticate({
|
31
|
-
type: 'oauth',
|
32
|
-
token: oAuth.token,
|
23
|
+
let github = new GithubAPI.Octokit({
|
24
|
+
auth: oAuth.token,
|
33
25
|
});
|
34
26
|
|
35
27
|
module.exports = github;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
This repository contains pre-compiled {component} files using the default themes. This is intended for use in projects that do not need all the bells and whistles of Fomantic UI, and want to keep file size to a minimum.
|
4
4
|
|
5
|
-
For the latest changes please see the [Release Notes](https://github.com/fomantic/UI-{Component}/blob/master/RELEASE-NOTES.md)
|
5
|
+
For the latest changes, please see the [Release Notes](https://github.com/fomantic/UI-{Component}/blob/master/RELEASE-NOTES.md)
|
6
6
|
|
7
7
|
**Special Note**
|
8
8
|
An update in `2.0.8` has fixed an issue which may have prevented some single component modules from working correctly. Please see notes in [this pull request](https://github.com/Semantic-Org/Semantic-UI/pull/2816).
|
@@ -27,6 +27,6 @@ meteor add fomantic:ui-{component}
|
|
27
27
|
|
28
28
|
## Addendum
|
29
29
|
|
30
|
-
This element's definitions (required class names,
|
30
|
+
This element's definitions (required class names, HTML structures) are available in the [UI Docs](https://www.fomantic-ui.com)
|
31
31
|
|
32
32
|
Please consider checking out [all the benefits to theming](http://www.learnsemantic.com/guide/expert.html) before using these stand-alone releases.
|
@@ -4,11 +4,8 @@
|
|
4
4
|
"homepage" : "https://www.fomantic-ui.com",
|
5
5
|
"author": {
|
6
6
|
"name" : "Jack Lukic",
|
7
|
-
"web" : "
|
7
|
+
"web" : "https://www.jacklukic.com"
|
8
8
|
},
|
9
|
-
"ignore": [
|
10
|
-
"./index.js"
|
11
|
-
],
|
12
9
|
"keywords": [
|
13
10
|
"fomantic",
|
14
11
|
"semantic",
|
@@ -20,6 +17,7 @@
|
|
20
17
|
"https://github.com/fomantic/Fomantic-UI/blob/master/LICENSE.md"
|
21
18
|
],
|
22
19
|
"ignore": [
|
20
|
+
"./index.js",
|
23
21
|
"docs",
|
24
22
|
"node",
|
25
23
|
"server",
|
@@ -24,7 +24,7 @@ module.exports = {
|
|
24
24
|
currentPath = path.normalize(path.join(directory, file))
|
25
25
|
;
|
26
26
|
if (fs.existsSync(currentPath)) {
|
27
|
-
// found file
|
27
|
+
// found the file
|
28
28
|
configPath = path.normalize(directory);
|
29
29
|
} else {
|
30
30
|
// reached file system root, let's stop
|
@@ -37,7 +37,7 @@ module.exports = {
|
|
37
37
|
}
|
38
38
|
;
|
39
39
|
|
40
|
-
// start walk from outside require-dot-files directory
|
40
|
+
// start the walk from outside require-dot-files directory
|
41
41
|
file = file || defaults.files.config;
|
42
42
|
directory = directory || path.join(__dirname, path.sep, '..');
|
43
43
|
walk(directory);
|
@@ -81,7 +81,7 @@ module.exports = {
|
|
81
81
|
CSS URLs
|
82
82
|
--------------- */
|
83
83
|
|
84
|
-
// determine asset paths in
|
84
|
+
// determine asset paths in CSS by finding relative path between themes and output
|
85
85
|
// force forward slashes
|
86
86
|
|
87
87
|
config.paths.assets = {
|
@@ -99,7 +99,7 @@ module.exports = {
|
|
99
99
|
config.hasPermissions = true;
|
100
100
|
config.parsedPermissions = typeof config.permission === 'string' ? parseInt(config.permission, 8) : config.permission;
|
101
101
|
} else {
|
102
|
-
// pass blank object to avoid causing errors
|
102
|
+
// pass a blank object to avoid causing errors
|
103
103
|
config.permission = {};
|
104
104
|
config.hasPermissions = false;
|
105
105
|
config.parsedPermissions = {};
|
@@ -113,7 +113,7 @@ module.exports = {
|
|
113
113
|
config.globs = {};
|
114
114
|
}
|
115
115
|
|
116
|
-
// remove duplicates from component array
|
116
|
+
// remove duplicates from the component array
|
117
117
|
if (Array.isArray(config.components)) {
|
118
118
|
config.components = config.components.filter(function (component, index) {
|
119
119
|
return config.components.indexOf(component) === index;
|
@@ -128,7 +128,7 @@ module.exports = {
|
|
128
128
|
: [];
|
129
129
|
const componentsExceptIndividuals = components.filter((component) => !individuals.includes(component));
|
130
130
|
|
131
|
-
// takes component object and creates file glob matching selected components
|
131
|
+
// takes the component object and creates file glob matching selected components
|
132
132
|
config.globs.components = componentsExceptIndividuals.length === 1 ? componentsExceptIndividuals[0] : '{' + componentsExceptIndividuals.join(',') + '}';
|
133
133
|
|
134
134
|
// components that should be built, but excluded from main .css/.js files
|
@@ -3,7 +3,6 @@
|
|
3
3
|
*******************************/
|
4
4
|
|
5
5
|
const
|
6
|
-
fs = require('fs'),
|
7
6
|
path = require('path'),
|
8
7
|
requireDotFile = require('require-dot-file'),
|
9
8
|
defaults = require('../defaults'),
|
@@ -126,7 +125,7 @@ module.exports = {
|
|
126
125
|
return walk(nextDirectory);
|
127
126
|
}
|
128
127
|
;
|
129
|
-
// start walk from current directory if none specified
|
128
|
+
// start walk from the current directory if none specified
|
130
129
|
directory = directory || path.join(__dirname, path.sep);
|
131
130
|
|
132
131
|
return walk(directory);
|
@@ -191,7 +190,7 @@ module.exports = {
|
|
191
190
|
json.base = path.normalize(answers.semanticRoot);
|
192
191
|
}
|
193
192
|
|
194
|
-
// record version number to avoid re-installing on same version
|
193
|
+
// record version number to avoid re-installing on the same version
|
195
194
|
json.version = release.version;
|
196
195
|
|
197
196
|
// add dist folder paths
|
@@ -753,7 +752,7 @@ module.exports = {
|
|
753
752
|
/* Copy Install Folders */
|
754
753
|
wrench: {
|
755
754
|
|
756
|
-
// overwrite existing files update
|
755
|
+
// overwrite existing files update and install (default theme / definition)
|
757
756
|
overwrite: {
|
758
757
|
forceDelete: true,
|
759
758
|
excludeHiddenUnix: true,
|
@@ -29,7 +29,7 @@ try {
|
|
29
29
|
};
|
30
30
|
}
|
31
31
|
|
32
|
-
// looks for version in config or package.json (whichever is available)
|
32
|
+
// looks for the version in config or package.json (whichever is available)
|
33
33
|
version = npmPackage && npmPackage.version !== undefined && npmPackage.name === 'fomantic-ui'
|
34
34
|
? npmPackage.version
|
35
35
|
: config.version;
|
package/tasks/config/tasks.js
CHANGED
@@ -18,8 +18,6 @@ if (!prefix.overrideBrowserslist && !hasBrowserslistConfig) {
|
|
18
18
|
'last 4 iOS major versions',
|
19
19
|
'last 4 Android major versions',
|
20
20
|
'last 4 ChromeAndroid versions',
|
21
|
-
'Edge 12',
|
22
|
-
'ie 11',
|
23
21
|
];
|
24
22
|
}
|
25
23
|
|
@@ -48,7 +46,7 @@ module.exports = {
|
|
48
46
|
regExp: {
|
49
47
|
|
50
48
|
comments: {
|
51
|
-
// remove all component headers in concatenated file
|
49
|
+
// remove all component headers in the concatenated file
|
52
50
|
header: {
|
53
51
|
in: /\/\*!(?:(?!\/\*).)*# Fomantic-UI \d+\.\d+\.(?:(?!\/\*).)*MIT license(?:(?!\/\*).)*\*\/\n?/gs,
|
54
52
|
out: '',
|
@@ -60,7 +58,7 @@ module.exports = {
|
|
60
58
|
out: '$1',
|
61
59
|
},
|
62
60
|
|
63
|
-
// add version to first comment
|
61
|
+
// add the version to the first comment
|
64
62
|
license: {
|
65
63
|
in: /(^\/\*[\S\s]+)(# Fomantic-UI )([\S\s]+?\*\/)/,
|
66
64
|
out: '$1$2' + release.version + ' $3',
|
@@ -87,11 +85,6 @@ module.exports = {
|
|
87
85
|
|
88
86
|
settings: {
|
89
87
|
|
90
|
-
/* Remove Files in Clean */
|
91
|
-
del: {
|
92
|
-
silent: true,
|
93
|
-
},
|
94
|
-
|
95
88
|
concatCSS: {
|
96
89
|
rebaseUrls: false,
|
97
90
|
},
|
package/tasks/config/user.js
CHANGED
@@ -4,8 +4,6 @@
|
|
4
4
|
|
5
5
|
const
|
6
6
|
// npm dependencies
|
7
|
-
fs = require('fs'),
|
8
|
-
path = require('path'),
|
9
7
|
extend = require('extend'),
|
10
8
|
requireDotFile = require('require-dot-file'),
|
11
9
|
|
@@ -16,7 +14,7 @@ const
|
|
16
14
|
|
17
15
|
let
|
18
16
|
// Final config object
|
19
|
-
gulpConfig
|
17
|
+
gulpConfig,
|
20
18
|
|
21
19
|
// semantic.json settings
|
22
20
|
userConfig
|
@@ -27,7 +25,7 @@ let
|
|
27
25
|
*******************************/
|
28
26
|
|
29
27
|
try {
|
30
|
-
// looks for config file across all parent directories
|
28
|
+
// looks for a config file across all parent directories
|
31
29
|
userConfig = requireDotFile('semantic.json', process.cwd());
|
32
30
|
if (userConfig.valueOf() === false) {
|
33
31
|
console.error('No semantic.json config found');
|
package/tasks/docs/metadata.js
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
const
|
6
6
|
// node dependencies
|
7
|
-
fs = require('fs'),
|
8
7
|
console = require('@fomantic/better-console'),
|
9
|
-
|
8
|
+
path = require('path'),
|
9
|
+
YAML = require('js-yaml')
|
10
10
|
;
|
11
11
|
|
12
12
|
let data = {};
|
@@ -33,7 +33,7 @@ function inArray(needle, haystack) {
|
|
33
33
|
}
|
34
34
|
|
35
35
|
/**
|
36
|
-
* Parses a file for metadata and stores result in data object.
|
36
|
+
* Parses a file for metadata and stores result in a data object.
|
37
37
|
* @param {File} file - object provided by map-stream.
|
38
38
|
* @param {function(?,File)} - callback provided by map-stream to
|
39
39
|
* reply when done.
|
@@ -54,7 +54,7 @@ function parser(file, callback) {
|
|
54
54
|
text = String(file.contents.toString('utf8')),
|
55
55
|
lines = text.split('\n'),
|
56
56
|
filename = file.path.slice(0, -4),
|
57
|
-
key = 'server
|
57
|
+
key = 'server' + path.sep + 'documents',
|
58
58
|
position = filename.indexOf(key)
|
59
59
|
;
|
60
60
|
|
@@ -66,7 +66,7 @@ function parser(file, callback) {
|
|
66
66
|
return callback(null, file);
|
67
67
|
}
|
68
68
|
|
69
|
-
filename = filename.slice(position + key.length + 1, filename.length);
|
69
|
+
filename = filename.slice(position + key.length + 1, filename.length).replaceAll(path.win32.sep, path.posix.sep);
|
70
70
|
|
71
71
|
let
|
72
72
|
lineCount = lines.length,
|
@@ -104,16 +104,13 @@ function parser(file, callback) {
|
|
104
104
|
}
|
105
105
|
|
106
106
|
// Parse yaml.
|
107
|
-
meta = YAML.
|
107
|
+
meta = YAML.load(yaml.join('\n'));
|
108
108
|
if (meta && meta.type && meta.title && inArray(meta.type, categories)) {
|
109
109
|
meta.category = meta.type;
|
110
110
|
meta.filename = filename;
|
111
111
|
meta.url = '/' + filename;
|
112
|
-
// Primary key will
|
113
|
-
data[meta.element] = meta;
|
114
|
-
} else {
|
115
|
-
// skip
|
116
|
-
// console.log(meta);
|
112
|
+
// Primary key will be filepath
|
113
|
+
data[meta.element.toLowerCase()] = meta;
|
117
114
|
}
|
118
115
|
} catch (error) {
|
119
116
|
console.log(error, file.path);
|
package/tasks/docs/serve.js
CHANGED
@@ -27,7 +27,7 @@ const
|
|
27
27
|
assets = require('../build/assets')
|
28
28
|
;
|
29
29
|
|
30
|
-
module.exports = function () {
|
30
|
+
module.exports = function (callback) {
|
31
31
|
// use a different config
|
32
32
|
const config = extend(true, {}, configDocs);
|
33
33
|
configSetup.addDerivedValues(config);
|
@@ -96,4 +96,6 @@ module.exports = function () {
|
|
96
96
|
--------------- */
|
97
97
|
|
98
98
|
assets.watch('docs', config);
|
99
|
+
|
100
|
+
callback();
|
99
101
|
};
|
package/tasks/install.js
CHANGED
@@ -9,21 +9,18 @@
|
|
9
9
|
|
10
10
|
* (NPM) Install - Will ask for where to put fomantic (outside pm folder)
|
11
11
|
* (NPM) Upgrade - Will look for fomantic install, copy over files and update if new version
|
12
|
-
* Standard installer runs asking for paths to site files etc
|
12
|
+
* Standard installer runs asking for paths to site files etc.
|
13
13
|
*/
|
14
14
|
|
15
15
|
const
|
16
16
|
// node dependencies
|
17
|
-
fs = require('fs'),
|
17
|
+
fs = require('fs-extra'),
|
18
18
|
path = require('path'),
|
19
|
-
mkdirp = require('mkdirp'),
|
20
19
|
extend = require('extend'),
|
21
20
|
console = require('@fomantic/better-console'),
|
22
21
|
gulp = require('gulp'),
|
23
22
|
|
24
23
|
// gulp dependencies
|
25
|
-
chmod = require('gulp-chmod'),
|
26
|
-
del = require('del'),
|
27
24
|
jsonEditor = require('gulp-json-editor'),
|
28
25
|
plumber = require('@fomantic/gulp-plumber'),
|
29
26
|
inquirer = require('inquirer'),
|
@@ -35,9 +32,6 @@ const
|
|
35
32
|
// install config
|
36
33
|
install = require('./config/project/install'),
|
37
34
|
|
38
|
-
// user config
|
39
|
-
config = require('./config/user'),
|
40
|
-
|
41
35
|
// release config (name/title/etc)
|
42
36
|
release = require('./config/project/release'),
|
43
37
|
|
@@ -76,7 +70,7 @@ module.exports = function (callback) {
|
|
76
70
|
return;
|
77
71
|
}
|
78
72
|
|
79
|
-
if (!fs.
|
73
|
+
if (!fs.pathExistsSync(source.site)) {
|
80
74
|
console.log('Missing _site folder. \u001B[92mgulp install\u001B[0m must run inside \u001B[92mnode_modules' + path.sep + 'fomantic-ui\u001B[0m');
|
81
75
|
console.error('Aborting.');
|
82
76
|
callback();
|
@@ -105,7 +99,7 @@ module.exports = function (callback) {
|
|
105
99
|
;
|
106
100
|
|
107
101
|
// duck-type if there is a project installed
|
108
|
-
if (fs.
|
102
|
+
if (fs.pathExistsSync(updatePaths.definition)) {
|
109
103
|
// perform update if new version
|
110
104
|
if (currentConfig.version !== release.version) {
|
111
105
|
console.log('Updating Fomantic UI from ' + currentConfig.version + ' to ' + release.version);
|
@@ -179,7 +173,7 @@ module.exports = function (callback) {
|
|
179
173
|
.replace('{packageMessage}', 'We detected you are using ' + manager.name + ' Nice!')
|
180
174
|
.replace('{root}', manager.root)
|
181
175
|
;
|
182
|
-
// set default path to detected PM root
|
176
|
+
// set default path to the detected PM root
|
183
177
|
rootQuestions[0].default = manager.root;
|
184
178
|
rootQuestions[1].default = manager.root;
|
185
179
|
|
@@ -253,7 +247,7 @@ module.exports = function (callback) {
|
|
253
247
|
|
254
248
|
// Check if PM install
|
255
249
|
if (manager && (answers.useRoot || answers.customRoot)) {
|
256
|
-
// Set root to custom root path if set
|
250
|
+
// Set root to the custom root path if set
|
257
251
|
if (answers.customRoot) {
|
258
252
|
if (answers.customRoot === '') {
|
259
253
|
console.log('Unable to proceed, invalid project root');
|
@@ -290,10 +284,10 @@ module.exports = function (callback) {
|
|
290
284
|
|
291
285
|
// create project folders
|
292
286
|
try {
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
287
|
+
fs.mkdirpSync(installFolder);
|
288
|
+
fs.mkdirpSync(installPaths.definition);
|
289
|
+
fs.mkdirpSync(installPaths.theme);
|
290
|
+
fs.mkdirpSync(installPaths.tasks);
|
297
291
|
} catch (error) {
|
298
292
|
console.error('NPM does not have permissions to create folders at your specified path. Adjust your folders permissions and run "npm install" again');
|
299
293
|
}
|
@@ -338,7 +332,7 @@ module.exports = function (callback) {
|
|
338
332
|
--------------- */
|
339
333
|
|
340
334
|
// Copy _site templates folder to destination
|
341
|
-
if (fs.
|
335
|
+
if (fs.pathExistsSync(installPaths.site)) {
|
342
336
|
console.info('Site folder exists, merging files (no overwrite)', installPaths.site);
|
343
337
|
} else {
|
344
338
|
console.info('Creating site theme folder', installPaths.site);
|
@@ -360,7 +354,7 @@ module.exports = function (callback) {
|
|
360
354
|
// rewrite site variable in theme.less
|
361
355
|
console.info('Adjusting @siteFolder to:', pathToSite + '/');
|
362
356
|
|
363
|
-
if (fs.
|
357
|
+
if (fs.pathExistsSync(installPaths.themeConfig)) {
|
364
358
|
console.info('Modifying src/theme.config (LESS config)', installPaths.themeConfig);
|
365
359
|
|
366
360
|
return gulp.src(installPaths.themeConfig)
|
@@ -390,7 +384,7 @@ module.exports = function (callback) {
|
|
390
384
|
;
|
391
385
|
|
392
386
|
// adjust variables in theme.less
|
393
|
-
if (fs.
|
387
|
+
if (fs.pathExistsSync(installPaths.config)) {
|
394
388
|
console.info('Extending config file (semantic.json)', installPaths.config);
|
395
389
|
|
396
390
|
return gulp.src(installPaths.config)
|
@@ -431,7 +425,7 @@ module.exports = function (callback) {
|
|
431
425
|
inquirer.prompt(questions.cleanup)
|
432
426
|
.then((answers) => {
|
433
427
|
if (answers.cleanup === 'yes') {
|
434
|
-
|
428
|
+
install.setupFiles.forEach((file) => fs.removeSync(file));
|
435
429
|
}
|
436
430
|
if (answers.build === 'yes') {
|
437
431
|
gulp.series('build')(callback);
|
package/tasks/rtl/watch.js
CHANGED
package/tasks/watch.js
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
const
|
6
6
|
// node dependencies
|
7
7
|
console = require('@fomantic/better-console'),
|
8
|
-
gulp = require('gulp'),
|
9
8
|
|
10
9
|
// user config
|
11
10
|
config = require('./config/user'),
|
@@ -19,9 +18,10 @@ const
|
|
19
18
|
;
|
20
19
|
|
21
20
|
// export task
|
22
|
-
module.exports = function () {
|
21
|
+
module.exports = function (callback) {
|
23
22
|
if (!install.isSetup()) {
|
24
23
|
console.error('Cannot watch files. Run "gulp install" to set-up Fomantic');
|
24
|
+
callback();
|
25
25
|
|
26
26
|
return;
|
27
27
|
}
|
@@ -45,4 +45,6 @@ module.exports = function () {
|
|
45
45
|
--------------- */
|
46
46
|
|
47
47
|
assets.watch('default', config);
|
48
|
+
|
49
|
+
callback();
|
48
50
|
};
|
@@ -197,7 +197,7 @@ declare namespace FomanticUI {
|
|
197
197
|
/**
|
198
198
|
* Whether HTML included in given title, content or actions should be preserved.
|
199
199
|
* Set to `false` in case you work with untrusted 3rd party content.
|
200
|
-
* @default
|
200
|
+
* @default false
|
201
201
|
*/
|
202
202
|
preserveHTML: boolean;
|
203
203
|
|
@@ -444,12 +444,6 @@ declare namespace FomanticUI {
|
|
444
444
|
*/
|
445
445
|
minValue: string;
|
446
446
|
|
447
|
-
/**
|
448
|
-
* @default '{name} must have a value'
|
449
|
-
* @deprecated Use notEmpty instead
|
450
|
-
*/
|
451
|
-
empty: string;
|
452
|
-
|
453
447
|
/**
|
454
448
|
* @default '{name} must have a value'
|
455
449
|
*/
|
@@ -585,7 +579,6 @@ declare namespace FomanticUI {
|
|
585
579
|
}
|
586
580
|
|
587
581
|
interface Rules {
|
588
|
-
empty(value: unknown): boolean;
|
589
582
|
notEmpty(value: unknown): boolean;
|
590
583
|
checked(): boolean;
|
591
584
|
email(value: unknown): boolean;
|
@@ -211,7 +211,7 @@ declare namespace FomanticUI {
|
|
211
211
|
* Whether HTML included in given title, message or actions should be preserved.
|
212
212
|
* Set to 'false' in case you work with untrusted 3rd party content.
|
213
213
|
*
|
214
|
-
* @default
|
214
|
+
* @default false
|
215
215
|
*/
|
216
216
|
preserveHTML: boolean;
|
217
217
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|