@loftyshaky/shared 1.4.0 → 1.6.0
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/LICENSE.md +21 -0
- package/_locales/de/messages.json +1 -1
- package/_locales/en/messages.json +100 -1
- package/_locales/ru/messages.json +47 -2
- package/announcement.d.ts +2 -2
- package/announcement.js +5 -1
- package/app.d.ts +1 -5
- package/app.js +5 -1
- package/chunk-main.js +22 -0
- package/chunk-main2.js +5 -0
- package/chunk-main3.js +5 -0
- package/chunk-main4.js +5 -0
- package/chunk-pickr.min.js +5 -0
- package/dependencies.d.ts +2 -0
- package/dependencies.js +5 -0
- package/dependencies.txt +863 -0
- package/ext.d.ts +1 -5
- package/ext.js +5 -1
- package/fonts/NotoSans-Regular.ttf +0 -0
- package/globals.d.ts +49 -0
- package/html/dependencies.html +13 -0
- package/index.d.ts +3 -3
- package/index.js +5 -1
- package/inputs.d.ts +2 -2
- package/inputs.js +5 -1
- package/js/apps.js +63 -63
- package/js/dependencies.js +56 -0
- package/js/locales.js +11 -5
- package/js/package/plugins/rollup-plugin-copy.js +169 -169
- package/js/package/plugins/watcher.js +56 -56
- package/js/package/terser.js +18 -18
- package/js/task_scheduler.js +39 -39
- package/js/tsc_alias.js +19 -0
- package/js/webpack.config.js +30 -3
- package/package.json +2 -2
- package/scss/dependencies/body.scss +3 -0
- package/scss/dependencies/hr.scss +3 -0
- package/scss/dependencies/index.scss +5 -0
- package/scss/dependencies/links.scss +3 -0
- package/scss/dependencies/main.scss +3 -0
- package/scss/settings/sections.scss +22 -0
- package/scss/settings/transitions.scss +2 -3
- package/scss/shared/checkboxes.scss +2 -2
- package/scss/shared/close_btn.scss +1 -1
- package/scss/shared/embed/error.scss +2 -2
- package/scss/shared/embed/font_face.scss +1 -2
- package/scss/shared/index.scss +1 -0
- package/scss/shared/inputs.scss +5 -1
- package/scss/shared/inset_border.scss +1 -4
- package/scss/shared/links.scss +4 -0
- package/scss/shared/mixins.scss +11 -7
- package/scss/shared/mods.scss +1 -3
- package/scss/shared/offers.scss +37 -0
- package/scss/shared/selects.scss +8 -2
- package/scss/shared/themes/colors/aqua.scss +15 -6
- package/scss/shared/themes/colors/dark.scss +5 -1
- package/scss/shared/themes/colors/lavender.scss +19 -6
- package/scss/shared/themes/colors/light.scss +5 -1
- package/scss/shared/themes/colors/very_dark.scss +5 -1
- package/scss/shared/themes/general/template.scss +26 -12
- package/scss/shared/themes/general/template_focus.scss +6 -4
- package/scss/shared/transitions.scss +5 -2
- package/scss/shared/upload_box.scss +2 -3
- package/scss/shared/vars.scss +10 -3
- package/settings.d.ts +2 -2
- package/settings.js +5 -1
- package/ts/announcement/components/body.d.ts +2 -3
- package/ts/announcement/components/index.d.ts +1 -1
- package/ts/announcement/internal.d.ts +2 -3
- package/ts/announcement/scripts/display.d.ts +6 -6
- package/ts/announcement/scripts/index.d.ts +1 -2
- package/ts/dependencies/components/body.d.ts +2 -0
- package/ts/dependencies/components/index.d.ts +1 -0
- package/ts/dependencies/internal.d.ts +2 -0
- package/ts/dependencies/scripts/dependencies.d.ts +7 -0
- package/ts/dependencies/scripts/index.d.ts +1 -0
- package/ts/error_modules/crash_handler/components/body.d.ts +52 -52
- package/ts/error_modules/crash_handler/components/index.d.ts +1 -1
- package/ts/error_modules/crash_handler/components/prop_types/body.d.ts +4 -4
- package/ts/error_modules/crash_handler/components/prop_types/index.d.ts +1 -1
- package/ts/error_modules/crash_handler/data/index.d.ts +1 -1
- package/ts/error_modules/crash_handler/data/visibility.d.ts +7 -7
- package/ts/error_modules/crash_handler/scripts/index.d.ts +1 -1
- package/ts/error_modules/crash_handler/scripts/page.d.ts +6 -6
- package/ts/error_modules/css/scripts/index.d.ts +1 -1
- package/ts/error_modules/css/scripts/main.d.ts +8 -8
- package/ts/error_modules/error/components/body.d.ts +3 -3
- package/ts/error_modules/error/components/close_btn.d.ts +2 -2
- package/ts/error_modules/error/components/ext_name.d.ts +2 -2
- package/ts/error_modules/error/components/index.d.ts +6 -6
- package/ts/error_modules/error/components/keep_visible_msg.d.ts +2 -2
- package/ts/error_modules/error/components/msg.d.ts +2 -2
- package/ts/error_modules/error/components/progress.d.ts +2 -2
- package/ts/error_modules/error/components/prop_types/body.d.ts +5 -5
- package/ts/error_modules/error/components/prop_types/index.d.ts +1 -1
- package/ts/error_modules/error/data/index.d.ts +4 -4
- package/ts/error_modules/error/data/main.d.ts +11 -11
- package/ts/error_modules/error/data/msg.d.ts +13 -13
- package/ts/error_modules/error/data/progress.d.ts +17 -17
- package/ts/error_modules/error/data/state.d.ts +25 -25
- package/ts/error_modules/error/interfaces/error.d.ts +6 -6
- package/ts/error_modules/error/interfaces/error_obj.d.ts +6 -6
- package/ts/error_modules/error/interfaces/index.d.ts +7 -7
- package/ts/error_modules/error/interfaces/notification_type.d.ts +1 -1
- package/ts/error_modules/error/interfaces/observable_keys.d.ts +1 -1
- package/ts/error_modules/error/interfaces/show_error.d.ts +11 -11
- package/ts/error_modules/error/interfaces/show_unable_to_access_settings_error.d.ts +5 -5
- package/ts/error_modules/error/interfaces/timeout_observable_keys.d.ts +1 -1
- package/ts/error_modules/error/scripts/flash.d.ts +11 -11
- package/ts/error_modules/error/scripts/globals.d.ts +1 -12
- package/ts/error_modules/error/scripts/index.d.ts +3 -3
- package/ts/error_modules/error/scripts/notification.d.ts +8 -8
- package/ts/error_modules/init.d.ts +1 -1
- package/ts/error_modules/internal.d.ts +11 -11
- package/ts/inputs/color/components/body.d.ts +3 -3
- package/ts/inputs/color/components/color_picker.d.ts +3 -3
- package/ts/inputs/color/components/fill_shadow.d.ts +3 -3
- package/ts/inputs/color/components/index.d.ts +4 -4
- package/ts/inputs/color/components/prop_types/body.d.ts +4 -4
- package/ts/inputs/color/components/prop_types/color_picker.d.ts +7 -7
- package/ts/inputs/color/components/prop_types/fill_shadow.d.ts +5 -5
- package/ts/inputs/color/components/prop_types/index.d.ts +4 -4
- package/ts/inputs/color/components/prop_types/visualization.d.ts +6 -6
- package/ts/inputs/color/components/visualization.d.ts +3 -3
- package/ts/inputs/color/data/color.d.ts +54 -54
- package/ts/inputs/color/data/index.d.ts +2 -2
- package/ts/inputs/color/data/visibility.d.ts +38 -38
- package/ts/inputs/color/interfaces/color.d.ts +1 -1
- package/ts/inputs/color/interfaces/color_picker_state.d.ts +6 -6
- package/ts/inputs/color/interfaces/color_picker_state_one.d.ts +5 -5
- package/ts/inputs/color/interfaces/i.d.ts +1 -1
- package/ts/inputs/color/interfaces/index.d.ts +4 -4
- package/ts/inputs/color/obj/color.d.ts +54 -54
- package/ts/inputs/color/obj/index.d.ts +1 -1
- package/ts/inputs/color/scripts/color_picker.d.ts +20 -20
- package/ts/inputs/color/scripts/index.d.ts +2 -2
- package/ts/inputs/color/scripts/position.d.ts +7 -7
- package/ts/inputs/components/btn.d.ts +3 -3
- package/ts/inputs/components/checkbox.d.ts +3 -3
- package/ts/inputs/components/file.d.ts +3 -3
- package/ts/inputs/components/form.d.ts +3 -3
- package/ts/inputs/components/group.d.ts +3 -3
- package/ts/inputs/components/help.d.ts +3 -3
- package/ts/inputs/components/help_btn.d.ts +3 -3
- package/ts/inputs/components/hr.d.ts +3 -3
- package/ts/inputs/components/icon_btn.d.ts +3 -3
- package/ts/inputs/components/index.d.ts +25 -25
- package/ts/inputs/components/input_error.d.ts +3 -3
- package/ts/inputs/components/input_item.d.ts +3 -3
- package/ts/inputs/components/label.d.ts +3 -3
- package/ts/inputs/components/label_in_input_item.d.ts +3 -3
- package/ts/inputs/components/link.d.ts +3 -3
- package/ts/inputs/components/link_btn.d.ts +3 -3
- package/ts/inputs/components/link_icon_btn.d.ts +3 -3
- package/ts/inputs/components/prop_types/btn.d.ts +4 -4
- package/ts/inputs/components/prop_types/checkbox.d.ts +4 -4
- package/ts/inputs/components/prop_types/file.d.ts +4 -4
- package/ts/inputs/components/prop_types/form.d.ts +5 -5
- package/ts/inputs/components/prop_types/group.d.ts +5 -5
- package/ts/inputs/components/prop_types/help.d.ts +4 -4
- package/ts/inputs/components/prop_types/help_btn.d.ts +4 -4
- package/ts/inputs/components/prop_types/hr.d.ts +4 -4
- package/ts/inputs/components/prop_types/icon_btn.d.ts +4 -4
- package/ts/inputs/components/prop_types/index.d.ts +25 -25
- package/ts/inputs/components/prop_types/input_error.d.ts +4 -4
- package/ts/inputs/components/prop_types/input_item.d.ts +7 -7
- package/ts/inputs/components/prop_types/label.d.ts +4 -4
- package/ts/inputs/components/prop_types/label_in_input_item.d.ts +4 -4
- package/ts/inputs/components/prop_types/link.d.ts +4 -4
- package/ts/inputs/components/prop_types/link_btn.d.ts +4 -4
- package/ts/inputs/components/prop_types/link_icon_btn.d.ts +5 -5
- package/ts/inputs/components/prop_types/range.d.ts +6 -6
- package/ts/inputs/components/prop_types/section.d.ts +4 -4
- package/ts/inputs/components/prop_types/section_btn.d.ts +7 -6
- package/ts/inputs/components/prop_types/section_content.d.ts +5 -5
- package/ts/inputs/components/prop_types/select.d.ts +6 -6
- package/ts/inputs/components/prop_types/text.d.ts +6 -6
- package/ts/inputs/components/prop_types/text_btn.d.ts +8 -8
- package/ts/inputs/components/prop_types/textarea.d.ts +6 -6
- package/ts/inputs/components/prop_types/upload_box.d.ts +5 -5
- package/ts/inputs/components/range.d.ts +3 -3
- package/ts/inputs/components/section.d.ts +3 -3
- package/ts/inputs/components/section_btn.d.ts +3 -3
- package/ts/inputs/components/section_content.d.ts +3 -3
- package/ts/inputs/components/select.d.ts +3 -3
- package/ts/inputs/components/text.d.ts +3 -3
- package/ts/inputs/components/text_btn.d.ts +3 -3
- package/ts/inputs/components/textarea.d.ts +3 -3
- package/ts/inputs/components/upload_box.d.ts +3 -3
- package/ts/inputs/data/help.d.ts +15 -15
- package/ts/inputs/data/index.d.ts +8 -8
- package/ts/inputs/data/input_error.d.ts +12 -12
- package/ts/inputs/data/input_width.d.ts +26 -26
- package/ts/inputs/data/labelIn_in_putI_iem.d.ts +9 -9
- package/ts/inputs/data/nested_input.d.ts +18 -18
- package/ts/inputs/data/text.d.ts +21 -21
- package/ts/inputs/data/upload_box.d.ts +24 -24
- package/ts/inputs/data/val.d.ts +41 -41
- package/ts/inputs/interfaces/btn_option.d.ts +9 -9
- package/ts/inputs/interfaces/icon_btns.d.ts +2 -2
- package/ts/inputs/interfaces/index.d.ts +9 -9
- package/ts/inputs/interfaces/input.d.ts +2 -2
- package/ts/inputs/interfaces/inputs.d.ts +2 -2
- package/ts/inputs/interfaces/links.d.ts +2 -2
- package/ts/inputs/interfaces/options.d.ts +2 -2
- package/ts/inputs/interfaces/sections.d.ts +2 -2
- package/ts/inputs/interfaces/state_cond.d.ts +4 -4
- package/ts/inputs/interfaces/text_btn.d.ts +7 -7
- package/ts/inputs/internal.d.ts +12 -12
- package/ts/inputs/obj/btn.d.ts +6 -6
- package/ts/inputs/obj/checkbox.d.ts +5 -5
- package/ts/inputs/obj/file.d.ts +9 -9
- package/ts/inputs/obj/form.d.ts +7 -7
- package/ts/inputs/obj/group.d.ts +6 -6
- package/ts/inputs/obj/hr.d.ts +5 -5
- package/ts/inputs/obj/icon_btn.d.ts +7 -7
- package/ts/inputs/obj/index.d.ts +18 -18
- package/ts/inputs/obj/input_base.d.ts +45 -44
- package/ts/inputs/obj/label.d.ts +5 -5
- package/ts/inputs/obj/link.d.ts +17 -16
- package/ts/inputs/obj/link_btn.d.ts +6 -6
- package/ts/inputs/obj/option.d.ts +6 -6
- package/ts/inputs/obj/range.d.ts +20 -20
- package/ts/inputs/obj/section.d.ts +31 -28
- package/ts/inputs/obj/select.d.ts +9 -9
- package/ts/inputs/obj/text.d.ts +18 -18
- package/ts/inputs/obj/textarea.d.ts +5 -5
- package/ts/inputs/obj/upload_box.d.ts +18 -18
- package/ts/inputs/scripts/index.d.ts +2 -2
- package/ts/inputs/scripts/resolve.d.ts +7 -7
- package/ts/inputs/scripts/upload_box.d.ts +8 -8
- package/ts/settings/components/body.d.ts +3 -3
- package/ts/settings/components/index.d.ts +1 -1
- package/ts/settings/components/prop_types/body.d.ts +8 -7
- package/ts/settings/components/prop_types/index.d.ts +1 -1
- package/ts/settings/data/back_up.d.ts +17 -17
- package/ts/settings/data/index.d.ts +2 -2
- package/ts/settings/data/sections.d.ts +43 -43
- package/ts/settings/developer_mode/data/index.d.ts +1 -0
- package/ts/settings/developer_mode/data/main.d.ts +13 -0
- package/ts/settings/init.d.ts +1 -1
- package/ts/settings/internal.d.ts +8 -7
- package/ts/settings/optional_permissions/data/index.d.ts +1 -1
- package/ts/settings/optional_permissions/data/main.d.ts +11 -11
- package/ts/settings/optional_permissions/interfaces/index.d.ts +1 -1
- package/ts/settings/optional_permissions/interfaces/optional_permission_checkbox_dict.d.ts +3 -3
- package/ts/settings/scripts/index.d.ts +1 -1
- package/ts/settings/scripts/theme.d.ts +12 -12
- package/ts/shared/app.d.ts +25 -25
- package/ts/shared/app_ext_globals.d.ts +1 -6
- package/ts/shared/app_version/components/body.d.ts +2 -2
- package/ts/shared/app_version/components/index.d.ts +1 -1
- package/ts/shared/css_vars/scripts/index.d.ts +1 -1
- package/ts/shared/css_vars/scripts/main.d.ts +18 -18
- package/ts/shared/data/data/index.d.ts +1 -1
- package/ts/shared/data/data/main.d.ts +1 -4
- package/ts/shared/data/interfaces/index.d.ts +1 -1
- package/ts/shared/data/interfaces/val.d.ts +2 -2
- package/ts/shared/ext.d.ts +28 -27
- package/ts/shared/functions.d.ts +3 -3
- package/ts/shared/globals.d.ts +1 -4
- package/ts/shared/header/scripts/index.d.ts +1 -0
- package/ts/{announcement/scripts/header.d.ts → shared/header/scripts/main.d.ts} +6 -6
- package/ts/shared/init.d.ts +1 -1
- package/ts/shared/internal.d.ts +40 -32
- package/ts/shared/loading_screen/components/body.d.ts +3 -3
- package/ts/shared/loading_screen/components/index.d.ts +1 -1
- package/ts/shared/loading_screen/components/prop_types/body.d.ts +5 -5
- package/ts/shared/loading_screen/components/prop_types/index.d.ts +1 -1
- package/ts/shared/loading_screen/data/index.d.ts +1 -1
- package/ts/shared/loading_screen/data/main.d.ts +12 -12
- package/ts/shared/loading_screen/scripts/index.d.ts +2 -2
- package/ts/shared/loading_screen/scripts/roots.d.ts +11 -11
- package/ts/shared/loading_screen/scripts/tr.d.ts +8 -8
- package/ts/shared/no_tr/scripts/index.d.ts +1 -1
- package/ts/shared/no_tr/scripts/main.d.ts +12 -12
- package/ts/shared/offers/components/body.d.ts +3 -0
- package/ts/shared/offers/components/counter.d.ts +2 -0
- package/ts/shared/offers/components/index.d.ts +6 -0
- package/ts/shared/offers/components/next_offer_btn.d.ts +2 -0
- package/ts/shared/offers/components/offer.d.ts +3 -0
- package/ts/shared/offers/components/previous_offer_btn.d.ts +2 -0
- package/ts/shared/offers/components/prop_types/body.d.ts +5 -0
- package/ts/shared/offers/components/prop_types/index.d.ts +2 -0
- package/ts/shared/offers/components/prop_types/offer.d.ts +4 -0
- package/ts/shared/offers/components/top_bar.d.ts +2 -0
- package/ts/shared/offers/data/index.d.ts +1 -0
- package/ts/shared/offers/data/main.d.ts +22 -0
- package/ts/shared/offers/interfaces/index.d.ts +1 -0
- package/ts/shared/offers/interfaces/offer_banner_type.d.ts +1 -0
- package/ts/shared/offers/obj/index.d.ts +1 -0
- package/ts/shared/offers/obj/offer.d.ts +12 -0
- package/ts/shared/offers/scripts/index.d.ts +1 -0
- package/ts/shared/offers/scripts/main.d.ts +8 -0
- package/ts/shared/schema/data/index.d.ts +1 -1
- package/ts/shared/schema/data/main.d.ts +12 -12
- package/ts/shared/schema/obj/index.d.ts +1 -1
- package/ts/shared/schema/obj/transform_item.d.ts +7 -7
- package/ts/shared/service_worker/scripts/index.d.ts +1 -0
- package/ts/shared/service_worker/scripts/main.d.ts +9 -0
- package/ts/shared/settings/data/index.d.ts +1 -1
- package/ts/shared/settings/data/main.d.ts +15 -15
- package/ts/shared/svg.d.ts +9 -7
- package/ts/shared/t.d.ts +36 -36
- package/ts/shared/tab_index/interfaces/index.d.ts +1 -1
- package/ts/shared/tab_index/interfaces/set_Input_type_event.d.ts +2 -2
- package/ts/shared/tab_index/scripts/index.d.ts +1 -1
- package/ts/shared/tab_index/scripts/main.d.ts +18 -18
- package/ts/shared/theme/scripts/index.d.ts +1 -1
- package/ts/shared/theme/scripts/main.d.ts +11 -11
- package/ts/shared/title/scripts/index.d.ts +1 -1
- package/ts/shared/title/scripts/main.d.ts +6 -6
- package/ts/shared/tr/components/base_tr.d.ts +9 -9
- package/ts/shared/tr/components/index.d.ts +1 -1
- package/ts/shared/tr/components/prop_types/base_tr.d.ts +13 -13
- package/ts/shared/tr/components/prop_types/index.d.ts +1 -1
- package/ts/shared/tr/data/index.d.ts +1 -1
- package/ts/shared/tr/data/transition.d.ts +23 -23
- package/ts/shared/tr/interfaces/index.d.ts +1 -1
- package/ts/shared/tr/interfaces/transitions.d.ts +2 -2
- package/ts/shared/tr/obj/index.d.ts +1 -1
- package/ts/shared/tr/obj/transition.d.ts +8 -8
- package/ts/shared/utils/scripts/index.d.ts +1 -1
- package/ts/shared/utils/scripts/main.d.ts +11 -11
- package/ts/shared/vars.d.ts +2 -2
- package/ts/shared/viewport/scripts/index.d.ts +1 -1
- package/ts/shared/viewport/scripts/main.d.ts +8 -8
- package/ts/shared/x.d.ts +56 -67
- package/chunk-main-87eebf46.js +0 -1
- package/chunk-main-ddb4af78.js +0 -1
- package/chunk-main-dffc29ad.js +0 -9
- package/chunk-pickr.min-4c2d2755.js +0 -1
- package/fonts/noto_sans.woff2 +0 -0
- package/ts/announcement/components/prop_types/body.d.ts +0 -4
- package/ts/announcement/components/prop_types/index.d.ts +0 -1
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const util = require('util');
|
|
3
|
-
const fs = require('fs-extra');
|
|
4
|
-
const isObject = require('is-plain-object');
|
|
5
|
-
const globby = require('globby');
|
|
6
|
-
const { bold, green, yellow } = require('colorette');
|
|
7
|
-
|
|
8
|
-
function stringify(value) {
|
|
9
|
-
return util.inspect(value, { breakLength: Infinity });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async function isFile(filePath) {
|
|
13
|
-
const fileStats = await fs.stat(filePath);
|
|
14
|
-
|
|
15
|
-
return fileStats.isFile();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function renameTarget(target, rename) {
|
|
19
|
-
const parsedPath = path.parse(target);
|
|
20
|
-
|
|
21
|
-
return typeof rename === 'string'
|
|
22
|
-
? rename
|
|
23
|
-
: rename(parsedPath.name, parsedPath.ext.replace('.', ''));
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async function generateCopyTarget(src, dest, { flatten, rename, transform }) {
|
|
27
|
-
if (transform && !(await isFile(src))) {
|
|
28
|
-
throw new Error(`"transform" option works only on files: '${src}' must be a file`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const { base, dir } = path.parse(src);
|
|
32
|
-
const destinationFolder =
|
|
33
|
-
flatten || (!flatten && !dir) ? dest : dir.replace(dir.split('/')[0], dest);
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
src,
|
|
37
|
-
dest: path.join(destinationFolder, rename ? renameTarget(base, rename) : base),
|
|
38
|
-
...(transform && { contents: await transform(await fs.readFile(src)) }),
|
|
39
|
-
renamed: rename,
|
|
40
|
-
transformed: transform,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
module.exports = function copy(options = {}) {
|
|
45
|
-
const {
|
|
46
|
-
copyOnce = false,
|
|
47
|
-
flatten = true,
|
|
48
|
-
hook = 'buildEnd',
|
|
49
|
-
targets = [],
|
|
50
|
-
verbose = false,
|
|
51
|
-
callback_start,
|
|
52
|
-
callback_end,
|
|
53
|
-
...restPluginOptions
|
|
54
|
-
} = options;
|
|
55
|
-
|
|
56
|
-
let copied = false;
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
name: 'copy',
|
|
60
|
-
[hook]: async () => {
|
|
61
|
-
if (callback_start != null) {
|
|
62
|
-
await callback_start();
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (copyOnce && copied) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const copyTargets = [];
|
|
70
|
-
|
|
71
|
-
if (Array.isArray(targets) && targets.length) {
|
|
72
|
-
for (const target of targets) {
|
|
73
|
-
if (!isObject(target)) {
|
|
74
|
-
throw new Error(`${stringify(target)} target must be an object`);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const { dest, rename, src, transform, ...restTargetOptions } = target;
|
|
78
|
-
|
|
79
|
-
if (!src || !dest) {
|
|
80
|
-
throw new Error(
|
|
81
|
-
`${stringify(target)} target must have "src" and "dest" properties`,
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (rename && typeof rename !== 'string' && typeof rename !== 'function') {
|
|
86
|
-
throw new Error(
|
|
87
|
-
`${stringify(
|
|
88
|
-
target,
|
|
89
|
-
)} target's "rename" property must be a string or a function`,
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const matchedPaths = await globby(src, {
|
|
94
|
-
expandDirectories: false,
|
|
95
|
-
onlyFiles: false,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
if (matchedPaths.length) {
|
|
99
|
-
for (const matchedPath of matchedPaths) {
|
|
100
|
-
const generatedCopyTargets = Array.isArray(dest)
|
|
101
|
-
? await Promise.all(
|
|
102
|
-
dest.map((destination) =>
|
|
103
|
-
generateCopyTarget(matchedPath, destination, {
|
|
104
|
-
flatten,
|
|
105
|
-
rename,
|
|
106
|
-
transform,
|
|
107
|
-
}),
|
|
108
|
-
),
|
|
109
|
-
)
|
|
110
|
-
: [
|
|
111
|
-
await generateCopyTarget(matchedPath, dest, {
|
|
112
|
-
flatten,
|
|
113
|
-
rename,
|
|
114
|
-
transform,
|
|
115
|
-
}),
|
|
116
|
-
];
|
|
117
|
-
|
|
118
|
-
copyTargets.push(...generatedCopyTargets);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
if (copyTargets.length) {
|
|
125
|
-
setTimeout(async () => {
|
|
126
|
-
if (verbose) {
|
|
127
|
-
console.log(green('copied:'));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
for (const copyTarget of copyTargets) {
|
|
131
|
-
const { contents, dest, src, transformed } = copyTarget;
|
|
132
|
-
|
|
133
|
-
if (transformed) {
|
|
134
|
-
await fs.outputFile(dest, contents, restPluginOptions);
|
|
135
|
-
} else {
|
|
136
|
-
try {
|
|
137
|
-
await fs.copy(src, dest, restPluginOptions);
|
|
138
|
-
} catch (error_obj)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (verbose) {
|
|
142
|
-
let message = green(` ${bold(src)} → ${bold(dest)}`);
|
|
143
|
-
const flags = Object.entries(copyTarget)
|
|
144
|
-
.filter(
|
|
145
|
-
([key, value]) =>
|
|
146
|
-
['renamed', 'transformed'].includes(key) && value,
|
|
147
|
-
)
|
|
148
|
-
.map(([key]) => key.charAt(0).toUpperCase());
|
|
149
|
-
|
|
150
|
-
if (flags.length) {
|
|
151
|
-
message = `${message} ${yellow(`[${flags.join(', ')}]`)}`;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
console.log(message);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (callback_end != null) {
|
|
159
|
-
callback_end();
|
|
160
|
-
}
|
|
161
|
-
}, 0);
|
|
162
|
-
} else if (verbose) {
|
|
163
|
-
console.log(yellow('no items to copy'));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
copied = true;
|
|
167
|
-
},
|
|
168
|
-
};
|
|
169
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const util = require('util');
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const isObject = require('is-plain-object');
|
|
5
|
+
const globby = require('globby');
|
|
6
|
+
const { bold, green, yellow } = require('colorette');
|
|
7
|
+
|
|
8
|
+
function stringify(value) {
|
|
9
|
+
return util.inspect(value, { breakLength: Infinity });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async function isFile(filePath) {
|
|
13
|
+
const fileStats = await fs.stat(filePath);
|
|
14
|
+
|
|
15
|
+
return fileStats.isFile();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function renameTarget(target, rename) {
|
|
19
|
+
const parsedPath = path.parse(target);
|
|
20
|
+
|
|
21
|
+
return typeof rename === 'string'
|
|
22
|
+
? rename
|
|
23
|
+
: rename(parsedPath.name, parsedPath.ext.replace('.', ''));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function generateCopyTarget(src, dest, { flatten, rename, transform }) {
|
|
27
|
+
if (transform && !(await isFile(src))) {
|
|
28
|
+
throw new Error(`"transform" option works only on files: '${src}' must be a file`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const { base, dir } = path.parse(src);
|
|
32
|
+
const destinationFolder =
|
|
33
|
+
flatten || (!flatten && !dir) ? dest : dir.replace(dir.split('/')[0], dest);
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
src,
|
|
37
|
+
dest: path.join(destinationFolder, rename ? renameTarget(base, rename) : base),
|
|
38
|
+
...(transform && { contents: await transform(await fs.readFile(src)) }),
|
|
39
|
+
renamed: rename,
|
|
40
|
+
transformed: transform,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module.exports = function copy(options = {}) {
|
|
45
|
+
const {
|
|
46
|
+
copyOnce = false,
|
|
47
|
+
flatten = true,
|
|
48
|
+
hook = 'buildEnd',
|
|
49
|
+
targets = [],
|
|
50
|
+
verbose = false,
|
|
51
|
+
callback_start,
|
|
52
|
+
callback_end,
|
|
53
|
+
...restPluginOptions
|
|
54
|
+
} = options;
|
|
55
|
+
|
|
56
|
+
let copied = false;
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
name: 'copy',
|
|
60
|
+
[hook]: async () => {
|
|
61
|
+
if (callback_start != null) {
|
|
62
|
+
await callback_start();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (copyOnce && copied) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const copyTargets = [];
|
|
70
|
+
|
|
71
|
+
if (Array.isArray(targets) && targets.length) {
|
|
72
|
+
for (const target of targets) {
|
|
73
|
+
if (!isObject(target)) {
|
|
74
|
+
throw new Error(`${stringify(target)} target must be an object`);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const { dest, rename, src, transform, ...restTargetOptions } = target;
|
|
78
|
+
|
|
79
|
+
if (!src || !dest) {
|
|
80
|
+
throw new Error(
|
|
81
|
+
`${stringify(target)} target must have "src" and "dest" properties`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (rename && typeof rename !== 'string' && typeof rename !== 'function') {
|
|
86
|
+
throw new Error(
|
|
87
|
+
`${stringify(
|
|
88
|
+
target,
|
|
89
|
+
)} target's "rename" property must be a string or a function`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const matchedPaths = await globby(src, {
|
|
94
|
+
expandDirectories: false,
|
|
95
|
+
onlyFiles: false,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
if (matchedPaths.length) {
|
|
99
|
+
for (const matchedPath of matchedPaths) {
|
|
100
|
+
const generatedCopyTargets = Array.isArray(dest)
|
|
101
|
+
? await Promise.all(
|
|
102
|
+
dest.map((destination) =>
|
|
103
|
+
generateCopyTarget(matchedPath, destination, {
|
|
104
|
+
flatten,
|
|
105
|
+
rename,
|
|
106
|
+
transform,
|
|
107
|
+
}),
|
|
108
|
+
),
|
|
109
|
+
)
|
|
110
|
+
: [
|
|
111
|
+
await generateCopyTarget(matchedPath, dest, {
|
|
112
|
+
flatten,
|
|
113
|
+
rename,
|
|
114
|
+
transform,
|
|
115
|
+
}),
|
|
116
|
+
];
|
|
117
|
+
|
|
118
|
+
copyTargets.push(...generatedCopyTargets);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (copyTargets.length) {
|
|
125
|
+
setTimeout(async () => {
|
|
126
|
+
if (verbose) {
|
|
127
|
+
console.log(green('copied:'));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
for (const copyTarget of copyTargets) {
|
|
131
|
+
const { contents, dest, src, transformed } = copyTarget;
|
|
132
|
+
|
|
133
|
+
if (transformed) {
|
|
134
|
+
await fs.outputFile(dest, contents, restPluginOptions);
|
|
135
|
+
} else {
|
|
136
|
+
try {
|
|
137
|
+
await fs.copy(src, dest, restPluginOptions);
|
|
138
|
+
} catch (error_obj) {}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (verbose) {
|
|
142
|
+
let message = green(` ${bold(src)} → ${bold(dest)}`);
|
|
143
|
+
const flags = Object.entries(copyTarget)
|
|
144
|
+
.filter(
|
|
145
|
+
([key, value]) =>
|
|
146
|
+
['renamed', 'transformed'].includes(key) && value,
|
|
147
|
+
)
|
|
148
|
+
.map(([key]) => key.charAt(0).toUpperCase());
|
|
149
|
+
|
|
150
|
+
if (flags.length) {
|
|
151
|
+
message = `${message} ${yellow(`[${flags.join(', ')}]`)}`;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
console.log(message);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (callback_end != null) {
|
|
159
|
+
callback_end();
|
|
160
|
+
}
|
|
161
|
+
}, 0);
|
|
162
|
+
} else if (verbose) {
|
|
163
|
+
console.log(yellow('no items to copy'));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
copied = true;
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
|
|
3
|
-
const appRoot = require('app-root-path');
|
|
4
|
-
const recursiveReaddir = require('recursive-readdir');
|
|
5
|
-
const _ = require('lodash');
|
|
6
|
-
|
|
7
|
-
const { TaskScheduler } = require('../../task_scheduler');
|
|
8
|
-
|
|
9
|
-
const task_scheduler = new TaskScheduler();
|
|
10
|
-
|
|
11
|
-
const app_root = appRoot.path;
|
|
12
|
-
|
|
13
|
-
let initial_run_completed = false;
|
|
14
|
-
|
|
15
|
-
const generate_watch_files = async () => {
|
|
16
|
-
let watch_files = [];
|
|
17
|
-
|
|
18
|
-
const src_dir = path.join(app_root, 'src');
|
|
19
|
-
|
|
20
|
-
const dirs = [
|
|
21
|
-
path.join(app_root, 'js'),
|
|
22
|
-
path.join(src_dir, '_locales'),
|
|
23
|
-
path.join(src_dir, 'scss'),
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
await Promise.all(
|
|
27
|
-
dirs.map(async (dir) => {
|
|
28
|
-
const files = await recursiveReaddir(dir);
|
|
29
|
-
|
|
30
|
-
watch_files = _.union(watch_files, files);
|
|
31
|
-
}),
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return watch_files;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
module.exports = function watcher({ mode }) {
|
|
38
|
-
return {
|
|
39
|
-
async buildStart() {
|
|
40
|
-
if (!initial_run_completed) {
|
|
41
|
-
await task_scheduler.unlock_dist({
|
|
42
|
-
package_name: 'Shared',
|
|
43
|
-
remove_dist: mode === 'production',
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
initial_run_completed = true;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
const watch_files = await generate_watch_files();
|
|
50
|
-
|
|
51
|
-
watch_files.forEach((file) => {
|
|
52
|
-
this.addWatchFile(file);
|
|
53
|
-
});
|
|
54
|
-
},
|
|
55
|
-
};
|
|
56
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
const appRoot = require('app-root-path');
|
|
4
|
+
const recursiveReaddir = require('recursive-readdir');
|
|
5
|
+
const _ = require('lodash');
|
|
6
|
+
|
|
7
|
+
const { TaskScheduler } = require('../../task_scheduler');
|
|
8
|
+
|
|
9
|
+
const task_scheduler = new TaskScheduler();
|
|
10
|
+
|
|
11
|
+
const app_root = appRoot.path;
|
|
12
|
+
|
|
13
|
+
let initial_run_completed = false;
|
|
14
|
+
|
|
15
|
+
const generate_watch_files = async () => {
|
|
16
|
+
let watch_files = [];
|
|
17
|
+
|
|
18
|
+
const src_dir = path.join(app_root, 'src');
|
|
19
|
+
|
|
20
|
+
const dirs = [
|
|
21
|
+
path.join(app_root, 'js'),
|
|
22
|
+
path.join(src_dir, '_locales'),
|
|
23
|
+
path.join(src_dir, 'scss'),
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
await Promise.all(
|
|
27
|
+
dirs.map(async (dir) => {
|
|
28
|
+
const files = await recursiveReaddir(dir);
|
|
29
|
+
|
|
30
|
+
watch_files = _.union(watch_files, files);
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return watch_files;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
module.exports = function watcher({ mode }) {
|
|
38
|
+
return {
|
|
39
|
+
async buildStart() {
|
|
40
|
+
if (!initial_run_completed) {
|
|
41
|
+
await task_scheduler.unlock_dist({
|
|
42
|
+
package_name: 'Shared',
|
|
43
|
+
remove_dist: mode === 'production',
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
initial_run_completed = true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const watch_files = await generate_watch_files();
|
|
50
|
+
|
|
51
|
+
watch_files.forEach((file) => {
|
|
52
|
+
this.addWatchFile(file);
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
};
|
package/js/package/terser.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
class Terser {
|
|
2
|
-
config = {
|
|
3
|
-
output: {
|
|
4
|
-
comments(node, comment) {
|
|
5
|
-
const text = comment.value;
|
|
6
|
-
const { type } = comment;
|
|
7
|
-
if (type === 'comment2') {
|
|
8
|
-
return /@preserve|@license|@cc_on/i.test(text);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return undefined;
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
mangle: false,
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
module.exports = { Terser };
|
|
1
|
+
class Terser {
|
|
2
|
+
config = {
|
|
3
|
+
output: {
|
|
4
|
+
comments(node, comment) {
|
|
5
|
+
const text = comment.value;
|
|
6
|
+
const { type } = comment;
|
|
7
|
+
if (type === 'comment2') {
|
|
8
|
+
return /@preserve|@license|@cc_on/i.test(text);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return undefined;
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
mangle: false,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = { Terser };
|
package/js/task_scheduler.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs-extra');
|
|
3
|
-
const childProcess = require('child_process');
|
|
4
|
-
|
|
5
|
-
const { ProjectName } = require('./project_name');
|
|
6
|
-
|
|
7
|
-
const project_name = new ProjectName();
|
|
8
|
-
|
|
9
|
-
class TaskScheduler {
|
|
10
|
-
unlock_dist = async ({ package_name, remove_dist }) => {
|
|
11
|
-
const is_windows = process.platform === 'win32';
|
|
12
|
-
|
|
13
|
-
if (
|
|
14
|
-
(is_windows &&
|
|
15
|
-
fs.existsSync(path.join('C:', 'Program Files', 'LockHunter', 'LockHunter.exe'))) ||
|
|
16
|
-
!is_windows
|
|
17
|
-
) {
|
|
18
|
-
if (is_windows) {
|
|
19
|
-
childProcess.execSync(`SCHTASKS.EXE /RUN /TN "Unlock ${package_name} dist dir"`);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (remove_dist) {
|
|
23
|
-
// eslint-disable-next-line global-require
|
|
24
|
-
const { projects_path } = require('./projects_path');
|
|
25
|
-
|
|
26
|
-
fs.removeSync(
|
|
27
|
-
path.join(
|
|
28
|
-
projects_path.q,
|
|
29
|
-
package_name,
|
|
30
|
-
project_name.transform({ project: package_name }),
|
|
31
|
-
'dist',
|
|
32
|
-
),
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
module.exports = { TaskScheduler };
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs-extra');
|
|
3
|
+
const childProcess = require('child_process');
|
|
4
|
+
|
|
5
|
+
const { ProjectName } = require('./project_name');
|
|
6
|
+
|
|
7
|
+
const project_name = new ProjectName();
|
|
8
|
+
|
|
9
|
+
class TaskScheduler {
|
|
10
|
+
unlock_dist = async ({ package_name, remove_dist }) => {
|
|
11
|
+
const is_windows = process.platform === 'win32';
|
|
12
|
+
|
|
13
|
+
if (
|
|
14
|
+
(is_windows &&
|
|
15
|
+
fs.existsSync(path.join('C:', 'Program Files', 'LockHunter', 'LockHunter.exe'))) ||
|
|
16
|
+
!is_windows
|
|
17
|
+
) {
|
|
18
|
+
if (is_windows) {
|
|
19
|
+
childProcess.execSync(`SCHTASKS.EXE /RUN /TN "Unlock ${package_name} dist dir"`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (remove_dist) {
|
|
23
|
+
// eslint-disable-next-line global-require
|
|
24
|
+
const { projects_path } = require('./projects_path');
|
|
25
|
+
|
|
26
|
+
fs.removeSync(
|
|
27
|
+
path.join(
|
|
28
|
+
projects_path.q,
|
|
29
|
+
package_name,
|
|
30
|
+
project_name.transform({ project: package_name }),
|
|
31
|
+
'dist',
|
|
32
|
+
),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = { TaskScheduler };
|
package/js/tsc_alias.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const child_process = require('child_process');
|
|
2
|
+
|
|
3
|
+
class TscAlias {
|
|
4
|
+
transform_aliases_to_relative_paths = () => ({
|
|
5
|
+
name: 'tsAlias',
|
|
6
|
+
writeBundle: () =>
|
|
7
|
+
new Promise((resolve, reject) => {
|
|
8
|
+
child_process.exec('tsc-alias', function callback(error, stdout, stderr) {
|
|
9
|
+
if (stderr || error) {
|
|
10
|
+
reject(stderr || error);
|
|
11
|
+
} else {
|
|
12
|
+
resolve(stdout);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = { TscAlias };
|
package/js/webpack.config.js
CHANGED
|
@@ -12,6 +12,7 @@ const shared_config = ({
|
|
|
12
12
|
MiniCssExtractPlugin,
|
|
13
13
|
CssMinimizerPlugin,
|
|
14
14
|
CopyWebpackPlugin,
|
|
15
|
+
LicensePlugin,
|
|
15
16
|
copy_patters,
|
|
16
17
|
minimize = true,
|
|
17
18
|
enable_anouncement,
|
|
@@ -41,9 +42,16 @@ const shared_config = ({
|
|
|
41
42
|
from: path.join(app_root, 'node_modules', '@loftyshaky', 'shared', 'html'),
|
|
42
43
|
noErrorOnMissing: true,
|
|
43
44
|
globOptions: {
|
|
44
|
-
ignore:
|
|
45
|
+
ignore: [
|
|
46
|
+
...(enable_anouncement ? [] : ['**/announcement.html']),
|
|
47
|
+
...(env.browser === 'edge' ? ['**/dependencies.html'] : []),
|
|
48
|
+
],
|
|
45
49
|
},
|
|
46
50
|
},
|
|
51
|
+
{
|
|
52
|
+
from: path.join(app_root, 'node_modules', '@loftyshaky', 'shared', 'imgs'),
|
|
53
|
+
noErrorOnMissing: true,
|
|
54
|
+
},
|
|
47
55
|
{
|
|
48
56
|
from: path.join(app_root, 'src', 'html'),
|
|
49
57
|
},
|
|
@@ -74,6 +82,9 @@ const shared_config = ({
|
|
|
74
82
|
...(enable_anouncement && {
|
|
75
83
|
announcement: path.join(paths.ts, 'announcement', 'announcement.ts'),
|
|
76
84
|
}),
|
|
85
|
+
...(env.browser !== 'edge' && {
|
|
86
|
+
dependencies: path.join(paths.ts, 'dependencies', 'dependencies.ts'),
|
|
87
|
+
}),
|
|
77
88
|
font_face: path.join(paths.embed, 'font_face.scss'),
|
|
78
89
|
no_tr: path.join(paths.embed, 'no_tr.scss'),
|
|
79
90
|
hidden_roots: path.join(paths.embed, 'hidden_roots.scss'),
|
|
@@ -90,6 +101,17 @@ const shared_config = ({
|
|
|
90
101
|
'index.scss',
|
|
91
102
|
),
|
|
92
103
|
}),
|
|
104
|
+
...(env.browser !== 'edge' && {
|
|
105
|
+
dependencies_css: path.join(
|
|
106
|
+
app_root,
|
|
107
|
+
'node_modules',
|
|
108
|
+
'@loftyshaky',
|
|
109
|
+
'shared',
|
|
110
|
+
'scss',
|
|
111
|
+
'dependencies',
|
|
112
|
+
'index.scss',
|
|
113
|
+
),
|
|
114
|
+
}),
|
|
93
115
|
light_theme: path.join(paths.themes, 'light_theme.scss'),
|
|
94
116
|
dark_theme: path.join(paths.themes, 'dark_theme.scss'),
|
|
95
117
|
very_dark_theme: path.join(paths.themes, 'very_dark_theme.scss'),
|
|
@@ -113,6 +135,7 @@ const shared_config = ({
|
|
|
113
135
|
...(enable_anouncement && {
|
|
114
136
|
announcement: path.join(paths.ts, 'announcement'),
|
|
115
137
|
}),
|
|
138
|
+
dependencies: path.join(paths.ts, 'dependencies'),
|
|
116
139
|
},
|
|
117
140
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
118
141
|
fallback: {
|
|
@@ -134,10 +157,10 @@ const shared_config = ({
|
|
|
134
157
|
use: ['@svgr/webpack'],
|
|
135
158
|
},
|
|
136
159
|
{
|
|
137
|
-
test: /\.
|
|
160
|
+
test: /\.ttf?$/,
|
|
138
161
|
type: 'asset/resource',
|
|
139
162
|
generator: {
|
|
140
|
-
filename: '[name][ext]',
|
|
163
|
+
filename: './[name][ext]',
|
|
141
164
|
},
|
|
142
165
|
},
|
|
143
166
|
],
|
|
@@ -154,6 +177,10 @@ const shared_config = ({
|
|
|
154
177
|
compiler.hooks.done.tap('done', callback_done);
|
|
155
178
|
},
|
|
156
179
|
},
|
|
180
|
+
new LicensePlugin({
|
|
181
|
+
outputFilename: 'dependencies.json',
|
|
182
|
+
replenishDefaultLicenseTexts: true,
|
|
183
|
+
}),
|
|
157
184
|
],
|
|
158
185
|
target: 'web',
|
|
159
186
|
devtool: false,
|