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
@@ -3,7 +3,7 @@
|
|
3
3
|
@fonts: {
|
4
4
|
@solid: {
|
5
5
|
font-family: @fontName;
|
6
|
-
src: url("@{fontPath}/@{fontName}.woff2") format("woff2")
|
6
|
+
src: url("@{fontPath}/@{fontName}.woff2") format("woff2");
|
7
7
|
font-style: normal;
|
8
8
|
font-weight: @normal;
|
9
9
|
font-variant: normal;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
@fonts: {
|
3
3
|
@solid: {
|
4
4
|
font-family: @fontName;
|
5
|
-
src: url("@{fontPath}/@{fontName}.woff2") format("woff2")
|
5
|
+
src: url("@{fontPath}/@{fontName}.woff2") format("woff2");
|
6
6
|
font-style: normal;
|
7
7
|
font-weight: @normal;
|
8
8
|
font-variant: normal;
|
package/tasks/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
* copy component files from release
|
9
9
|
* create commonjs files as index.js for NPM release
|
10
|
-
* create release notes that filter only items related to component
|
10
|
+
* create release notes that filter only items related to the component
|
11
11
|
* custom package.json file from template
|
12
12
|
* create bower.json from template
|
13
13
|
* create README from template
|
@@ -41,7 +41,6 @@ const
|
|
41
41
|
|
42
42
|
module.exports = function (callback) {
|
43
43
|
let
|
44
|
-
stream,
|
45
44
|
index,
|
46
45
|
tasks = []
|
47
46
|
;
|
@@ -61,7 +60,6 @@ module.exports = function (callback) {
|
|
61
60
|
packageName = release.packageRoot + component,
|
62
61
|
repoName = release.componentRepoRoot + capitalizedComponent,
|
63
62
|
gitURL = 'https://github.com/' + release.org + '/' + repoName + '.git',
|
64
|
-
repoURL = 'https://github.com/' + release.org + '/' + repoName + '/',
|
65
63
|
concatSettings = {
|
66
64
|
newline: '',
|
67
65
|
root: outputDirectory,
|
@@ -107,17 +105,6 @@ module.exports = function (callback) {
|
|
107
105
|
jQuery: 'require("jquery")',
|
108
106
|
},
|
109
107
|
},
|
110
|
-
task = {
|
111
|
-
all: component + ' creating',
|
112
|
-
repo: component + ' create repo',
|
113
|
-
bower: component + ' create bower.json',
|
114
|
-
readme: component + ' create README',
|
115
|
-
npm: component + ' create NPM Module',
|
116
|
-
notes: component + ' create release notes',
|
117
|
-
composer: component + ' create composer.json',
|
118
|
-
package: component + ' create package.json',
|
119
|
-
meteor: component + ' create meteor package.js',
|
120
|
-
},
|
121
108
|
// paths to includable assets
|
122
109
|
manifest = {
|
123
110
|
assets: outputDirectory + '/assets/**/' + component + '?(s).*',
|
@@ -6,43 +6,33 @@
|
|
6
6
|
|
7
7
|
This task pulls the latest version of each component from GitHub
|
8
8
|
|
9
|
-
* Creates new repo if doesn't exist (locally & GitHub)
|
10
|
-
* Adds remote it doesn't
|
9
|
+
* Creates new repo if it doesn't exist (locally & GitHub)
|
10
|
+
* Adds remote if it doesn't exist
|
11
11
|
* Pulls latest changes from repo
|
12
12
|
|
13
13
|
*/
|
14
14
|
|
15
15
|
const
|
16
16
|
// node dependencies
|
17
|
-
fs = require('fs'),
|
17
|
+
fs = require('fs-extra'),
|
18
18
|
path = require('path'),
|
19
|
-
del = require('del'),
|
20
19
|
console = require('@fomantic/better-console'),
|
21
|
-
gulp = require('gulp'),
|
22
20
|
git = require('@fomantic/gulp-git'),
|
23
|
-
mkdirp = require('mkdirp'),
|
24
21
|
|
25
22
|
// admin files
|
26
23
|
release = require('../../config/admin/release'),
|
27
|
-
project = require('../../config/project/release'),
|
28
24
|
|
29
25
|
// oAuth configuration for GitHub
|
30
|
-
oAuth = fs.
|
26
|
+
oAuth = fs.pathExistsSync(path.join(__dirname, '/../../config/admin/oauth.js'))
|
31
27
|
? require('../../config/admin/oauth.js') // eslint-disable-line import/extensions
|
32
|
-
: false
|
33
|
-
|
34
|
-
// shorthand
|
35
|
-
version = project.version
|
28
|
+
: false
|
36
29
|
;
|
37
30
|
|
38
31
|
module.exports = function (callback) {
|
39
|
-
const github = require('../../config/admin/github'); // eslint-disable-line global-require
|
40
|
-
|
41
32
|
let
|
42
33
|
index = -1,
|
43
34
|
total = release.components.length,
|
44
35
|
timer,
|
45
|
-
stream,
|
46
36
|
stepRepo
|
47
37
|
;
|
48
38
|
|
@@ -52,7 +42,7 @@ module.exports = function (callback) {
|
|
52
42
|
return;
|
53
43
|
}
|
54
44
|
|
55
|
-
// Do Git commands synchronously per component
|
45
|
+
// Do Git commands synchronously per component to avoid issues
|
56
46
|
stepRepo = function () {
|
57
47
|
index += 1;
|
58
48
|
|
@@ -73,21 +63,18 @@ module.exports = function (callback) {
|
|
73
63
|
resetOptions = { args: '-q --hard', cwd: outputDirectory, quiet: true },
|
74
64
|
|
75
65
|
gitURL = 'git@github.com:' + release.org + '/' + repoName + '.git',
|
76
|
-
|
77
|
-
localRepoSetup = fs.existsSync(path.join(outputDirectory, '.git'))
|
66
|
+
localRepoSetup = fs.pathExistsSync(path.join(outputDirectory, '.git'))
|
78
67
|
;
|
79
68
|
|
80
69
|
console.log('Processing repository: ' + outputDirectory);
|
81
70
|
|
82
|
-
// create folder if doesn't exist
|
83
|
-
|
84
|
-
mkdirp.sync(outputDirectory);
|
85
|
-
}
|
71
|
+
// create folder if it doesn't exist
|
72
|
+
fs.ensureDirSync(outputDirectory);
|
86
73
|
|
87
74
|
// clean folder
|
88
75
|
if (release.outputRoot.startsWith('../repos')) {
|
89
76
|
console.info('Cleaning dir', outputDirectory);
|
90
|
-
|
77
|
+
fs.removeSync(outputDirectory);
|
91
78
|
}
|
92
79
|
|
93
80
|
// set-up local repo
|
@@ -109,17 +96,6 @@ module.exports = function (callback) {
|
|
109
96
|
});
|
110
97
|
}
|
111
98
|
|
112
|
-
function createRepo() {
|
113
|
-
console.info('Creating GitHub repo ' + repoURL);
|
114
|
-
github.repos.createFromOrg({
|
115
|
-
org: release.org,
|
116
|
-
name: repoName,
|
117
|
-
homepage: release.homepage,
|
118
|
-
}, function () {
|
119
|
-
setupRepo();
|
120
|
-
});
|
121
|
-
}
|
122
|
-
|
123
99
|
function addRemote() {
|
124
100
|
console.info('Adding remote origin as ' + gitURL);
|
125
101
|
git.addRemote('origin', gitURL, gitOptions, function () {
|
@@ -129,14 +105,14 @@ module.exports = function (callback) {
|
|
129
105
|
|
130
106
|
function pullFiles() {
|
131
107
|
console.info('Pulling ' + component + ' files');
|
132
|
-
git.pull('origin', 'master', pullOptions, function (
|
108
|
+
git.pull('origin', 'master', pullOptions, function () {
|
133
109
|
resetFiles();
|
134
110
|
});
|
135
111
|
}
|
136
112
|
|
137
113
|
function resetFiles() {
|
138
114
|
console.info('Resetting files to head');
|
139
|
-
git.reset('HEAD', resetOptions, function (
|
115
|
+
git.reset('HEAD', resetOptions, function () {
|
140
116
|
nextRepo();
|
141
117
|
});
|
142
118
|
}
|
@@ -154,7 +130,6 @@ module.exports = function (callback) {
|
|
154
130
|
pullFiles();
|
155
131
|
} else {
|
156
132
|
setupRepo();
|
157
|
-
// createRepo() only use to create remote repo (easier to do manually)
|
158
133
|
}
|
159
134
|
};
|
160
135
|
|
@@ -8,7 +8,7 @@
|
|
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
|
|
@@ -40,7 +40,6 @@ module.exports = function (callback) {
|
|
40
40
|
index = -1,
|
41
41
|
total = release.components.length,
|
42
42
|
timer,
|
43
|
-
stream,
|
44
43
|
stepRepo
|
45
44
|
;
|
46
45
|
|
@@ -50,7 +49,7 @@ module.exports = function (callback) {
|
|
50
49
|
return;
|
51
50
|
}
|
52
51
|
|
53
|
-
// Do Git commands synchronously per component, to avoid issues
|
52
|
+
// Do the Git commands synchronously per component, to avoid issues
|
54
53
|
stepRepo = function () {
|
55
54
|
index += 1;
|
56
55
|
if (index >= total) {
|
@@ -65,9 +64,6 @@ module.exports = function (callback) {
|
|
65
64
|
capitalizedComponent = component.charAt(0).toUpperCase() + component.slice(1),
|
66
65
|
repoName = release.componentRepoRoot + capitalizedComponent,
|
67
66
|
|
68
|
-
gitURL = 'https://github.com/' + release.org + '/' + repoName + '.git',
|
69
|
-
repoURL = 'https://github.com/' + release.org + '/' + repoName + '/',
|
70
|
-
|
71
67
|
commitArgs = oAuth.name !== undefined && oAuth.email !== undefined
|
72
68
|
? '--author "' + oAuth.name + ' <' + oAuth.email + '>"'
|
73
69
|
: '',
|
@@ -114,10 +110,10 @@ module.exports = function (callback) {
|
|
114
110
|
gulp.src('./', gitOptions)
|
115
111
|
.pipe(git.add(gitOptions))
|
116
112
|
.pipe(git.commit(commitMessage, commitOptions), function () {})
|
117
|
-
.on('error', function (
|
113
|
+
.on('error', function () {
|
118
114
|
// canProceed = false; bug in git commit <https://github.com/stevelacy/gulp-git/issues/49>
|
119
115
|
})
|
120
|
-
.on('finish', function (
|
116
|
+
.on('finish', function () {
|
121
117
|
if (canProceed) {
|
122
118
|
pushFiles();
|
123
119
|
} else {
|
@@ -131,7 +127,7 @@ module.exports = function (callback) {
|
|
131
127
|
// push changes to remote
|
132
128
|
function pushFiles() {
|
133
129
|
console.info('Pushing files for ' + component);
|
134
|
-
git.push('origin', 'master', { args: '', cwd: outputDirectory }, function (
|
130
|
+
git.push('origin', 'master', { args: '', cwd: outputDirectory }, function () {
|
135
131
|
console.info('Push completed successfully');
|
136
132
|
getSHA();
|
137
133
|
});
|
@@ -152,10 +148,10 @@ module.exports = function (callback) {
|
|
152
148
|
}
|
153
149
|
github.repos.createRelease(releaseOptions, function () {
|
154
150
|
nextRepo();
|
155
|
-
});
|
151
|
+
}).then();
|
156
152
|
}
|
157
153
|
|
158
|
-
// Steps to next repository
|
154
|
+
// Steps to the next repository
|
159
155
|
function nextRepo() {
|
160
156
|
console.log('Sleeping for 1 second...');
|
161
157
|
// avoid rate throttling
|
@@ -24,18 +24,15 @@ const
|
|
24
24
|
replace = require('gulp-replace'),
|
25
25
|
|
26
26
|
// config
|
27
|
-
config = require('../../config/user'),
|
28
27
|
release = require('../../config/admin/release'),
|
29
28
|
project = require('../../config/project/release'),
|
30
29
|
|
31
30
|
// shorthand
|
32
|
-
version = project.version
|
33
|
-
output = config.paths.output
|
31
|
+
version = project.version
|
34
32
|
;
|
35
33
|
|
36
34
|
module.exports = function (callback) {
|
37
35
|
let
|
38
|
-
stream,
|
39
36
|
index,
|
40
37
|
tasks = []
|
41
38
|
;
|
@@ -51,19 +48,12 @@ module.exports = function (callback) {
|
|
51
48
|
distLowerCase = distribution.toLowerCase(),
|
52
49
|
outputDirectory = path.join(release.outputRoot, distLowerCase),
|
53
50
|
packageFile = path.join(outputDirectory, release.files.npm),
|
54
|
-
repoName = release.distRepoRoot + distribution,
|
55
51
|
regExp = {
|
56
52
|
match: {
|
57
53
|
files: '{files}',
|
58
54
|
version: '{version}',
|
59
55
|
},
|
60
56
|
},
|
61
|
-
task = {
|
62
|
-
all: distribution + ' copying files',
|
63
|
-
repo: distribution + ' create repo',
|
64
|
-
meteor: distribution + ' create meteor package.js',
|
65
|
-
package: distribution + ' create package.json',
|
66
|
-
},
|
67
57
|
gatherFiles,
|
68
58
|
createList
|
69
59
|
;
|
@@ -7,42 +7,32 @@
|
|
7
7
|
This task pulls the latest version of distribution from GitHub
|
8
8
|
|
9
9
|
* Creates new repo if doesn't exist (locally & GitHub)
|
10
|
-
* Adds remote it doesn't
|
10
|
+
* Adds remote it doesn't exist
|
11
11
|
* Pulls latest changes from repo
|
12
12
|
|
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
|
-
del = require('del'),
|
20
19
|
console = require('@fomantic/better-console'),
|
21
|
-
gulp = require('gulp'),
|
22
20
|
git = require('@fomantic/gulp-git'),
|
23
|
-
mkdirp = require('mkdirp'),
|
24
21
|
|
25
22
|
// admin files
|
26
23
|
release = require('../../config/admin/release'),
|
27
|
-
project = require('../../config/project/release'),
|
28
24
|
|
29
25
|
// oAuth configuration for GitHub
|
30
|
-
oAuth = fs.
|
26
|
+
oAuth = fs.pathExistsSync(path.join(__dirname, '/../../config/admin/oauth.js'))
|
31
27
|
? require('../../config/admin/oauth.js') // eslint-disable-line import/extensions
|
32
|
-
: false
|
33
|
-
|
34
|
-
// shorthand
|
35
|
-
version = project.version
|
28
|
+
: false
|
36
29
|
;
|
37
30
|
|
38
31
|
module.exports = function (callback) {
|
39
|
-
const github = require('../../config/admin/github'); // eslint-disable-line global-require
|
40
|
-
|
41
32
|
let
|
42
33
|
index = -1,
|
43
34
|
total = release.distributions.length,
|
44
35
|
timer,
|
45
|
-
stream,
|
46
36
|
stepRepo
|
47
37
|
;
|
48
38
|
|
@@ -72,21 +62,18 @@ module.exports = function (callback) {
|
|
72
62
|
pullOptions = { args: '-q', cwd: outputDirectory, quiet: true },
|
73
63
|
resetOptions = { args: '-q --hard', cwd: outputDirectory, quiet: true },
|
74
64
|
gitURL = 'git@github.com:' + release.org + '/' + repoName + '.git',
|
75
|
-
|
76
|
-
localRepoSetup = fs.existsSync(path.join(outputDirectory, '.git'))
|
65
|
+
localRepoSetup = fs.pathExistsSync(path.join(outputDirectory, '.git'))
|
77
66
|
;
|
78
67
|
|
79
68
|
console.log('Processing repository: ' + outputDirectory);
|
80
69
|
|
81
|
-
// create folder if doesn't exist
|
82
|
-
|
83
|
-
mkdirp.sync(outputDirectory);
|
84
|
-
}
|
70
|
+
// create folder if it doesn't exist
|
71
|
+
fs.ensureDirSync(outputDirectory);
|
85
72
|
|
86
73
|
// clean folder
|
87
74
|
if (release.outputRoot.startsWith('../repos')) {
|
88
75
|
console.info('Cleaning dir', outputDirectory);
|
89
|
-
|
76
|
+
fs.removeSync(outputDirectory);
|
90
77
|
}
|
91
78
|
|
92
79
|
// set-up local repo
|
@@ -108,17 +95,6 @@ module.exports = function (callback) {
|
|
108
95
|
});
|
109
96
|
}
|
110
97
|
|
111
|
-
function createRepo() {
|
112
|
-
console.info('Creating GitHub repo ' + repoURL);
|
113
|
-
github.repos.createFromOrg({
|
114
|
-
org: release.org,
|
115
|
-
name: repoName,
|
116
|
-
homepage: release.homepage,
|
117
|
-
}, function () {
|
118
|
-
setupRepo();
|
119
|
-
});
|
120
|
-
}
|
121
|
-
|
122
98
|
function addRemote() {
|
123
99
|
console.info('Adding remote origin as ' + gitURL);
|
124
100
|
git.addRemote('origin', gitURL, gitOptions, function () {
|
@@ -128,14 +104,14 @@ module.exports = function (callback) {
|
|
128
104
|
|
129
105
|
function pullFiles() {
|
130
106
|
console.info('Pulling ' + component + ' files');
|
131
|
-
git.pull('origin', 'master', pullOptions, function (
|
107
|
+
git.pull('origin', 'master', pullOptions, function () {
|
132
108
|
resetFiles();
|
133
109
|
});
|
134
110
|
}
|
135
111
|
|
136
112
|
function resetFiles() {
|
137
113
|
console.info('Resetting files to head');
|
138
|
-
git.reset('HEAD', resetOptions, function (
|
114
|
+
git.reset('HEAD', resetOptions, function () {
|
139
115
|
nextRepo();
|
140
116
|
});
|
141
117
|
}
|
@@ -153,7 +129,6 @@ module.exports = function (callback) {
|
|
153
129
|
pullFiles();
|
154
130
|
} else {
|
155
131
|
setupRepo();
|
156
|
-
// createRepo() only use to create remote repo (easier to do manually)
|
157
132
|
}
|
158
133
|
};
|
159
134
|
|
@@ -8,7 +8,7 @@
|
|
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
|
|
@@ -40,7 +40,6 @@ module.exports = function (callback) {
|
|
40
40
|
index = -1,
|
41
41
|
total = release.distributions.length,
|
42
42
|
timer,
|
43
|
-
stream,
|
44
43
|
stepRepo
|
45
44
|
;
|
46
45
|
|
@@ -50,7 +49,7 @@ module.exports = function (callback) {
|
|
50
49
|
return;
|
51
50
|
}
|
52
51
|
|
53
|
-
// Do Git commands synchronously per distribution, to avoid issues
|
52
|
+
// Do the Git commands synchronously per distribution, to avoid issues
|
54
53
|
stepRepo = function () {
|
55
54
|
index += 1;
|
56
55
|
if (index >= total) {
|
@@ -110,10 +109,10 @@ module.exports = function (callback) {
|
|
110
109
|
gulp.src('./', gitOptions)
|
111
110
|
.pipe(git.add(gitOptions))
|
112
111
|
.pipe(git.commit(commitMessage, commitOptions), function () {})
|
113
|
-
.on('error', function (
|
112
|
+
.on('error', function () {
|
114
113
|
// canProceed = false; bug in git commit <https://github.com/stevelacy/gulp-git/issues/49>
|
115
114
|
})
|
116
|
-
.on('finish', function (
|
115
|
+
.on('finish', function () {
|
117
116
|
if (canProceed) {
|
118
117
|
pushFiles();
|
119
118
|
} else {
|
@@ -127,7 +126,7 @@ module.exports = function (callback) {
|
|
127
126
|
// push changes to remote
|
128
127
|
function pushFiles() {
|
129
128
|
console.info('Pushing files for ' + distribution);
|
130
|
-
git.push('origin', 'master', { args: '', cwd: outputDirectory }, function (
|
129
|
+
git.push('origin', 'master', { args: '', cwd: outputDirectory }, function () {
|
131
130
|
console.info('Push completed successfully');
|
132
131
|
getSHA();
|
133
132
|
});
|
@@ -148,10 +147,10 @@ module.exports = function (callback) {
|
|
148
147
|
}
|
149
148
|
github.repos.createRelease(releaseOptions, function () {
|
150
149
|
nextRepo();
|
151
|
-
});
|
150
|
+
}).then();
|
152
151
|
}
|
153
152
|
|
154
|
-
// Steps to next repository
|
153
|
+
// Steps to the next repository
|
155
154
|
function nextRepo() {
|
156
155
|
console.log('Sleeping for 1 second...');
|
157
156
|
// 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,8 +4,8 @@
|
|
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
|
@@ -20,14 +20,13 @@ let
|
|
20
20
|
total = repos.length,
|
21
21
|
index = -1,
|
22
22
|
|
23
|
-
stream,
|
24
23
|
stepRepo
|
25
24
|
;
|
26
25
|
|
27
26
|
module.exports = function (callback) {
|
28
27
|
console.log('Registering repos with package managers');
|
29
28
|
|
30
|
-
// Do Git commands synchronously per component, to avoid issues
|
29
|
+
// Do the Git commands synchronously per component, to avoid issues
|
31
30
|
stepRepo = function () {
|
32
31
|
index += 1;
|
33
32
|
if (index >= total) {
|
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/css.js
CHANGED
@@ -45,7 +45,7 @@ const
|
|
45
45
|
;
|
46
46
|
|
47
47
|
/**
|
48
|
-
* Builds the
|
48
|
+
* Builds the CSS
|
49
49
|
* @param src
|
50
50
|
* @param type
|
51
51
|
* @param compress
|
@@ -88,7 +88,7 @@ function build(src, type, compress, config, opts) {
|
|
88
88
|
|
89
89
|
/**
|
90
90
|
* Packages the css files in dist
|
91
|
-
* @param {string} type - type of the
|
91
|
+
* @param {string} type - type of the CSS processing (none, rtl, docs)
|
92
92
|
* @param {boolean} compress - should the output be compressed
|
93
93
|
*/
|
94
94
|
function pack(type, compress) {
|
@@ -273,7 +273,7 @@ module.exports.watch = function (type, config) {
|
|
273
273
|
lessPath = path;
|
274
274
|
}
|
275
275
|
|
276
|
-
// Add file to internal changed files array
|
276
|
+
// Add the file to the internal changed files array
|
277
277
|
if (!files.includes(lessPath)) {
|
278
278
|
files.push(lessPath);
|
279
279
|
}
|
@@ -284,12 +284,12 @@ module.exports.watch = function (type, config) {
|
|
284
284
|
const buildFiles = [...files];
|
285
285
|
// Call method
|
286
286
|
gulp.series((callback) => method(buildFiles, callback))();
|
287
|
-
// Reset internal changed files array
|
287
|
+
// Reset the internal changed files array
|
288
288
|
files = [];
|
289
289
|
}, 1000);
|
290
290
|
})
|
291
291
|
;
|
292
292
|
};
|
293
293
|
|
294
|
-
// Expose build
|
294
|
+
// Expose build CSS method
|
295
295
|
module.exports.buildCSS = buildCSS;
|
@@ -41,7 +41,7 @@ const
|
|
41
41
|
;
|
42
42
|
|
43
43
|
/**
|
44
|
-
* Concat and uglify the
|
44
|
+
* Concat and uglify the JavaScript files
|
45
45
|
* @param {string|array} src - source files
|
46
46
|
* @param type
|
47
47
|
* @param config
|
@@ -65,7 +65,7 @@ function build(src, type, config) {
|
|
65
65
|
}
|
66
66
|
|
67
67
|
/**
|
68
|
-
* Packages the
|
68
|
+
* Packages the JavaScript files in dist
|
69
69
|
* @param {string} type - type of the js processing (none, rtl, docs)
|
70
70
|
* @param {boolean} compress - should the output be compressed
|
71
71
|
*/
|
@@ -151,7 +151,7 @@ module.exports.watch = function (type, config) {
|
|
151
151
|
clearTimeout(timeout);
|
152
152
|
}
|
153
153
|
|
154
|
-
// Add file to internal changed files array
|
154
|
+
// Add the file to the internal changed files array
|
155
155
|
if (!files.includes(path)) {
|
156
156
|
files.push(path);
|
157
157
|
}
|
package/tasks/check-install.js
CHANGED
package/tasks/clean.js
CHANGED
@@ -3,12 +3,12 @@
|
|
3
3
|
*******************************/
|
4
4
|
|
5
5
|
const
|
6
|
-
|
7
|
-
config = require('./config/user')
|
8
|
-
tasks = require('./config/tasks')
|
6
|
+
fs = require('fs-extra'),
|
7
|
+
config = require('./config/user')
|
9
8
|
;
|
10
9
|
|
11
10
|
// cleans distribution files
|
12
|
-
module.exports = function () {
|
13
|
-
|
11
|
+
module.exports = function (callback) {
|
12
|
+
fs.removeSync(config.paths.clean);
|
13
|
+
callback();
|
14
14
|
};
|
@@ -14,8 +14,8 @@ const
|
|
14
14
|
*/
|
15
15
|
module.exports = function (gulp) {
|
16
16
|
gulp.task('serve-docs', serveDocs);
|
17
|
-
gulp.task('serve-docs').description = 'Serve file changes to
|
17
|
+
gulp.task('serve-docs').description = 'Serve file changes to FUI Docs';
|
18
18
|
|
19
19
|
gulp.task('build-docs', buildDocs);
|
20
|
-
gulp.task('build-docs').description = 'Build all files and add to
|
20
|
+
gulp.task('build-docs').description = 'Build all files and add to FUI Docs';
|
21
21
|
};
|