uikit 3.9.3-dev.770c92c8a → 3.9.3-dev.dc54c8709
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/build/util.js +18 -10
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +2 -2
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +2 -2
- package/dist/js/uikit.min.js +2 -2
- package/package.json +3 -1
- package/tests/comment.html +1 -1
package/build/util.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import less from 'less';
|
|
2
2
|
import fs from 'fs-extra';
|
|
3
|
+
import pLimit from 'p-limit';
|
|
3
4
|
import postcss from 'postcss';
|
|
4
5
|
import globImport from 'glob';
|
|
5
6
|
import {optimize} from 'svgo';
|
|
@@ -16,6 +17,8 @@ import {basename, dirname, join} from 'path';
|
|
|
16
17
|
import {exec as execImport} from 'child_process';
|
|
17
18
|
import {rollup, watch as rollupWatch} from 'rollup';
|
|
18
19
|
|
|
20
|
+
const limit = pLimit(Number(process.env.cpus || 2));
|
|
21
|
+
|
|
19
22
|
export const exec = promisify(execImport);
|
|
20
23
|
export const glob = promisify(globImport);
|
|
21
24
|
export const {pathExists, readJson} = fs;
|
|
@@ -58,12 +61,12 @@ export async function logFile(file) {
|
|
|
58
61
|
|
|
59
62
|
export async function minify(file) {
|
|
60
63
|
|
|
61
|
-
const {styles} = await new CleanCSS({
|
|
64
|
+
const {styles} = await limit(() => new CleanCSS({
|
|
62
65
|
advanced: false,
|
|
63
66
|
keepSpecialComments: 0,
|
|
64
67
|
rebase: false,
|
|
65
68
|
returnPromise: true
|
|
66
|
-
}).minify([file]);
|
|
69
|
+
}).minify([file]));
|
|
67
70
|
|
|
68
71
|
await write(`${join(dirname(file), basename(file, '.css'))}.min.css`, styles);
|
|
69
72
|
|
|
@@ -71,8 +74,8 @@ export async function minify(file) {
|
|
|
71
74
|
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
export
|
|
75
|
-
return postcss()
|
|
77
|
+
export function renderLess(data, options) {
|
|
78
|
+
return limit(async () => postcss()
|
|
76
79
|
.use({
|
|
77
80
|
postcssPlugin: 'calc',
|
|
78
81
|
Once(root) {
|
|
@@ -89,7 +92,8 @@ export async function renderLess(data, options) {
|
|
|
89
92
|
}
|
|
90
93
|
})
|
|
91
94
|
.process((await less.render(data, options)).css)
|
|
92
|
-
.css
|
|
95
|
+
.css
|
|
96
|
+
);
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
export async function compile(file, dest, {external, globals, name, aliases, replaces} = {}) {
|
|
@@ -157,7 +161,7 @@ export async function compile(file, dest, {external, globals, name, aliases, rep
|
|
|
157
161
|
const bundle = await rollup(inputOptions);
|
|
158
162
|
|
|
159
163
|
for (const options of output) {
|
|
160
|
-
await bundle.write(options);
|
|
164
|
+
await limit(() => bundle.write(options));
|
|
161
165
|
logFile(options.file);
|
|
162
166
|
}
|
|
163
167
|
|
|
@@ -213,9 +217,13 @@ export async function icons(src) {
|
|
|
213
217
|
};
|
|
214
218
|
|
|
215
219
|
const files = await glob(src, {nosort: true});
|
|
216
|
-
const icons = await Promise.all(
|
|
217
|
-
(
|
|
218
|
-
|
|
220
|
+
const icons = await Promise.all(
|
|
221
|
+
files.map(file =>
|
|
222
|
+
limit(async () =>
|
|
223
|
+
(await optimize(await read(file), options)).data
|
|
224
|
+
)
|
|
225
|
+
)
|
|
226
|
+
);
|
|
219
227
|
|
|
220
228
|
return JSON.stringify(files.reduce((result, file, i) => {
|
|
221
229
|
result[basename(file, '.svg')] = icons[i];
|
|
@@ -225,7 +233,7 @@ export async function icons(src) {
|
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
export async function run(cmd, options) {
|
|
228
|
-
const {stdout, stderr} = await exec(cmd, options);
|
|
236
|
+
const {stdout, stderr} = await limit(() => exec(cmd, options));
|
|
229
237
|
|
|
230
238
|
stdout && console.log(stdout.trim());
|
|
231
239
|
stderr && console.log(stderr.trim());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.9.3-dev.
|
|
1
|
+
/*! UIkit 3.9.3-dev.dc54c8709 | https://www.getuikit.com | (c) 2014 - 2021 YOOtheme | MIT License */
|
|
2
2
|
/* ========================================================================
|
|
3
3
|
Component: Base
|
|
4
4
|
========================================================================== */
|