@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,33 +0,0 @@
1
- jest.mock('path', () => ({
2
- resolve: (...paths) => `${paths[1]}${paths[2]}`,
3
- }));
4
- jest.mock('twig-drupal-filters', () => jest.fn());
5
- jest.mock('bem-twig-extension', () => jest.fn());
6
- jest.mock('add-attributes-twig-extension', () => jest.fn());
7
-
8
- import Twig from 'twig';
9
- import twigDrupal from 'twig-drupal-filters';
10
- import twigBEM from 'bem-twig-extension';
11
- import twigAddAttributes from 'add-attributes-twig-extension';
12
-
13
- import { namespaces, setupTwig } from './setupTwig';
14
-
15
- describe('setupTwig', () => {
16
- it('sets up a twig object with drupal, bem, and attribute decorations', () => {
17
- expect.assertions(3);
18
- setupTwig(Twig);
19
- expect(twigDrupal).toHaveBeenCalledWith(Twig);
20
- expect(twigBEM).toHaveBeenCalledWith(Twig);
21
- expect(twigAddAttributes).toHaveBeenCalledWith(Twig);
22
- });
23
-
24
- it('exports emulsifys namespaces', () => {
25
- expect(namespaces).toEqual({
26
- base: '../../../../components/00-base',
27
- atoms: '../../../../components/01-atoms',
28
- molecules: '../../../../components/02-molecules',
29
- organisms: '../../../../components/03-organisms',
30
- templates: '../../../../components/04-templates',
31
- });
32
- });
33
- });
@@ -1,59 +0,0 @@
1
- const { resolve } = require('path');
2
- const twigDrupal = require('twig-drupal-filters');
3
- const twigBEM = require('bem-twig-extension');
4
- const twigAddAttributes = require('add-attributes-twig-extension');
5
-
6
- /**
7
- * Fetches project-based variant configuration. If no such configuration
8
- * exists, returns default values.
9
- *
10
- * @returns project-based variant configuration, or default config.
11
- */
12
- const fetchVariantConfig = () => {
13
- try {
14
- return require('../../../project.emulsify.json').variant.structureImplementations;
15
- } catch (e) {
16
- return [
17
- {
18
- name: 'base',
19
- directory: '../../components/00-base',
20
- },
21
- {
22
- name: 'atoms',
23
- directory: '../../components/01-atoms',
24
- },
25
- {
26
- name: 'molecules',
27
- directory: '../../components/02-molecules',
28
- },
29
- {
30
- name: 'organisms',
31
- directory: '../../components/03-organisms',
32
- },
33
- {
34
- name: 'templates',
35
- directory: '../../components/04-templates',
36
- },
37
- ];
38
- }
39
- };
40
-
41
- module.exports.namespaces = {};
42
- for (const { name, directory } of fetchVariantConfig()) {
43
- module.exports.namespaces[name] = resolve(__dirname, '../../../', directory);
44
- }
45
-
46
- /**
47
- * Configures and extends a standard twig object.
48
- *
49
- * @param {Twig} twig - twig object that should be configured and extended.
50
- *
51
- * @returns {Twig} configured twig object.
52
- */
53
- module.exports.setupTwig = function setupTwig(twig) {
54
- twig.cache();
55
- twigDrupal(twig);
56
- twigBEM(twig);
57
- twigAddAttributes(twig);
58
- return twig;
59
- };
@@ -1,43 +0,0 @@
1
- const { resolve } = require('path');
2
- const twigDrupal = require('twig-drupal-filters');
3
- const twigBEM = require('bem-twig-extension');
4
- const twigAddAttributes = require('add-attributes-twig-extension');
5
-
6
- /**
7
- * Fetches project-based variant configuration. If no such configuration
8
- * exists, returns default values as a flat component structure.
9
- *
10
- * @returns project-based variant configuration, or default config.
11
- */
12
- const fetchVariantConfig = () => {
13
- try {
14
- return require('../../../../project.emulsify.json').variant.structureImplementations;
15
- } catch (e) {
16
- return [
17
- {
18
- name: 'components',
19
- directory: '../../../../components',
20
- },
21
- ];
22
- }
23
- };
24
-
25
- module.exports.namespaces = {};
26
- for (const { name, directory } of fetchVariantConfig()) {
27
- module.exports.namespaces[name] = resolve(__dirname, '../../../', directory);
28
- }
29
-
30
- /**
31
- * Configures and extends a standard twig object.
32
- *
33
- * @param {Twig} twig - twig object that should be configured and extended.
34
- *
35
- * @returns {Twig} configured twig object.
36
- */
37
- module.exports.setupTwig = function setupTwig(twig) {
38
- twig.cache();
39
- twigDrupal(twig);
40
- twigBEM(twig);
41
- twigAddAttributes(twig);
42
- return twig;
43
- };
@@ -1,43 +0,0 @@
1
- const { resolve } = require('path');
2
- const twigDrupal = require('twig-drupal-filters');
3
- const twigBEM = require('bem-twig-extension');
4
- const twigAddAttributes = require('add-attributes-twig-extension');
5
-
6
- /**
7
- * Fetches project-based variant configuration. If no such configuration
8
- * exists, returns default values as a flat component structure.
9
- *
10
- * @returns project-based variant configuration, or default config.
11
- */
12
- const fetchVariantConfig = () => {
13
- try {
14
- return require('../../../../project.emulsify.json').variant.structureImplementations;
15
- } catch (e) {
16
- return [
17
- {
18
- name: 'components',
19
- directory: '../../../../components',
20
- },
21
- ];
22
- }
23
- };
24
-
25
- module.exports.namespaces = {};
26
- for (const { name, directory } of fetchVariantConfig()) {
27
- module.exports.namespaces[name] = resolve(__dirname, '../../../../', directory);
28
- }
29
-
30
- /**
31
- * Configures and extends a standard twig object.
32
- *
33
- * @param {Twig} twig - twig object that should be configured and extended.
34
- *
35
- * @returns {Twig} configured twig object.
36
- */
37
- module.exports.setupTwig = function setupTwig(twig) {
38
- twig.cache();
39
- twigDrupal(twig);
40
- twigBEM(twig);
41
- twigAddAttributes(twig);
42
- return twig;
43
- };
@@ -1,72 +0,0 @@
1
- > [!WARNING]
2
- > Work in progress.
3
-
4
- ![Emulsify Core Design System](https://github.com/emulsify-ds/.github/blob/6bd435be881bd820bddfa05d88905efe29176a0a/assets/images/header.png)
5
-
6
- # Emulsify Core
7
-
8
- An open-source toolset for creating and implementing design systems.
9
-
10
- ### Storybook development and Webpack build
11
-
12
- **Emulsify Core** provides a [Storybook](https://storybook.js.org/) component library and a [Webpack](https://webpack.js.org/) development environment. It is meant to make project setup and ongoing development easier by bundling all necessary configuration and providing it as an extendable package for your theme or standalone project.
13
-
14
- ## Documentation
15
-
16
- [docs.emulsify.info](https://emulsify.info/docs)
17
-
18
- ### Quick Links
19
-
20
- 1. [Installation](https://www.emulsify.info/docs/emulsify-drupal)
21
- 2. [Usage](https://www.emulsify.info/docs/emulsify-drupal/basic-usage/commands)
22
-
23
- ## Demo
24
-
25
- 1. [Storybook](http://storybook.emulsify.info/)
26
-
27
- ## Contributing
28
-
29
- ### [Code of Conduct](https://github.com/emulsify-ds/emulsify-drupal/blob/master/CODE_OF_CONDUCT.md)
30
-
31
- The project maintainers have adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
32
-
33
- ### Contribution Guide
34
-
35
- Please also follow the issue template and pull request templates provided. See below for the correct places to post issues:
36
-
37
- 1. [Emulsify Drupal](https://github.com/emulsify-ds/emulsify-drupal/issues)
38
- 2. [Emulsify Twig Extensions](https://github.com/emulsify-ds/emulsify-twig-extensions/issues)
39
- 3. [Emulsify Tools (Drupal module)](https://www.drupal.org/project/issues/emulsify_tools)
40
-
41
- ### Committing Changes
42
-
43
- To facilitate automatic semantic release versioning, we utilize the [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog) standard through Commitizen. Follow these steps when commiting your work to ensure semantic release can version correctly.
44
-
45
- 1. Stage your changes, ensuring they encompass exactly what you wish to change, no more.
46
- 2. Run the `commit` script via `yarn commit` or `npm run commit` and follow the prompts to craft the perfect commit message.
47
- 3. Your commit message will be used to create the changelog for the next version that includes that commit.
48
-
49
- ## Author
50
-
51
- Emulsify® is a product of [Four Kitchens](https://fourkitchens.com).
52
-
53
- ### Contributors
54
-
55
- <table>
56
- <tr>
57
- <td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
58
- <a href=https://github.com/callinmullaney>
59
- <img src=https://avatars.githubusercontent.com/u/369018?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Callin Mullaney/>
60
- <br />
61
- <sub style="font-size:14px"><b>Callin Mullaney</b></sub>
62
- </a>
63
- </td>
64
- <td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
65
- <a href=https://github.com/amazingrando>
66
- <img src=https://avatars.githubusercontent.com/u/409903?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Randy Oest/>
67
- <br />
68
- <sub style="font-size:14px"><b>Randy Oest</b></sub>
69
- </a>
70
- </td>
71
- </tr>
72
- </table>
@@ -1,94 +0,0 @@
1
- ![Emulsify Core Design System](https://github.com/emulsify-ds/.github/blob/6bd435be881bd820bddfa05d88905efe29176a0a/assets/images/header.png)
2
-
3
- # Emulsify Core
4
-
5
- An open-source toolset for creating and implementing design systems.
6
-
7
- **Emulsify Core** provides a [Storybook](https://storybook.js.org/) component library and a [Webpack](https://webpack.js.org/) development environment. It is meant to make project setup and ongoing development easier by bundling all necessary configuration and providing it as an extendable package for your theme or standalone project.
8
-
9
- ## Installation and usage
10
- Installation and configuration is setup by the provided base theme project(s). As of this writing, Emulsify Drupal is the only base theme project [with this integration](https://github.com/emulsify-ds/emulsify-drupal/blob/main/whisk/package.json#L36).
11
-
12
- ### Manual installation
13
- - `npm install @emulsify/core` within your repository or project theme.
14
- - Copy the provided `npm run` scripts from [Emulsify Drupal's package.json](https://github.com/emulsify-ds/emulsify-drupal/blob/main/whisk/package.json#L15)
15
- - Copy the contents of `whisk/config/emulsify-core/` from [Emulsify Drupal](https://github.com/emulsify-ds/emulsify-drupal/tree/main/whisk/config/emulsify-core) into your project so `config/` exists at the root of your repository or project theme. The files within `config/` allow you to extend or overwrite configuration provided by Emulsify Core.
16
-
17
- ### Common Scripts
18
-
19
- Run `nvm use` prior to running any of the following commands to verify you are using Node 20.
20
- (Each is prefixed with `npm run `)
21
-
22
- **develop**
23
- Starts and instance of storybook, watches for any files changes, recompiles CSS/JS, and live reloads storybook assets.
24
-
25
- **lint**
26
- Lints all JS/SCSS within your components and reports any violations.
27
-
28
- **lint-fix**
29
- Automatically fixes any simple violations.
30
-
31
- **prettier**
32
- Outputs any code formatting violations.
33
-
34
- **prettier-fix**
35
- Automatically fixes any simple code formatting violations.
36
-
37
- **storybook-build**
38
- Builds a static output of the storybook instance.
39
-
40
-
41
- ### Quick Links
42
-
43
- - [Emulsify Homepage](https://www.emulsify.info/)
44
-
45
- ## Demo
46
-
47
- 1. [Storybook](http://storybook.emulsify.info/)
48
-
49
- ## Contributing
50
-
51
- ### [Code of Conduct](https://github.com/emulsify-ds/emulsify-drupal/blob/master/CODE_OF_CONDUCT.md)
52
-
53
- The project maintainers have adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
54
-
55
- ### Contribution Guide
56
-
57
- Please also follow the issue template and pull request templates provided. See below for the correct places to post issues:
58
-
59
- 1. [Emulsify Drupal](https://github.com/emulsify-ds/emulsify-drupal/issues)
60
- 2. [Emulsify Twig Extensions](https://github.com/emulsify-ds/emulsify-twig-extensions/issues)
61
- 3. [Emulsify Tools (Drupal module)](https://www.drupal.org/project/issues/emulsify_tools)
62
-
63
- ### Committing Changes
64
-
65
- To facilitate automatic semantic release versioning, we utilize the [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog) standard through Commitizen. Follow these steps when commiting your work to ensure semantic release can version correctly.
66
-
67
- 1. Stage your changes, ensuring they encompass exactly what you wish to change, no more.
68
- 2. Run the `commit` script via `yarn commit` or `npm run commit` and follow the prompts to craft the perfect commit message.
69
- 3. Your commit message will be used to create the changelog for the next version that includes that commit.
70
-
71
- ## Author
72
-
73
- Emulsify&reg; is a product of [Four Kitchens](https://fourkitchens.com).
74
-
75
- ### Contributors
76
-
77
- <table>
78
- <tr>
79
- <td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
80
- <a href=https://github.com/callinmullaney>
81
- <img src=https://avatars.githubusercontent.com/u/369018?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Callin Mullaney/>
82
- <br />
83
- <sub style="font-size:14px"><b>Callin Mullaney</b></sub>
84
- </a>
85
- </td>
86
- <td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
87
- <a href=https://github.com/amazingrando>
88
- <img src=https://avatars.githubusercontent.com/u/409903?v=4 width="100;" style="border-radius:50%;align-items:center;justify-content:center;overflow:hidden;padding-top:10px" alt=Randy Oest/>
89
- <br />
90
- <sub style="font-size:14px"><b>Randy Oest</b></sub>
91
- </a>
92
- </td>
93
- </tr>
94
- </table>
@@ -1,61 +0,0 @@
1
- module.exports = {
2
- storybookBuildDir: '../../../.out',
3
- pa11y: {
4
- includeNotices: false,
5
- includeWarnings: false,
6
- runners: ['axe'],
7
- },
8
- // A11y linting is done on a component-by-component
9
- // basis, which results in the linter reporting some errors that
10
- // should be ignored. These codes and descriptions allow for those
11
- // errors to be targeted specifically.
12
- ignore: {
13
- codes: ['landmark-one-main', 'page-has-heading-one'],
14
- descriptions: ['Ensures all page content is contained by landmarks'],
15
- },
16
- // List of storybook component IDs defined and used in this project.
17
- components: [
18
- 'base-colors--palettes',
19
- 'base-motion--usage',
20
- 'atoms-button--twig',
21
- 'atoms-button--twig-alt',
22
- 'atoms-forms--checkboxes',
23
- 'atoms-forms--radio-buttons',
24
- 'atoms-forms--select-dropdowns',
25
- 'atoms-forms--textfields-examples',
26
- 'atoms-images--images',
27
- 'atoms-images--figures',
28
- 'atoms-images--icons',
29
- 'atoms-links--links',
30
- 'atoms-lists--definition-list',
31
- 'atoms-lists--unordered-list',
32
- 'atoms-lists--ordered-list',
33
- 'atoms-tables--table',
34
- 'atoms-text--headings-examples',
35
- 'atoms-text--blockquote-example',
36
- 'atoms-text--preformatted',
37
- 'atoms-text--random',
38
- 'atoms-videos--wide',
39
- 'atoms-videos--full',
40
- 'molecules-cards--card-example',
41
- 'molecules-cards--card-with-background',
42
- 'molecules-cta--cta-example',
43
- 'molecules-menus--breadcrumbs',
44
- 'molecules-menus--inline',
45
- 'molecules-menus--main',
46
- 'molecules-menus--social',
47
- 'molecules-menus-pager--pager-example',
48
- 'molecules-status--status-examples',
49
- 'molecules-tabs--js-tabs',
50
- 'organisms-grids--default-grid',
51
- 'organisms-grids--card-grid',
52
- 'organisms-grids--cta-grid',
53
- 'organisms-site--footer',
54
- 'organisms-site--header',
55
- 'templates-layouts--full-width',
56
- 'templates-layouts--with-sidebar',
57
- 'templates-place-holder--place-holder',
58
- 'pages-content-types--article',
59
- 'pages-landing-pages--home',
60
- ],
61
- };
@@ -1,61 +0,0 @@
1
- module.exports = {
2
- storybookBuildDir: '../../../../.out',
3
- pa11y: {
4
- includeNotices: false,
5
- includeWarnings: false,
6
- runners: ['axe'],
7
- },
8
- // A11y linting is done on a component-by-component
9
- // basis, which results in the linter reporting some errors that
10
- // should be ignored. These codes and descriptions allow for those
11
- // errors to be targeted specifically.
12
- ignore: {
13
- codes: ['landmark-one-main', 'page-has-heading-one'],
14
- descriptions: ['Ensures all page content is contained by landmarks'],
15
- },
16
- // List of storybook component IDs defined and used in this project.
17
- components: [
18
- 'base-colors--palettes',
19
- 'base-motion--usage',
20
- 'atoms-button--twig',
21
- 'atoms-button--twig-alt',
22
- 'atoms-forms--checkboxes',
23
- 'atoms-forms--radio-buttons',
24
- 'atoms-forms--select-dropdowns',
25
- 'atoms-forms--textfields-examples',
26
- 'atoms-images--images',
27
- 'atoms-images--figures',
28
- 'atoms-images--icons',
29
- 'atoms-links--links',
30
- 'atoms-lists--definition-list',
31
- 'atoms-lists--unordered-list',
32
- 'atoms-lists--ordered-list',
33
- 'atoms-tables--table',
34
- 'atoms-text--headings-examples',
35
- 'atoms-text--blockquote-example',
36
- 'atoms-text--preformatted',
37
- 'atoms-text--random',
38
- 'atoms-videos--wide',
39
- 'atoms-videos--full',
40
- 'molecules-cards--card-example',
41
- 'molecules-cards--card-with-background',
42
- 'molecules-cta--cta-example',
43
- 'molecules-menus--breadcrumbs',
44
- 'molecules-menus--inline',
45
- 'molecules-menus--main',
46
- 'molecules-menus--social',
47
- 'molecules-menus-pager--pager-example',
48
- 'molecules-status--status-examples',
49
- 'molecules-tabs--js-tabs',
50
- 'organisms-grids--default-grid',
51
- 'organisms-grids--card-grid',
52
- 'organisms-grids--cta-grid',
53
- 'organisms-site--footer',
54
- 'organisms-site--header',
55
- 'templates-layouts--full-width',
56
- 'templates-layouts--with-sidebar',
57
- 'templates-place-holder--place-holder',
58
- 'pages-content-types--article',
59
- 'pages-landing-pages--home',
60
- ],
61
- };
@@ -1,61 +0,0 @@
1
- module.exports = {
2
- storybookBuildDir: '../../../../.out',
3
- pa11y: {
4
- includeNotices: false,
5
- includeWarnings: false,
6
- runners: ['axe'],
7
- },
8
- // A11y linting is done on a component-by-component
9
- // basis, which results in the linter reporting some errors that
10
- // should be ignored. These codes and descriptions allow for those
11
- // errors to be targeted specifically.
12
- ignore: {
13
- codes: ['landmark-one-main', 'page-has-heading-one'],
14
- descriptions: ['Ensures all page content is contained by landmarks'],
15
- },
16
- // List of storybook component IDs defined and used in this project.
17
- components: [
18
- 'base-colors--palettes',
19
- 'base-motion--usage',
20
- 'atoms-button--twig',
21
- 'atoms-button--twig-alt',
22
- 'atoms-forms--checkboxes',
23
- 'atoms-forms--radio-buttons',
24
- 'atoms-forms--select-dropdowns',
25
- 'atoms-forms--textfields-examples',
26
- 'atoms-images--images',
27
- 'atoms-images--figures',
28
- 'atoms-images--icons',
29
- 'atoms-links--links',
30
- 'atoms-lists--definition-list',
31
- 'atoms-lists--unordered-list',
32
- 'atoms-lists--ordered-list',
33
- 'atoms-tables--table',
34
- 'atoms-text--headings-examples',
35
- 'atoms-text--blockquote-example',
36
- 'atoms-text--preformatted',
37
- 'atoms-text--random',
38
- 'atoms-videos--wide',
39
- 'atoms-videos--full',
40
- 'molecules-cards--card-example',
41
- 'molecules-cards--card-with-background',
42
- 'molecules-cta--cta-example',
43
- 'molecules-menus--breadcrumbs',
44
- 'molecules-menus--inline',
45
- 'molecules-menus--main',
46
- 'molecules-menus--social',
47
- 'molecules-menus-pager--pager-example',
48
- 'molecules-status--status-examples',
49
- 'molecules-tabs--js-tabs',
50
- 'organisms-grids--default-grid',
51
- 'organisms-grids--card-grid',
52
- 'organisms-grids--cta-grid',
53
- 'organisms-site--footer',
54
- 'organisms-site--header',
55
- 'templates-layouts--full-width',
56
- 'templates-layouts--with-sidebar',
57
- 'templates-place-holder--place-holder',
58
- 'pages-content-types--article',
59
- 'pages-landing-pages--home',
60
- ],
61
- };
@@ -1 +0,0 @@
1
- import '../../../../../components/style.scss';
@@ -1 +0,0 @@
1
- import '../../../../../../components/style.scss';
@@ -1 +0,0 @@
1
- import '../../../../components/style.scss';
@@ -1 +0,0 @@
1
- import '../../../../../components/style.scss';
@@ -1 +0,0 @@
1
- import '../../../../../../components/style.scss';
@@ -1,87 +0,0 @@
1
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
2
- const globImporter = require('node-sass-glob-importer');
3
- const fs = require('fs-extra');
4
-
5
- let babelConfig;
6
- let postcssConfig;
7
-
8
- // Check if custom babel config is available.
9
- if (fs.existsSync('./config/babel.config.js')) {
10
- babelConfig = './config/babel.config.js';
11
- } else {
12
- babelConfig = './node_modules/@emulsify/core/config/babel.config.js';
13
- }
14
-
15
- // Check if custom postcss config is available.
16
- if (fs.existsSync('./config/postcss.config.js')) {
17
- postcssConfig = './config/postcss.config.js';
18
- } else {
19
- postcssConfig = './node_modules/@emulsify/core/config/postcss.config.js';
20
- }
21
-
22
- const JSLoader = {
23
- test: /^(?!.*\.(stories|component)\.js$).*\.js$/,
24
- exclude: /node_modules/,
25
- loader: 'babel-loader',
26
- options: {
27
- configFile: babelConfig,
28
- },
29
- };
30
-
31
- const ImageLoader = {
32
- test: /\.(jpe?g|png|gif)$/i,
33
- exclude: /icons\/.*\.svg$/,
34
- loader: 'file-loader',
35
- };
36
-
37
- const CSSLoader = {
38
- test: /\.s[ac]ss$/i,
39
- exclude: /node_modules/,
40
- use: [
41
- MiniCssExtractPlugin.loader,
42
- {
43
- loader: 'css-loader',
44
- options: {
45
- sourceMap: true,
46
- url: false,
47
- },
48
- },
49
- {
50
- loader: 'postcss-loader',
51
- options: {
52
- sourceMap: true,
53
- postcssOptions: {
54
- config: postcssConfig,
55
- plugins: [['autoprefixer']],
56
- },
57
- },
58
- },
59
- {
60
- loader: 'sass-loader',
61
- options: {
62
- sourceMap: true,
63
- sassOptions: {
64
- importer: globImporter(),
65
- outputStyle: 'compressed',
66
- },
67
- },
68
- },
69
- ],
70
- };
71
-
72
- const SVGSpriteLoader = {
73
- test: /icons\/.*\.svg$/, // your icons directory
74
- loader: 'svg-sprite-loader',
75
- options: {
76
- extract: true,
77
- runtimeCompat: true,
78
- spriteFilename: './icons.svg',
79
- },
80
- };
81
-
82
- module.exports = {
83
- JSLoader,
84
- CSSLoader,
85
- SVGSpriteLoader,
86
- ImageLoader,
87
- };