@ebay/skin 16.0.0 → 16.1.0-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/.github/workflows/jekyll-gh-pages.yml +1 -1
- package/.percy.yml +4 -3
- package/.prettierrc.json +1 -12
- package/.storybook/main.js +44 -40
- package/.storybook/manager.js +6 -6
- package/.storybook/preview-head.html +49 -11
- package/.storybook/theme.js +9 -9
- package/.stylelintrc +80 -73
- package/ICON-CREATION.md +22 -45
- package/README.md +1 -1
- package/_cdn/skin/v16.1.0-0/skin-default.min.css +6 -0
- package/_cdn/skin/v16.1.0-0/skin-full.min.css +6 -0
- package/_cdn/skin/v16.1.0-0/skin-headless.min.css +6 -0
- package/_cdn/skin/v16.1.0-0/skin-legacy.min.css +6 -0
- package/dist/alert-dialog/alert-dialog.css +16 -11
- package/dist/breadcrumbs/breadcrumbs.css +1 -1
- package/dist/button/button.css +3 -5
- package/dist/calendar/calendar.css +1 -4
- package/dist/carousel/carousel.css +11 -15
- package/dist/combobox/combobox.css +0 -2
- package/dist/confirm-dialog/confirm-dialog.css +16 -11
- package/dist/date-textbox/date-textbox.css +1 -1
- package/dist/drawer-dialog/drawer-dialog.css +11 -8
- package/dist/fullscreen-dialog/fullscreen-dialog.css +11 -8
- package/dist/icon/icon.css +17 -5
- package/dist/image-placeholder/image-placeholder.css +4 -0
- package/dist/infotip/infotip.css +2 -5
- package/dist/legacy-theme/legacy-theme.css +2 -2
- package/dist/legacy-tokens/ds4-light.css +2 -0
- package/dist/lightbox-dialog/lightbox-dialog.css +24 -17
- package/dist/listbox/listbox.css +0 -2
- package/dist/listbox-button/listbox-button.css +0 -2
- package/dist/menu/menu.css +0 -2
- package/dist/menu-button/menu-button.css +0 -2
- package/dist/mixins/utility-mixins.less +1 -4
- package/dist/page-grid/page-grid.css +15 -5
- package/dist/page-notice/page-notice.css +1 -1
- package/dist/panel-dialog/panel-dialog.css +12 -9
- package/dist/progress-bar/progress-bar.css +1 -1
- package/dist/progress-stepper/progress-stepper.css +1 -1
- package/dist/section-notice/section-notice.css +1 -1
- package/dist/section-title/section-title.css +1 -1
- package/dist/snackbar-dialog/snackbar-dialog.css +7 -1
- package/dist/square-corner-theme/square-corner-theme.css +3 -3
- package/dist/svg/icon/icon-bookmark-16.svg +7 -0
- package/dist/svg/icon/icon-bookmark-24.svg +7 -0
- package/dist/svg/icon/icon-play-filled-16-colored.svg +13 -0
- package/dist/svg/icon/icon-play-filled-24-colored.svg +11 -0
- package/dist/svg/icon/image-placeholder.svg +3 -0
- package/dist/svg/icons.svg +49 -11
- package/dist/toast-dialog/toast-dialog.css +7 -1
- package/dist/tokens/evo-dark.css +2 -0
- package/dist/tokens/evo-light.css +2 -0
- package/dist/tooltip/tooltip.css +2 -5
- package/dist/tourtip/tourtip.css +2 -5
- package/dist/typography/typography.css +1 -1
- package/dist/utility/utility.css +2 -8
- package/dist/video/video.css +1 -4
- package/image-placeholder.browser.json +1 -0
- package/image-placeholder.css +1 -0
- package/image-placeholder.js +1 -0
- package/image-placeholder.mjs +1 -0
- package/index.browser.json +1 -0
- package/index.css +1 -0
- package/index.js +1 -0
- package/index.mjs +1 -0
- package/package.json +12 -12
- package/scripts/develop-module_proper/code-generators/doc-generator.js +32 -16
- package/scripts/develop-module_proper/code-generators/style-generator.js +89 -34
- package/scripts/develop-module_proper/code-generators/test-generator.js +18 -12
- package/scripts/develop-module_proper/errors/illegal-input.js +1 -1
- package/scripts/develop-module_proper/index.js +6 -6
- package/scripts/develop-module_proper/input/module-name.js +9 -7
- package/scripts/develop-module_proper/input/parse-input.js +10 -8
- package/scripts/develop-module_proper/util/line-writer.js +31 -18
- package/scripts/develop-module_proper/util/title-case.js +4 -3
- package/scripts/generate-bundle.js +58 -33
- package/scripts/generate-images.js +72 -45
- package/scripts/generate-imports/config.json +21 -3
- package/scripts/generate-imports/index.js +35 -29
- package/scripts/generate-imports/module-builder.js +58 -36
- package/scripts/import-svgs.js +33 -25
- package/scripts/index.js +68 -68
- package/scripts/jekyll-config.js +8 -5
- package/scripts/log.js +5 -3
- package/scripts/split-icon.js +20 -15
- package/scripts/storybook/copy.js +29 -10
- package/scripts/svgo.config.js +42 -42
- package/scripts/util.js +15 -11
- package/scripts/verify-build.js +12 -12
- package/src/fonts/marketsans/MarketSans-Regular-WebS.css +6 -3
- package/src/fonts/marketsans/MarketSans-SemiBold-WebS.css +6 -3
- package/src/less/alert-dialog/alert-dialog.less +5 -6
- package/src/less/alert-dialog/stories/alert-dialog.stories.js +1 -1
- package/src/less/badge/stories/badge.stories.js +1 -1
- package/src/less/breadcrumbs/breadcrumbs.less +5 -2
- package/src/less/breadcrumbs/stories/button-cascade.stories.js +1 -1
- package/src/less/breadcrumbs/stories/button-overflow.stories.js +1 -1
- package/src/less/breadcrumbs/stories/buttons.stories.js +1 -1
- package/src/less/breadcrumbs/stories/link-cascade.stories.js +1 -1
- package/src/less/breadcrumbs/stories/link-overflow.stories.js +1 -1
- package/src/less/breadcrumbs/stories/links.stories.js +1 -1
- package/src/less/bundles/skin-headless.less +1 -0
- package/src/less/button/button.less +16 -10
- package/src/less/button/stories/button/base.stories.js +1 -1
- package/src/less/button/stories/button/borderless.stories.js +5 -3
- package/src/less/button/stories/button/cascade.stories.js +1 -1
- package/src/less/button/stories/button/dimensions.stories.js +1 -1
- package/src/less/button/stories/button/primary.stories.js +3 -2
- package/src/less/button/stories/button/secondary.stories.js +3 -2
- package/src/less/button/stories/button/tertiary.stories.js +1 -1
- package/src/less/button/stories/destructive-button/primary.stories.js +1 -1
- package/src/less/button/stories/destructive-button/secondary.stories.js +1 -1
- package/src/less/button/stories/destructive-button/tertiary.stories.js +1 -1
- package/src/less/button/stories/fake-button/base.stories.js +3 -2
- package/src/less/button/stories/fake-button/cascade.stories.js +1 -1
- package/src/less/button/stories/fake-button/dimensions.stories.js +1 -1
- package/src/less/button/stories/fake-button/primary.stories.js +1 -1
- package/src/less/button/stories/fake-button/secondary.stories.js +1 -1
- package/src/less/calendar/calendar.less +21 -10
- package/src/less/calendar/stories/calendar.stories.js +317 -88
- package/src/less/carousel/carousel.less +14 -9
- package/src/less/carousel/stories/carousel.stories.js +1 -1
- package/src/less/checkbox/checkbox.less +14 -5
- package/src/less/checkbox/stories/checked.stories.js +1 -1
- package/src/less/checkbox/stories/mixed.stories.js +1 -1
- package/src/less/checkbox/stories/unchecked.stories.js +1 -1
- package/src/less/combobox/combobox.less +4 -1
- package/src/less/combobox/stories/combobox.stories.js +1 -1
- package/src/less/confirm-dialog/confirm-dialog.less +5 -6
- package/src/less/confirm-dialog/stories/confirm-dialog.stories.js +1 -1
- package/src/less/cta-button/stories/cascade.stories.js +1 -1
- package/src/less/cta-button/stories/cta-button.stories.js +1 -1
- package/src/less/cta-button/stories/dimensions.stories.js +1 -1
- package/src/less/date-textbox/date-textbox.less +1 -1
- package/src/less/details/stories/cascade.stories.js +1 -1
- package/src/less/details/stories/details.stories.js +1 -1
- package/src/less/drawer-dialog/drawer-dialog.less +2 -2
- package/src/less/drawer-dialog/stories/drawer-dialog.stories.js +1 -1
- package/src/less/eek/eek.less +2 -2
- package/src/less/field/stories/stacked.stories.js +1 -1
- package/src/less/field/stories/unstacked.stories.js +1 -1
- package/src/less/filter-button/stories/button.stories.js +1 -1
- package/src/less/filter-button/stories/group.stories.js +1 -1
- package/src/less/filter-button/stories/link.stories.js +1 -1
- package/src/less/filter-menu/filter-menu.less +8 -4
- package/src/less/filter-menu/stories/filter-menu.stories.js +1 -1
- package/src/less/filter-menu-button/filter-menu-button.less +2 -1
- package/src/less/filter-menu-button/stories/filter-menu-button.stories.js +1 -1
- package/src/less/floating-label/stories/floating-label.stories.js +1 -1
- package/src/less/fullscreen-dialog/fullscreen-dialog.less +2 -2
- package/src/less/fullscreen-dialog/stories/fullscreen-dialog.stories.js +1 -1
- package/src/less/global/stories/global.stories.js +1 -1
- package/src/less/icon/generated/icon.less +17 -5
- package/src/less/icon/stories/icon.stories.js +1 -1
- package/src/less/icon-button/stories/alignment.stories.js +1 -1
- package/src/less/image-placeholder/image-placeholder.less +4 -0
- package/src/less/image-placeholder/stories/image-placeholder.stories.js +35 -0
- package/src/less/index.stories.js +1 -1
- package/src/less/infotip/infotip.less +1 -1
- package/src/less/infotip/stories/infotip.stories.js +1 -1
- package/src/less/inline-notice/stories/inline.stories.js +1 -1
- package/src/less/legacy-theme/legacy-theme.less +2 -2
- package/src/less/lightbox-dialog/lightbox-dialog.less +12 -9
- package/src/less/lightbox-dialog/stories/lightbox-dialog.stories.js +91 -1
- package/src/less/link/stories/link.stories.js +3 -2
- package/src/less/listbox/listbox.less +2 -1
- package/src/less/listbox/stories/cascade.stories.js +1 -1
- package/src/less/listbox/stories/listbox.stories.js +1 -1
- package/src/less/listbox-button/listbox-button.less +2 -1
- package/src/less/listbox-button/stories/base.stories.js +1 -1
- package/src/less/listbox-button/stories/cascade.stories.js +1 -1
- package/src/less/listbox-button/stories/dimensions.stories.js +1 -1
- package/src/less/listbox-button/stories/form.stories.js +1 -1
- package/src/less/marketsans/marketsans.less +12 -6
- package/src/less/menu/stories/fake-menu.stories.js +1 -1
- package/src/less/menu/stories/misc.stories.js +1 -1
- package/src/less/menu/stories/multiSelect.stories.js +1 -1
- package/src/less/menu-button/menu-button.less +2 -1
- package/src/less/menu-button/stories/base.stories.js +1 -1
- package/src/less/menu-button/stories/cascade.stories.js +1 -1
- package/src/less/menu-button/stories/dimensions.stories.js +1 -1
- package/src/less/menu-button/stories/fake-menu-button.stories.js +1 -1
- package/src/less/mixins/private/bubble-mixins.less +1 -4
- package/src/less/mixins/private/dialog-mixins.less +12 -10
- package/src/less/mixins/private/filter-menu-mixins.less +4 -1
- package/src/less/mixins/private/selection-list-mixins.less +0 -2
- package/src/less/mixins/private/token-mixins.less +2 -1
- package/src/less/mixins/public/utility-mixins.less +1 -4
- package/src/less/page-grid/page-grid.less +32 -10
- package/src/less/page-notice/page-notice.less +1 -1
- package/src/less/page-notice/stories/page-notice.stories.js +1 -1
- package/src/less/page-notice/stories/test.stories.js +1 -1
- package/src/less/pagination/stories/button-cascade.stories.js +1 -1
- package/src/less/pagination/stories/buttons.stories.js +1 -1
- package/src/less/pagination/stories/link-cascade.stories.js +1 -1
- package/src/less/pagination/stories/links.stories.js +1 -1
- package/src/less/pagination/stories/overflow.stories.js +1 -1
- package/src/less/panel-dialog/panel-dialog.less +5 -4
- package/src/less/panel-dialog/stories/panel-dialog.stories.js +1 -1
- package/src/less/progress-bar/progress-bar.less +1 -1
- package/src/less/progress-bar/stories/progress-bar.stories.js +10 -7
- package/src/less/progress-spinner/stories/progress-spinner.stories.js +1 -1
- package/src/less/progress-stepper/progress-stepper.less +29 -9
- package/src/less/progress-stepper/stories/progress-stepper.stories.js +1 -1
- package/src/less/radio/radio.less +8 -3
- package/src/less/radio/stories/checked.stories.js +1 -1
- package/src/less/radio/stories/unchecked.stories.js +1 -1
- package/src/less/section-notice/section-notice.less +1 -1
- package/src/less/section-notice/stories/rtl.stories.js +1 -1
- package/src/less/section-notice/stories/section-notice.stories.js +1 -1
- package/src/less/section-notice/stories/test.stories.js +1 -1
- package/src/less/section-title/section-title.less +1 -1
- package/src/less/section-title/stories/rtl.stories.js +1 -1
- package/src/less/section-title/stories/section-title.stories.js +1 -1
- package/src/less/select/stories/cascade.stories.js +1 -1
- package/src/less/select/stories/default.stories.js +1 -1
- package/src/less/select/stories/floating-label.stories.js +1 -1
- package/src/less/signal/stories/signal.stories.js +1 -1
- package/src/less/snackbar-dialog/snackbar-dialog.less +1 -1
- package/src/less/snackbar-dialog/stories/base.stories.js +1 -1
- package/src/less/snackbar-dialog/stories/font-size.stories.js +1 -1
- package/src/less/snackbar-dialog/stories/rtl.stories.js +1 -1
- package/src/less/split-button/stories/base.stories.js +1 -1
- package/src/less/split-button/stories/rtl.stories.js +1 -1
- package/src/less/split-button/stories/size.stories.js +1 -1
- package/src/less/square-corner-theme/square-corner-theme.less +3 -3
- package/src/less/star-rating/stories/star-rating.stories.js +1 -1
- package/src/less/star-rating-select/star-rating-select.less +6 -2
- package/src/less/star-rating-select/stories/star-rating-select.stories.js +1 -1
- package/src/less/switch/stories/form.stories.js +1 -1
- package/src/less/switch/stories/script.stories.js +1 -1
- package/src/less/switch/switch.less +12 -6
- package/src/less/tabs/stories/fake-tabs/block.stories.js +1 -1
- package/src/less/tabs/stories/fake-tabs/inlineBlock.stories.js +1 -1
- package/src/less/tabs/stories/tabs/block.stories.js +1 -1
- package/src/less/tabs/stories/tabs/inlineBlock.stories.js +1 -1
- package/src/less/textbox/stories/icon.stories.js +1 -1
- package/src/less/textbox/stories/rtl/icon.stories.js +1 -1
- package/src/less/textbox/stories/rtl/textbox.stories.js +1 -1
- package/src/less/textbox/stories/textbox.stories.js +1 -1
- package/src/less/toast-dialog/stories/toast-dialog.stories.js +1 -1
- package/src/less/toast-dialog/toast-dialog.less +1 -1
- package/src/less/tooltip/stories/pointer.stories.js +84 -78
- package/src/less/tooltip/stories/tooltip.stories.js +1 -1
- package/src/less/tooltip/tooltip.less +1 -1
- package/src/less/tourtip/stories/tourtip.stories.js +1 -1
- package/src/less/tourtip/tourtip.less +1 -1
- package/src/less/typography/typography.less +1 -1
- package/src/less/video/video.less +1 -4
- package/src/svg/icon/icon-bookmark-16.svg +7 -0
- package/src/svg/icon/icon-bookmark-24.svg +7 -0
- package/src/svg/icon/icon-play-filled-16-colored.svg +13 -0
- package/src/svg/icon/icon-play-filled-24-colored.svg +11 -0
- package/src/svg/icon/image-placeholder.svg +3 -0
- package/src/svg/icons.svg +49 -11
- package/src/tokens/evo-dark.css +2 -0
- package/src/tokens/evo-light.css +2 -0
- package/svg.svg +49 -11
- package/webpack.config.js +6 -6
- package/_cdn/skin/v16.0.0/skin-default.min.css +0 -6
- package/_cdn/skin/v16.0.0/skin-full.min.css +0 -6
- package/_cdn/skin/v16.0.0/skin-headless.min.css +0 -6
- package/_cdn/skin/v16.0.0/skin-legacy.min.css +0 -6
- package/dist/svg/icon/icon-image-placeholder.svg +0 -10
- package/src/svg/icon/icon-image-placeholder.svg +0 -10
- /package/dist/svg/icon/{icon-zoom-In-16.svg → icon-zoom-in-16.svg} +0 -0
- /package/src/svg/icon/{icon-zoom-In-16.svg → icon-zoom-in-16.svg} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const fs = require(
|
|
2
|
-
const prettier = require(
|
|
3
|
-
const path = require(
|
|
4
|
-
const { removeFile } = require(
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const prettier = require("prettier");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { removeFile } = require("../util");
|
|
5
5
|
const currentDir = path.dirname(path.dirname(__dirname));
|
|
6
6
|
|
|
7
7
|
function getBrowserFileName(filename, basePath) {
|
|
8
|
-
if (filename ===
|
|
9
|
-
return path.join(currentDir, basePath ||
|
|
8
|
+
if (filename === "index") {
|
|
9
|
+
return path.join(currentDir, basePath || "", `browser.json`);
|
|
10
10
|
}
|
|
11
|
-
return path.join(currentDir, basePath ||
|
|
11
|
+
return path.join(currentDir, basePath || "", `${filename}.browser.json`);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function getMJSFileName(filename, basePath) {
|
|
15
|
-
return path.join(currentDir, basePath ||
|
|
15
|
+
return path.join(currentDir, basePath || "", `${filename}.mjs`);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function getFileName(filename, ext, basePath) {
|
|
19
|
-
return path.join(currentDir, basePath ||
|
|
19
|
+
return path.join(currentDir, basePath || "", `${filename}.${ext}`);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function getBrowserRequireSyntax(filename) {
|
|
@@ -25,7 +25,7 @@ function getBrowserRequireSyntax(filename) {
|
|
|
25
25
|
|
|
26
26
|
function getCSSRequireSyntax(filepath, ext) {
|
|
27
27
|
let fullFilePath = `${filepath}.${ext}`;
|
|
28
|
-
if (filepath.endsWith(
|
|
28
|
+
if (filepath.endsWith(".css") || filepath.includes("svg")) {
|
|
29
29
|
fullFilePath = filepath;
|
|
30
30
|
}
|
|
31
31
|
return `@import "./${fullFilePath}";\n`;
|
|
@@ -33,7 +33,7 @@ function getCSSRequireSyntax(filepath, ext) {
|
|
|
33
33
|
|
|
34
34
|
function getJSRequireSyntax(filepath, ext) {
|
|
35
35
|
let fullFilePath = `${filepath}.${ext}`;
|
|
36
|
-
if (filepath.endsWith(
|
|
36
|
+
if (filepath.endsWith(".css") || filepath.includes("svg")) {
|
|
37
37
|
fullFilePath = filepath;
|
|
38
38
|
}
|
|
39
39
|
return `require('./${fullFilePath}');\n`;
|
|
@@ -41,7 +41,7 @@ function getJSRequireSyntax(filepath, ext) {
|
|
|
41
41
|
|
|
42
42
|
function getMJSRequireSyntax(filepath, ext) {
|
|
43
43
|
let fullFilePath = `${filepath}.${ext}`;
|
|
44
|
-
if (filepath.endsWith(
|
|
44
|
+
if (filepath.endsWith(".css") || filepath.includes("svg")) {
|
|
45
45
|
fullFilePath = filepath;
|
|
46
46
|
}
|
|
47
47
|
return `import './${fullFilePath}';\n`;
|
|
@@ -61,7 +61,7 @@ class ModuleBuilder {
|
|
|
61
61
|
{
|
|
62
62
|
hasBaseModule: true,
|
|
63
63
|
isNested: false,
|
|
64
|
-
distDir:
|
|
64
|
+
distDir: "",
|
|
65
65
|
addIndexModules: null,
|
|
66
66
|
},
|
|
67
67
|
options
|
|
@@ -71,13 +71,13 @@ class ModuleBuilder {
|
|
|
71
71
|
getFilePath(filename) {
|
|
72
72
|
let file = filename;
|
|
73
73
|
let filePath = filename;
|
|
74
|
-
let prefixPath =
|
|
74
|
+
let prefixPath = "";
|
|
75
75
|
if (this.config.overrideFile[filename]) {
|
|
76
76
|
file = this.config.overrideFile[filename];
|
|
77
77
|
} else if (this.options.isNested) {
|
|
78
|
-
filePath = filename === this.moduleName ?
|
|
79
|
-
file = file === this.moduleName ?
|
|
80
|
-
prefixPath =
|
|
78
|
+
filePath = filename === this.moduleName ? "index" : this.moduleName;
|
|
79
|
+
file = file === this.moduleName ? "index" : filename;
|
|
80
|
+
prefixPath = "../";
|
|
81
81
|
}
|
|
82
82
|
return `${prefixPath}dist/${filePath}/${file}`;
|
|
83
83
|
}
|
|
@@ -86,8 +86,8 @@ class ModuleBuilder {
|
|
|
86
86
|
try {
|
|
87
87
|
await fs.promises.rm(this.moduleName, { recursive: true });
|
|
88
88
|
await removeFile(getMJSFileName(this.moduleName));
|
|
89
|
-
await removeFile(getFileName(this.moduleName,
|
|
90
|
-
await removeFile(getFileName(this.moduleName,
|
|
89
|
+
await removeFile(getFileName(this.moduleName, "js"));
|
|
90
|
+
await removeFile(getFileName(this.moduleName, "css"));
|
|
91
91
|
} catch (e) {
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
@@ -95,8 +95,8 @@ class ModuleBuilder {
|
|
|
95
95
|
await removeFile(getBrowserFileName(this.moduleName));
|
|
96
96
|
await removeFile(getMJSFileName(this.moduleName));
|
|
97
97
|
|
|
98
|
-
await removeFile(getFileName(this.moduleName,
|
|
99
|
-
await removeFile(getFileName(this.moduleName,
|
|
98
|
+
await removeFile(getFileName(this.moduleName, "js"));
|
|
99
|
+
await removeFile(getFileName(this.moduleName, "css"));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -117,7 +117,9 @@ class ModuleBuilder {
|
|
|
117
117
|
async run() {
|
|
118
118
|
if (this.options.isNested) {
|
|
119
119
|
// create directory
|
|
120
|
-
await fs.promises.mkdir(path.join(currentDir, this.moduleName), {
|
|
120
|
+
await fs.promises.mkdir(path.join(currentDir, this.moduleName), {
|
|
121
|
+
recursive: true,
|
|
122
|
+
});
|
|
121
123
|
// Get all modules now in directory
|
|
122
124
|
const moduleList = await fs.promises.readdir(
|
|
123
125
|
path.join(this.options.distDir, this.moduleName)
|
|
@@ -150,7 +152,7 @@ class ModuleBuilder {
|
|
|
150
152
|
let modName = path.parse(file).name;
|
|
151
153
|
|
|
152
154
|
if (modName === this.moduleName) {
|
|
153
|
-
modName =
|
|
155
|
+
modName = "index";
|
|
154
156
|
}
|
|
155
157
|
await this.writeBrowserJSON(modName);
|
|
156
158
|
await this.writeModuleFiles(modName);
|
|
@@ -167,42 +169,62 @@ class ModuleBuilder {
|
|
|
167
169
|
);
|
|
168
170
|
const filename = currentModule || this.moduleName;
|
|
169
171
|
const requires = additionalRequires.concat(
|
|
170
|
-
this.options.hasBaseModule
|
|
172
|
+
this.options.hasBaseModule
|
|
173
|
+
? [getBrowserRequireSyntax(filename)]
|
|
174
|
+
: []
|
|
171
175
|
);
|
|
172
176
|
|
|
173
177
|
const content = { dependencies: requires };
|
|
174
178
|
return await fs.promises.writeFile(
|
|
175
|
-
getBrowserFileName(
|
|
176
|
-
|
|
179
|
+
getBrowserFileName(
|
|
180
|
+
filename,
|
|
181
|
+
this.options.isNested && this.moduleName
|
|
182
|
+
),
|
|
183
|
+
prettier.format(JSON.stringify(content), { parser: "json" })
|
|
177
184
|
);
|
|
178
185
|
}
|
|
179
186
|
|
|
180
187
|
async writeModuleFiles(currentModule) {
|
|
181
188
|
const modules = this.additionalModules;
|
|
182
189
|
const mod = currentModule || this.moduleName;
|
|
183
|
-
const filename = this.options.hasBaseModule
|
|
190
|
+
const filename = this.options.hasBaseModule
|
|
191
|
+
? this.getFilePath(mod)
|
|
192
|
+
: null;
|
|
184
193
|
const baseDirectory = this.options.isNested ? this.moduleName : false;
|
|
185
194
|
|
|
186
195
|
await fs.promises.writeFile(
|
|
187
|
-
getFileName(mod,
|
|
188
|
-
this.parseAdditionalModules(getJSRequireSyntax,
|
|
196
|
+
getFileName(mod, "js", baseDirectory),
|
|
197
|
+
this.parseAdditionalModules(getJSRequireSyntax, "js", {
|
|
198
|
+
modules,
|
|
199
|
+
filename,
|
|
200
|
+
})
|
|
189
201
|
);
|
|
190
202
|
|
|
191
203
|
await fs.promises.writeFile(
|
|
192
|
-
getFileName(mod,
|
|
193
|
-
this.parseAdditionalModules(getCSSRequireSyntax,
|
|
204
|
+
getFileName(mod, "css", baseDirectory),
|
|
205
|
+
this.parseAdditionalModules(getCSSRequireSyntax, "css", {
|
|
206
|
+
modules,
|
|
207
|
+
filename,
|
|
208
|
+
})
|
|
194
209
|
);
|
|
195
210
|
|
|
196
211
|
await fs.promises.writeFile(
|
|
197
|
-
getFileName(mod,
|
|
198
|
-
this.parseAdditionalModules(getMJSRequireSyntax,
|
|
212
|
+
getFileName(mod, "mjs", baseDirectory),
|
|
213
|
+
this.parseAdditionalModules(getMJSRequireSyntax, "css", {
|
|
214
|
+
modules,
|
|
215
|
+
filename,
|
|
216
|
+
})
|
|
199
217
|
);
|
|
200
218
|
}
|
|
201
219
|
|
|
202
220
|
parseAdditionalModules(getSyntax, ext, { modules, filename }) {
|
|
203
|
-
const additioanlContent = modules.map((addFile) =>
|
|
204
|
-
|
|
205
|
-
|
|
221
|
+
const additioanlContent = modules.map((addFile) =>
|
|
222
|
+
getSyntax(addFile, ext)
|
|
223
|
+
);
|
|
224
|
+
const content = additioanlContent.concat(
|
|
225
|
+
filename ? [getSyntax(filename, "css")] : []
|
|
226
|
+
);
|
|
227
|
+
return content.join("");
|
|
206
228
|
}
|
|
207
229
|
}
|
|
208
230
|
|
package/scripts/import-svgs.js
CHANGED
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
|
-
|
|
4
|
-
const fs = require(
|
|
5
|
-
const path = require(
|
|
3
|
+
"use strict";
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
6
|
const currentDir = path.dirname(__dirname);
|
|
7
|
-
const svgDir = path.resolve(currentDir,
|
|
8
|
-
const { optimize } = require(
|
|
9
|
-
const jsdom = require(
|
|
7
|
+
const svgDir = path.resolve(currentDir, "src", "svg");
|
|
8
|
+
const { optimize } = require("svgo");
|
|
9
|
+
const jsdom = require("jsdom");
|
|
10
10
|
const { JSDOM } = jsdom;
|
|
11
|
-
const svgConfig = require(
|
|
12
|
-
const { html2xhtml } = require(
|
|
11
|
+
const svgConfig = require("./svgo.config");
|
|
12
|
+
const { html2xhtml } = require("./util");
|
|
13
13
|
|
|
14
14
|
async function runImport(svg, name, file, argv) {
|
|
15
|
-
const skinFile = await fs.promises.readFile(
|
|
16
|
-
|
|
15
|
+
const skinFile = await fs.promises.readFile(
|
|
16
|
+
path.resolve(svgDir, `${file}.svg`),
|
|
17
|
+
"utf8"
|
|
18
|
+
);
|
|
19
|
+
const svgFile = await fs.promises.readFile(svg, "utf8");
|
|
17
20
|
|
|
18
|
-
const oldSymbols = new JSDOM(skinFile, { contentType:
|
|
21
|
+
const oldSymbols = new JSDOM(skinFile, { contentType: "text/html" });
|
|
19
22
|
|
|
20
23
|
const newSVGFile = optimize(svgFile, svgConfig)
|
|
21
|
-
.data.replace(
|
|
22
|
-
.replace(
|
|
23
|
-
|
|
24
|
-
const svgJsDom = new JSDOM(newSVGFile, { contentType:
|
|
25
|
-
const svgFragment = svgJsDom.window.document.querySelector(
|
|
26
|
-
svgFragment.setAttribute(
|
|
27
|
-
if (argv.keepFill ===
|
|
28
|
-
svgFragment.removeAttribute(
|
|
29
|
-
svgFragment.querySelectorAll(
|
|
30
|
-
node.removeAttribute(
|
|
24
|
+
.data.replace("<svg", "<symbol")
|
|
25
|
+
.replace("</svg", "</symbol");
|
|
26
|
+
|
|
27
|
+
const svgJsDom = new JSDOM(newSVGFile, { contentType: "text/xml" });
|
|
28
|
+
const svgFragment = svgJsDom.window.document.querySelector("symbol");
|
|
29
|
+
svgFragment.setAttribute("id", name);
|
|
30
|
+
if (argv.keepFill === "false") {
|
|
31
|
+
svgFragment.removeAttribute("fill");
|
|
32
|
+
svgFragment.querySelectorAll("[fill]").forEach((node) => {
|
|
33
|
+
node.removeAttribute("fill");
|
|
31
34
|
});
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
const existing = oldSymbols.window.document.querySelector(`#${name}`);
|
|
35
38
|
if (existing) {
|
|
36
|
-
console.log(
|
|
39
|
+
console.log("existing icon found, updating");
|
|
37
40
|
existing.parentNode.replaceChild(svgFragment, existing);
|
|
38
41
|
} else {
|
|
39
|
-
console.log(
|
|
40
|
-
oldSymbols.window.document
|
|
42
|
+
console.log("adding new icon");
|
|
43
|
+
oldSymbols.window.document
|
|
44
|
+
.querySelector("svg")
|
|
45
|
+
.appendChild(svgFragment);
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
const newFileData = html2xhtml(oldSymbols);
|
|
44
49
|
|
|
45
|
-
await fs.promises.writeFile(
|
|
50
|
+
await fs.promises.writeFile(
|
|
51
|
+
path.resolve(svgDir, `${file}.svg`),
|
|
52
|
+
newFileData
|
|
53
|
+
);
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
module.exports = { runImport };
|
package/scripts/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const { listBundles, runCSSBuild } = require(
|
|
2
|
-
const { runGenerate } = require(
|
|
3
|
-
const { runImport } = require(
|
|
4
|
-
const { verifyBuild } = require(
|
|
5
|
-
const { generateTopLevel, cleanTopLevel } = require(
|
|
6
|
-
const { copySVGIcons, copyCustomStyles } = require(
|
|
7
|
-
const { splitter } = require(
|
|
1
|
+
const { listBundles, runCSSBuild } = require("./generate-bundle");
|
|
2
|
+
const { runGenerate } = require("./generate-images");
|
|
3
|
+
const { runImport } = require("./import-svgs");
|
|
4
|
+
const { verifyBuild } = require("./verify-build");
|
|
5
|
+
const { generateTopLevel, cleanTopLevel } = require("./generate-imports");
|
|
6
|
+
const { copySVGIcons, copyCustomStyles } = require("./storybook/copy");
|
|
7
|
+
const { splitter } = require("./split-icon");
|
|
8
8
|
|
|
9
|
-
require(
|
|
10
|
-
.usage(
|
|
9
|
+
require("yargs") // eslint-disable-line
|
|
10
|
+
.usage("Usage: $0 <command> [options]")
|
|
11
11
|
.command(
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
"split <file>",
|
|
13
|
+
"generates less files with styles from svg icons",
|
|
14
14
|
(yargs) => {
|
|
15
|
-
yargs.positional(
|
|
16
|
-
describe:
|
|
15
|
+
yargs.positional("svg", {
|
|
16
|
+
describe: "SVG file",
|
|
17
17
|
demand: true,
|
|
18
|
-
default:
|
|
18
|
+
default: "",
|
|
19
19
|
});
|
|
20
20
|
},
|
|
21
21
|
async (argv) => {
|
|
@@ -27,8 +27,8 @@ require('yargs') // eslint-disable-line
|
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
.command(
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
"genSVG",
|
|
31
|
+
"generates less files with styles from svg icons",
|
|
32
32
|
() => {},
|
|
33
33
|
() => {
|
|
34
34
|
try {
|
|
@@ -40,28 +40,28 @@ require('yargs') // eslint-disable-line
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
.command(
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
"importSVG <svg> <name> <file>",
|
|
44
|
+
"imports given svg into an icon pack or updates if it exists",
|
|
45
45
|
(yargs) => {
|
|
46
|
-
yargs.positional(
|
|
47
|
-
describe:
|
|
46
|
+
yargs.positional("svg", {
|
|
47
|
+
describe: "SVG file",
|
|
48
48
|
demand: true,
|
|
49
|
-
default:
|
|
49
|
+
default: "",
|
|
50
50
|
});
|
|
51
|
-
yargs.positional(
|
|
52
|
-
describe:
|
|
51
|
+
yargs.positional("name", {
|
|
52
|
+
describe: "The ID of the SVG",
|
|
53
53
|
demand: true,
|
|
54
|
-
default:
|
|
54
|
+
default: "",
|
|
55
55
|
});
|
|
56
|
-
yargs.positional(
|
|
57
|
-
describe:
|
|
56
|
+
yargs.positional("file", {
|
|
57
|
+
describe: "The file in skin to append the SVG to",
|
|
58
58
|
demand: true,
|
|
59
|
-
default:
|
|
59
|
+
default: "",
|
|
60
60
|
});
|
|
61
|
-
yargs.option(
|
|
62
|
-
describe:
|
|
63
|
-
type:
|
|
64
|
-
default:
|
|
61
|
+
yargs.option("keep-fill", {
|
|
62
|
+
describe: "If true, will keep fill property on svg",
|
|
63
|
+
type: "boolean",
|
|
64
|
+
default: "false",
|
|
65
65
|
});
|
|
66
66
|
},
|
|
67
67
|
async (argv) => {
|
|
@@ -73,41 +73,41 @@ require('yargs') // eslint-disable-line
|
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
75
|
.command(
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
"list",
|
|
77
|
+
"List all available modules",
|
|
78
78
|
(yargs) => {},
|
|
79
79
|
async (argv) => {
|
|
80
80
|
await listBundles(argv);
|
|
81
81
|
}
|
|
82
82
|
)
|
|
83
83
|
.command(
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
"bundle <name>",
|
|
85
|
+
"generates a CDN bundle with the given name",
|
|
86
86
|
(yargs) => {
|
|
87
87
|
yargs
|
|
88
|
-
.positional(
|
|
89
|
-
describe:
|
|
88
|
+
.positional("name", {
|
|
89
|
+
describe: "name to generate bundle",
|
|
90
90
|
demand: true,
|
|
91
|
-
default:
|
|
91
|
+
default: "skin",
|
|
92
92
|
})
|
|
93
|
-
.option(
|
|
94
|
-
describe:
|
|
95
|
-
default:
|
|
93
|
+
.option("scope-class", {
|
|
94
|
+
describe: "Scoped class to prefix bundle with",
|
|
95
|
+
default: "",
|
|
96
96
|
})
|
|
97
|
-
.option(
|
|
97
|
+
.option("no-minify", {
|
|
98
98
|
describe:
|
|
99
|
-
|
|
100
|
-
type:
|
|
99
|
+
"Skips minify stage. Should set this when another bundler like lasso will be used.",
|
|
100
|
+
type: "boolean",
|
|
101
101
|
})
|
|
102
|
-
.option(
|
|
103
|
-
describe:
|
|
104
|
-
default:
|
|
102
|
+
.option("scope-specificity", {
|
|
103
|
+
describe: "How many times to repeat scope",
|
|
104
|
+
default: "1",
|
|
105
105
|
})
|
|
106
|
-
.option(
|
|
107
|
-
alias:
|
|
108
|
-
type:
|
|
106
|
+
.option("modules", {
|
|
107
|
+
alias: "m",
|
|
108
|
+
type: "array",
|
|
109
109
|
describe:
|
|
110
|
-
|
|
110
|
+
"Space separated list of modules to include. If empty, will include all",
|
|
111
111
|
default: [],
|
|
112
112
|
});
|
|
113
113
|
},
|
|
@@ -116,17 +116,17 @@ require('yargs') // eslint-disable-line
|
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
118
|
.command(
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
"storybook-copy",
|
|
120
|
+
"Copies files to storybook",
|
|
121
121
|
(yargs) => {
|
|
122
|
-
yargs.option(
|
|
123
|
-
describe:
|
|
124
|
-
type:
|
|
122
|
+
yargs.option("no-svg", {
|
|
123
|
+
describe: "Skips copying svgs. Default is false",
|
|
124
|
+
type: "boolean",
|
|
125
125
|
default: true,
|
|
126
126
|
});
|
|
127
|
-
yargs.option(
|
|
128
|
-
describe:
|
|
129
|
-
type:
|
|
127
|
+
yargs.option("no-styles", {
|
|
128
|
+
describe: "Skips copying styles. Default is false",
|
|
129
|
+
type: "boolean",
|
|
130
130
|
default: true,
|
|
131
131
|
});
|
|
132
132
|
},
|
|
@@ -140,32 +140,32 @@ require('yargs') // eslint-disable-line
|
|
|
140
140
|
}
|
|
141
141
|
)
|
|
142
142
|
.command(
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
"gen",
|
|
144
|
+
"Generates all imports",
|
|
145
145
|
() => {},
|
|
146
146
|
async () => {
|
|
147
147
|
await generateTopLevel();
|
|
148
148
|
}
|
|
149
149
|
)
|
|
150
150
|
.command(
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
"clean",
|
|
152
|
+
"Cleans all imports",
|
|
153
153
|
() => {},
|
|
154
154
|
async () => {
|
|
155
155
|
await cleanTopLevel();
|
|
156
156
|
}
|
|
157
157
|
)
|
|
158
158
|
.command(
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
"verify",
|
|
160
|
+
"Verifies that build is not broken and there are no unchecked files",
|
|
161
161
|
() => {},
|
|
162
162
|
async () => {
|
|
163
163
|
await verifyBuild();
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
|
-
.option(
|
|
167
|
-
alias:
|
|
168
|
-
type:
|
|
166
|
+
.option("verbose", {
|
|
167
|
+
alias: "v",
|
|
168
|
+
type: "boolean",
|
|
169
169
|
})
|
|
170
170
|
.demandCommand(1)
|
|
171
171
|
.help().argv;
|
package/scripts/jekyll-config.js
CHANGED
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* Updates the Jekyll front matter defaults with the current skin package version from NPM.
|
|
4
4
|
*/
|
|
5
|
-
const fs = require(
|
|
6
|
-
const files = [
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
const files = ["./docs/_config.yml"];
|
|
7
7
|
|
|
8
8
|
files.forEach((file) => {
|
|
9
9
|
const newContents = fs
|
|
10
|
-
.readFileSync(file,
|
|
11
|
-
.replace(
|
|
10
|
+
.readFileSync(file, "utf8")
|
|
11
|
+
.replace(
|
|
12
|
+
/version\:.*\n/gi,
|
|
13
|
+
`version: ${process.env.npm_package_version}\n`
|
|
14
|
+
);
|
|
12
15
|
|
|
13
|
-
fs.writeFile(file, newContents,
|
|
16
|
+
fs.writeFile(file, newContents, "utf8", (err) => {
|
|
14
17
|
if (err) {
|
|
15
18
|
return console.log(err);
|
|
16
19
|
}
|
package/scripts/log.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
const winston = require(
|
|
1
|
+
const winston = require("winston");
|
|
2
2
|
|
|
3
3
|
module.exports = winston.createLogger({
|
|
4
|
-
level:
|
|
4
|
+
level: "debug",
|
|
5
5
|
format: winston.format.combine(
|
|
6
6
|
winston.format.splat(),
|
|
7
7
|
winston.format.simple(),
|
|
8
8
|
winston.format.colorize(),
|
|
9
9
|
winston.format.json()
|
|
10
10
|
),
|
|
11
|
-
transports: [
|
|
11
|
+
transports: [
|
|
12
|
+
new winston.transports.Console({ format: winston.format.simple() }),
|
|
13
|
+
],
|
|
12
14
|
});
|
package/scripts/split-icon.js
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
|
-
|
|
4
|
-
const fs = require(
|
|
5
|
-
const path = require(
|
|
3
|
+
"use strict";
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
6
|
const currentDir = path.dirname(__dirname);
|
|
7
|
-
const svgDir = path.resolve(currentDir,
|
|
8
|
-
const { optimize } = require(
|
|
9
|
-
const jsdom = require(
|
|
7
|
+
const svgDir = path.resolve(currentDir, "src", "svg");
|
|
8
|
+
const { optimize } = require("svgo");
|
|
9
|
+
const jsdom = require("jsdom");
|
|
10
10
|
const { JSDOM } = jsdom;
|
|
11
|
-
const svgConfig = require(
|
|
12
|
-
const { html2xhtml2 } = require(
|
|
11
|
+
const svgConfig = require("./svgo.config");
|
|
12
|
+
const { html2xhtml2 } = require("./util");
|
|
13
13
|
|
|
14
14
|
async function splitter(file, argv) {
|
|
15
|
-
const skinFile = await fs.promises.readFile(
|
|
15
|
+
const skinFile = await fs.promises.readFile(
|
|
16
|
+
path.resolve(svgDir, `${file}.svg`),
|
|
17
|
+
"utf8"
|
|
18
|
+
);
|
|
16
19
|
|
|
17
20
|
const symbols = JSDOM.fragment(skinFile);
|
|
18
21
|
|
|
19
|
-
for (const symbol of symbols.querySelectorAll(
|
|
20
|
-
const symbolId = symbol.getAttribute(
|
|
21
|
-
symbol.removeAttribute(
|
|
22
|
-
symbol.setAttribute(
|
|
22
|
+
for (const symbol of symbols.querySelectorAll("symbol")) {
|
|
23
|
+
const symbolId = symbol.getAttribute("id");
|
|
24
|
+
symbol.removeAttribute("id");
|
|
25
|
+
symbol.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
23
26
|
|
|
24
27
|
await fs.promises.writeFile(
|
|
25
|
-
path.resolve(svgDir,
|
|
26
|
-
html2xhtml2(symbol)
|
|
28
|
+
path.resolve(svgDir, "icon", `${symbolId}.svg`),
|
|
29
|
+
html2xhtml2(symbol)
|
|
30
|
+
.replace("<symbol", "<svg")
|
|
31
|
+
.replace("</symbol>", "</svg>")
|
|
27
32
|
);
|
|
28
33
|
}
|
|
29
34
|
}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
const fs = require(
|
|
2
|
-
const path = require(
|
|
3
|
-
const { rawSvgToHtml } = require(
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const { rawSvgToHtml } = require("../util");
|
|
4
4
|
|
|
5
|
-
const SVG_ICONS_FILE = path.join(
|
|
6
|
-
|
|
5
|
+
const SVG_ICONS_FILE = path.join(
|
|
6
|
+
__dirname,
|
|
7
|
+
"..",
|
|
8
|
+
"..",
|
|
9
|
+
"src",
|
|
10
|
+
"svg",
|
|
11
|
+
"icons.svg"
|
|
12
|
+
);
|
|
13
|
+
const CUSTOM_STYLES_FILE = path.join(
|
|
14
|
+
__dirname,
|
|
15
|
+
"..",
|
|
16
|
+
"..",
|
|
17
|
+
"docs",
|
|
18
|
+
"custom-styles.html"
|
|
19
|
+
);
|
|
7
20
|
|
|
8
|
-
const STORYBOOK_HEADER_FILE = path.join(
|
|
21
|
+
const STORYBOOK_HEADER_FILE = path.join(
|
|
22
|
+
__dirname,
|
|
23
|
+
"..",
|
|
24
|
+
"..",
|
|
25
|
+
".storybook",
|
|
26
|
+
"preview-head.html"
|
|
27
|
+
);
|
|
9
28
|
|
|
10
29
|
function copySVGIcons() {
|
|
11
|
-
const svgIconsContent = fs.readFileSync(SVG_ICONS_FILE,
|
|
30
|
+
const svgIconsContent = fs.readFileSync(SVG_ICONS_FILE, "utf8");
|
|
12
31
|
const storyBookSvgIconsContent = `
|
|
13
32
|
<!-- This is auto-generated content from npm script -->
|
|
14
33
|
${rawSvgToHtml(svgIconsContent)}
|
|
15
34
|
`;
|
|
16
35
|
|
|
17
|
-
fs.writeFileSync(STORYBOOK_HEADER_FILE, storyBookSvgIconsContent,
|
|
36
|
+
fs.writeFileSync(STORYBOOK_HEADER_FILE, storyBookSvgIconsContent, "utf8");
|
|
18
37
|
}
|
|
19
38
|
|
|
20
39
|
function copyCustomStyles() {
|
|
21
|
-
const customStylesContent = fs.readFileSync(CUSTOM_STYLES_FILE,
|
|
22
|
-
fs.appendFileSync(STORYBOOK_HEADER_FILE, customStylesContent,
|
|
40
|
+
const customStylesContent = fs.readFileSync(CUSTOM_STYLES_FILE, "utf8");
|
|
41
|
+
fs.appendFileSync(STORYBOOK_HEADER_FILE, customStylesContent, "utf8");
|
|
23
42
|
}
|
|
24
43
|
|
|
25
44
|
module.exports = { copySVGIcons, copyCustomStyles };
|