@emulsify/core 1.3.1 → 2.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.
Files changed (96) hide show
  1. package/.github/workflows/addtoprojects.yml +1 -1
  2. package/.storybook/main.js +11 -5
  3. package/.storybook/manager.js +1 -2
  4. package/.storybook/preview.js +2 -5
  5. package/.storybook/webpack.config.js +64 -12
  6. package/config/eslintrc.config.json +0 -1
  7. package/config/webpack/loaders.js +11 -3
  8. package/config/webpack/optimizers.js +18 -0
  9. package/config/webpack/plugins.js +52 -12
  10. package/config/webpack/resolves.js +79 -0
  11. package/config/webpack/sdc-loader.js +8 -0
  12. package/config/webpack/webpack.common.js +119 -23
  13. package/package.json +34 -28
  14. package/.history/.github/workflows/addtoprojects_20240130164835.yml +0 -21
  15. package/.history/.github/workflows/addtoprojects_20240607213528.yml +0 -21
  16. package/.history/.github/workflows/contributors_20240130164835.yml +0 -23
  17. package/.history/.github/workflows/contributors_20240607213836.yml +0 -23
  18. package/.history/.husky/commit-msg_20240729171216 +0 -4
  19. package/.history/.husky/commit-msg_20240729172358 +0 -2
  20. package/.history/.husky/pre-commit_20240729171216 +0 -4
  21. package/.history/.husky/pre-commit_20240729172429 +0 -2
  22. package/.history/.releaserc_20240607133550 +0 -11
  23. package/.history/.releaserc_20240607134831 +0 -18
  24. package/.history/.releaserc_20240607135005 +0 -11
  25. package/.history/.storybook/main_20240722083211.js +0 -153
  26. package/.history/.storybook/manager_20240311205454.js +0 -15
  27. package/.history/.storybook/manager_20240607162817.js +0 -15
  28. package/.history/.storybook/preview_20240401184023.js +0 -40
  29. package/.history/.storybook/preview_20240607162826.js +0 -40
  30. package/.history/.storybook/preview_20240610083720.js +0 -37
  31. package/.history/.storybook/preview_20240610083852.js +0 -30
  32. package/.history/.storybook/setupTwig.test_20240228163244.js +0 -33
  33. package/.history/.storybook/setupTwig.test_20240607163045.js +0 -33
  34. package/.history/.storybook/setupTwig_20240326081425.js +0 -59
  35. package/.history/.storybook/setupTwig_20240607163001.js +0 -43
  36. package/.history/.storybook/setupTwig_20240607163019.js +0 -43
  37. package/.history/README_20240312154948.md +0 -72
  38. package/.history/README_20240607162731.md +0 -94
  39. package/.history/config/a11y.config_20240607110020.js +0 -61
  40. package/.history/config/a11y.config_20240607163052.js +0 -61
  41. package/.history/config/a11y.config_20240607163120.js +0 -61
  42. package/.history/config/webpack/css/style_20240228152007.js +0 -1
  43. package/.history/config/webpack/css/style_20240607163238.js +0 -1
  44. package/.history/config/webpack/css_20240317194751.js +0 -1
  45. package/.history/config/webpack/css_20240607163108.js +0 -1
  46. package/.history/config/webpack/css_20240607163132.js +0 -1
  47. package/.history/config/webpack/loaders_20240730152304.js +0 -87
  48. package/.history/config/webpack/loaders_20240730152315.js +0 -87
  49. package/.history/config/webpack/loaders_20240731075844.js +0 -87
  50. package/.history/config/webpack/loaders_20240806083911.js +0 -88
  51. package/.history/config/webpack/loaders_20240806084032.js +0 -88
  52. package/.history/config/webpack/plugins_20240730152746.js +0 -77
  53. package/.history/config/webpack/plugins_20240730152818.js +0 -76
  54. package/.history/config/webpack/plugins_20240730153144.js +0 -76
  55. package/.history/config/webpack/plugins_20240730153215.js +0 -76
  56. package/.history/config/webpack/plugins_20240731075839.js +0 -48
  57. package/.history/config/webpack/svgSprite_20240401184053.js +0 -5
  58. package/.history/config/webpack/svgSprite_20240607163207.js +0 -5
  59. package/.history/config/webpack/webpack.common_20240730152548.js +0 -74
  60. package/.history/config/webpack/webpack.common_20240730152652.js +0 -76
  61. package/.history/config/webpack/webpack.common_20240731075910.js +0 -72
  62. package/.history/package-lock_20240722091648.json +0 -34023
  63. package/.history/package-lock_20240729171049.json +0 -34023
  64. package/.history/package-lock_20240729171107.json +0 -34023
  65. package/.history/package-lock_20240729171136.json +0 -34023
  66. package/.history/package_20240722085509.json +0 -135
  67. package/.history/package_20240722085523.json +0 -135
  68. package/.history/package_20240722085530.json +0 -135
  69. package/.history/package_20240722085550.json +0 -135
  70. package/.history/package_20240722085556.json +0 -135
  71. package/.history/package_20240722085606.json +0 -135
  72. package/.history/package_20240722091526.json +0 -135
  73. package/.history/package_20240722091548.json +0 -135
  74. package/.history/package_20240729171200.json +0 -135
  75. package/.history/package_20240729171707.json +0 -135
  76. package/.history/package_20240729171737.json +0 -135
  77. package/.history/package_20240729171750.json +0 -135
  78. package/.history/package_20240729171809.json +0 -135
  79. package/.history/package_20240729171834.json +0 -135
  80. package/.history/package_20240729171854.json +0 -135
  81. package/.history/package_20240729172054.json +0 -135
  82. package/.history/package_20240729172133.json +0 -135
  83. package/.history/package_20240729174630.json +0 -135
  84. package/.history/package_20240730153116.json +0 -136
  85. package/.history/package_20240806081212.json +0 -135
  86. package/.history/package_20240806081229.json +0 -135
  87. package/.history/package_20240806081258.json +0 -135
  88. package/.history/package_20240806081538.json +0 -135
  89. package/.history/package_20240806082035.json +0 -135
  90. package/.history/package_20240806082121.json +0 -135
  91. package/.history/package_20240806082142.json +0 -135
  92. package/.history/package_20240806082313.json +0 -135
  93. package/.history/package_20240806082418.json +0 -135
  94. package/.history/package_20240806083920.json +0 -135
  95. package/config/webpack/css/style.js +0 -1
  96. package/config/webpack/css.js +0 -1
@@ -1,5 +0,0 @@
1
- function requireAll(r) {
2
- r.keys().forEach(r);
3
- }
4
-
5
- requireAll(require.context('../../../../assets/icons/', true, /\.svg$/));
@@ -1,5 +0,0 @@
1
- function requireAll(r) {
2
- r.keys().forEach(r);
3
- }
4
-
5
- requireAll(require.context('../../../../../assets/icons/', true, /\.svg$/));
@@ -1,74 +0,0 @@
1
- const path = require('path');
2
- const glob = require('glob');
3
- const loaders = require('./loaders');
4
- const plugins = require('./plugins');
5
-
6
- const webpackDir = path.resolve(__dirname);
7
- const rootDir = path.resolve(__dirname, '../../../../..');
8
- const distDir = path.resolve(__dirname, '../../../../../dist');
9
-
10
- // Glob pattern for scss files that ignore file names prefixed with underscore.
11
- const scssPattern = path.resolve(rootDir, 'components/**/!(_*).scss');
12
- // Glob pattern for JS files.
13
- const jsPattern = path.resolve(
14
- rootDir,
15
- 'components/**/!(*.stories|*.component|*.min|*.test).js',
16
- );
17
-
18
- // Prepare list of scss and js file for "entry".
19
- function getEntries(scssMatcher, jsMatcher) {
20
- const entries = {};
21
-
22
- // SCSS entries
23
- glob.sync(scssMatcher).forEach((file) => {
24
- const filePath = file.split('components/')[1];
25
- const newfilePath = `css/${filePath.replace('.scss', '')}`;
26
- entries[newfilePath] = file;
27
- });
28
-
29
- // JS entries
30
- glob.sync(jsMatcher).forEach((file) => {
31
- const filePath = file.split('components/')[1];
32
- const newfilePath = `js/${filePath.replace('.js', '')}`;
33
- entries[newfilePath] = file;
34
- });
35
-
36
- entries.svgSprite = path.resolve(webpackDir, 'svgSprite.js');
37
-
38
- // CSS Files.
39
- glob.sync(`${webpackDir}/css/*js`).forEach((file) => {
40
- const baseFileName = path.basename(file);
41
- const newfilePath = `css/${baseFileName.replace('.js', '')}`;
42
- entries[newfilePath] = file;
43
- });
44
-
45
- return entries;
46
- }
47
-
48
- module.exports = {
49
- stats: {
50
- errorDetails: true,
51
- },
52
- entry: getEntries(scssPattern, jsPattern),
53
- module: {
54
- rules: [
55
- loaders.CSSLoader,
56
- loaders.SVGSpriteLoader,
57
- loaders.ImageLoader,
58
- loaders.JSLoader,
59
- ],
60
- },
61
- plugins: [
62
- plugins.MiniCssExtractPlugin,
63
- plugins.SpriteLoaderPlugin,
64
- plugins.ProgressPlugin,
65
- plugins.CleanWebpackPlugin,
66
- ],
67
- optimization: [
68
- plugins.ImageminPlugin,
69
- ],
70
- output: {
71
- path: distDir,
72
- filename: '[name].js',
73
- },
74
- };
@@ -1,76 +0,0 @@
1
- const path = require('path');
2
- const glob = require('glob');
3
- const loaders = require('./loaders');
4
- const plugins = require('./plugins');
5
-
6
- const webpackDir = path.resolve(__dirname);
7
- const rootDir = path.resolve(__dirname, '../../../../..');
8
- const distDir = path.resolve(__dirname, '../../../../../dist');
9
-
10
- // Glob pattern for scss files that ignore file names prefixed with underscore.
11
- const scssPattern = path.resolve(rootDir, 'components/**/!(_*).scss');
12
- // Glob pattern for JS files.
13
- const jsPattern = path.resolve(
14
- rootDir,
15
- 'components/**/!(*.stories|*.component|*.min|*.test).js',
16
- );
17
-
18
- // Prepare list of scss and js file for "entry".
19
- function getEntries(scssMatcher, jsMatcher) {
20
- const entries = {};
21
-
22
- // SCSS entries
23
- glob.sync(scssMatcher).forEach((file) => {
24
- const filePath = file.split('components/')[1];
25
- const newfilePath = `css/${filePath.replace('.scss', '')}`;
26
- entries[newfilePath] = file;
27
- });
28
-
29
- // JS entries
30
- glob.sync(jsMatcher).forEach((file) => {
31
- const filePath = file.split('components/')[1];
32
- const newfilePath = `js/${filePath.replace('.js', '')}`;
33
- entries[newfilePath] = file;
34
- });
35
-
36
- entries.svgSprite = path.resolve(webpackDir, 'svgSprite.js');
37
-
38
- // CSS Files.
39
- glob.sync(`${webpackDir}/css/*js`).forEach((file) => {
40
- const baseFileName = path.basename(file);
41
- const newfilePath = `css/${baseFileName.replace('.js', '')}`;
42
- entries[newfilePath] = file;
43
- });
44
-
45
- return entries;
46
- }
47
-
48
- module.exports = {
49
- stats: {
50
- errorDetails: true,
51
- },
52
- entry: getEntries(scssPattern, jsPattern),
53
- module: {
54
- rules: [
55
- loaders.CSSLoader,
56
- loaders.SVGSpriteLoader,
57
- loaders.ImageLoader,
58
- loaders.JSLoader,
59
- ],
60
- },
61
- plugins: [
62
- plugins.MiniCssExtractPlugin,
63
- plugins.SpriteLoaderPlugin,
64
- plugins.ProgressPlugin,
65
- plugins.CleanWebpackPlugin,
66
- ],
67
- optimization: {
68
- minimizer: [
69
- plugins.ImageminPlugin
70
- ]
71
- },
72
- output: {
73
- path: distDir,
74
- filename: '[name].js',
75
- },
76
- };
@@ -1,72 +0,0 @@
1
- const path = require('path');
2
- const glob = require('glob');
3
- const loaders = require('./loaders');
4
- const plugins = require('./plugins');
5
-
6
- const webpackDir = path.resolve(__dirname);
7
- const rootDir = path.resolve(__dirname, '../../../../..');
8
- const distDir = path.resolve(__dirname, '../../../../../dist');
9
-
10
- // Glob pattern for scss files that ignore file names prefixed with underscore.
11
- const scssPattern = path.resolve(rootDir, 'components/**/!(_*).scss');
12
- // Glob pattern for JS files.
13
- const jsPattern = path.resolve(
14
- rootDir,
15
- 'components/**/!(*.stories|*.component|*.min|*.test).js',
16
- );
17
-
18
- // Prepare list of scss and js file for "entry".
19
- function getEntries(scssMatcher, jsMatcher) {
20
- const entries = {};
21
-
22
- // SCSS entries
23
- glob.sync(scssMatcher).forEach((file) => {
24
- const filePath = file.split('components/')[1];
25
- const newfilePath = `css/${filePath.replace('.scss', '')}`;
26
- entries[newfilePath] = file;
27
- });
28
-
29
- // JS entries
30
- glob.sync(jsMatcher).forEach((file) => {
31
- const filePath = file.split('components/')[1];
32
- const newfilePath = `js/${filePath.replace('.js', '')}`;
33
- entries[newfilePath] = file;
34
- });
35
-
36
- entries.svgSprite = path.resolve(webpackDir, 'svgSprite.js');
37
-
38
- // CSS Files.
39
- glob.sync(`${webpackDir}/css/*js`).forEach((file) => {
40
- const baseFileName = path.basename(file);
41
- const newfilePath = `css/${baseFileName.replace('.js', '')}`;
42
- entries[newfilePath] = file;
43
- });
44
-
45
- return entries;
46
- }
47
-
48
- module.exports = {
49
- stats: {
50
- errorDetails: true,
51
- },
52
- entry: getEntries(scssPattern, jsPattern),
53
- module: {
54
- rules: [
55
- loaders.CSSLoader,
56
- loaders.SVGSpriteLoader,
57
- loaders.ImageLoader,
58
- loaders.JSLoader,
59
- ],
60
- },
61
- plugins: [
62
- plugins.MiniCssExtractPlugin,
63
- plugins.ImageminPlugin,
64
- plugins.SpriteLoaderPlugin,
65
- plugins.ProgressPlugin,
66
- plugins.CleanWebpackPlugin,
67
- ],
68
- output: {
69
- path: distDir,
70
- filename: '[name].js',
71
- },
72
- };