@emulsify/core 0.0.0-development → 1.1.2

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 (54) hide show
  1. package/.github/workflows/addtoprojects.yml +1 -1
  2. package/.github/workflows/contributors.yml +1 -1
  3. package/.history/.github/workflows/addtoprojects_20240130164835.yml +21 -0
  4. package/.history/.github/workflows/addtoprojects_20240607213528.yml +21 -0
  5. package/.history/.github/workflows/contributors_20240130164835.yml +23 -0
  6. package/.history/.github/workflows/contributors_20240607213836.yml +23 -0
  7. package/.history/.storybook/main_20240401184129.js +22 -0
  8. package/.history/.storybook/main_20240607162805.js +22 -0
  9. package/.history/.storybook/main_20240610082738.js +22 -0
  10. package/.history/.storybook/manager_20240311205454.js +15 -0
  11. package/.history/.storybook/manager_20240607162817.js +15 -0
  12. package/.history/.storybook/preview_20240401184023.js +40 -0
  13. package/.history/.storybook/preview_20240607162826.js +40 -0
  14. package/.history/.storybook/preview_20240610083720.js +37 -0
  15. package/.history/.storybook/preview_20240610083852.js +30 -0
  16. package/.history/.storybook/setupTwig.test_20240228163244.js +33 -0
  17. package/.history/.storybook/setupTwig.test_20240607163045.js +33 -0
  18. package/.history/.storybook/setupTwig_20240326081425.js +59 -0
  19. package/.history/.storybook/setupTwig_20240607163001.js +43 -0
  20. package/.history/.storybook/setupTwig_20240607163019.js +43 -0
  21. package/.history/README_20240312154948.md +72 -0
  22. package/.history/README_20240607162731.md +94 -0
  23. package/.history/config/a11y.config_20240607110020.js +61 -0
  24. package/.history/config/a11y.config_20240607163052.js +61 -0
  25. package/.history/config/a11y.config_20240607163120.js +61 -0
  26. package/.history/config/webpack/css/style_20240228152007.js +1 -0
  27. package/.history/config/webpack/css/style_20240607163238.js +1 -0
  28. package/.history/config/webpack/css_20240317194751.js +1 -0
  29. package/.history/config/webpack/css_20240607163108.js +1 -0
  30. package/.history/config/webpack/css_20240607163132.js +1 -0
  31. package/.history/config/webpack/loaders_20240401184511.js +87 -0
  32. package/.history/config/webpack/loaders_20240610084138.js +87 -0
  33. package/.history/config/webpack/plugins_20240401184104.js +48 -0
  34. package/.history/config/webpack/plugins_20240607163148.js +48 -0
  35. package/.history/config/webpack/svgSprite_20240401184053.js +5 -0
  36. package/.history/config/webpack/svgSprite_20240607163207.js +5 -0
  37. package/.history/config/webpack/webpack.common_20240607090919.js +72 -0
  38. package/.history/config/webpack/webpack.common_20240607163224.js +72 -0
  39. package/.history/package_20240607155640.json +136 -0
  40. package/.history/package_20240607163353.json +135 -0
  41. package/.storybook/main.js +6 -6
  42. package/.storybook/manager.js +1 -1
  43. package/.storybook/preview.js +2 -12
  44. package/.storybook/setupTwig.js +5 -21
  45. package/.storybook/setupTwig.test.js +5 -5
  46. package/README.md +31 -9
  47. package/config/a11y.config.js +1 -1
  48. package/config/webpack/css/style.js +1 -1
  49. package/config/webpack/css.js +1 -1
  50. package/config/webpack/loaders.js +2 -2
  51. package/config/webpack/plugins.js +1 -1
  52. package/config/webpack/svgSprite.js +1 -1
  53. package/config/webpack/webpack.common.js +2 -2
  54. package/package.json +5 -6
@@ -0,0 +1,72 @@
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
+ };
@@ -0,0 +1,136 @@
1
+ {
2
+ "name": "@emulsify/core",
3
+ "version": "1.1.1",
4
+ "description": "Bundled tooling for Storybook development + Webpack Build",
5
+ "keywords": [
6
+ "component library",
7
+ "design system",
8
+ "drupal",
9
+ "pattern library",
10
+ "storybook",
11
+ "styleguide"
12
+ ],
13
+ "author": "Four Kitchens <shout@fourkitchens.com>",
14
+ "license": "GPL-2.0",
15
+ "engines": {
16
+ "node": ">=20"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/emulsify-ds/emulsify-core.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/emulsify-ds/emulsify-core/issues"
24
+ },
25
+ "homepage": "https://github.com/emulsify-ds/emulsify-core#readme",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "scripts": {
30
+ "coverage": "npm run test && open-cli .coverage/lcov-report/index.html",
31
+ "format": "npm run lint-fix; npm run prettier-fix",
32
+ "husky:commit-msg": "commitlint --edit $1",
33
+ "husky:pre-commit": "npm run lint",
34
+ "lint": "npm run lint-js",
35
+ "lint-fix": "npm run lint-js -- --fix",
36
+ "lint-js": "eslint --config config/eslintrc.config.json --no-error-on-unmatched-pattern ./config ./storybook",
37
+ "lint-staged": "lint-staged",
38
+ "prepare": "[ -d '.git' ] && (husky install) || true",
39
+ "prettier": "prettier --config config/prettierrc.json --ignore-unknown \"**/*.{js,yml,scss,md}\"",
40
+ "prettier-fix": "prettier --config config/prettierrc.json --write --ignore-unknown \"**/*.{js,yml,scss,md}\"",
41
+ "semantic-release": "semantic-release",
42
+ "storybook": "storybook dev --ci -s ../../dist,../../assets/images,../../assets/icons,../../assets/videos -p 6006",
43
+ "storybook-build": "storybook build -s ../../dist,../../assets/images,../../assets/icons,../../assets/videos -o .out",
44
+ "storybook-deploy": "storybook-to-ghpages -o .out",
45
+ "test": "jest --coverage --config ./config/jest.config.js",
46
+ "twatch": "jest --no-coverage --watch --verbose"
47
+ },
48
+ "dependencies": {
49
+ "@babel/core": "^7.24.0",
50
+ "@babel/eslint-parser": "^7.23.10",
51
+ "@emulsify/cli": "^1.6.0",
52
+ "@storybook/addon-a11y": "^7.6.17",
53
+ "@storybook/addon-actions": "^7.6.17",
54
+ "@storybook/addon-essentials": "^7.6.17",
55
+ "@storybook/addon-links": "^7.6.17",
56
+ "@storybook/addon-styling-webpack": "^1.0.0",
57
+ "@storybook/addon-themes": "^7.6.17",
58
+ "@storybook/html": "^7.6.17",
59
+ "@storybook/html-webpack5": "^7.6.17",
60
+ "add-attributes-twig-extension": "^0.1.0",
61
+ "autoprefixer": "^10.4.19",
62
+ "babel-loader": "^9.1.3",
63
+ "babel-preset-minify": "^0.5.2",
64
+ "bem-twig-extension": "^0.1.1",
65
+ "breakpoint-sass": "^3.0.0",
66
+ "chalk": "^5.2.0",
67
+ "clean-webpack-plugin": "^4.0.0",
68
+ "concurrently": "^8.2.2",
69
+ "css-loader": "^7.1.1",
70
+ "eslint": "^8.57.0",
71
+ "eslint-config-airbnb-base": "^15.0.0",
72
+ "eslint-config-prettier": "^9.1.0",
73
+ "eslint-plugin-import": "^2.29.1",
74
+ "eslint-plugin-jest": "^27.9.0",
75
+ "eslint-plugin-prettier": "^5.1.3",
76
+ "eslint-plugin-security": "^2.1.1",
77
+ "eslint-plugin-storybook": "^0.8.0",
78
+ "eslint-webpack-plugin": "^4.1.0",
79
+ "file-loader": "^6.2.0",
80
+ "fs-extra": "^11.2.0",
81
+ "glob": "^10.3.12",
82
+ "graceful-fs": "^4.2.11",
83
+ "html-webpack-plugin": "^5.6.0",
84
+ "imagemin-webpack-plugin": "^2.4.2",
85
+ "jest": "^29.7.0",
86
+ "jest-environment-jsdom": "^29.7.0",
87
+ "js-yaml": "^4.1.0",
88
+ "js-yaml-loader": "^1.2.2",
89
+ "lint-staged": "^15.2.2",
90
+ "mini-css-extract-plugin": "^2.9.0",
91
+ "node-sass-glob-importer": "^5.3.3",
92
+ "normalize.css": "^8.0.1",
93
+ "open-cli": "^8.0.0",
94
+ "pa11y": "^7.0.0",
95
+ "postcss": "^8.4.38",
96
+ "postcss-loader": "^8.1.1",
97
+ "postcss-scss": "^4.0.9",
98
+ "ramda": "^0.29.1",
99
+ "react": "^18.2.0",
100
+ "react-dom": "^18.2.0",
101
+ "regenerator-runtime": "^0.14.1",
102
+ "sass": "^1.75.0",
103
+ "sass-loader": "^14.2.1",
104
+ "storybook": "^7.6.17",
105
+ "style-dictionary": "^3.9.2",
106
+ "stylelint": "^16.3.1",
107
+ "stylelint-config-standard-scss": "^13.1.0",
108
+ "stylelint-prettier": "^5.0.0",
109
+ "stylelint-selector-bem-pattern": "^4.0.0",
110
+ "stylelint-webpack-plugin": "^5.0.0",
111
+ "svg-sprite-loader": "^6.0.11",
112
+ "token-transformer": "^0.0.33",
113
+ "twig-drupal-filters": "^3.2.0",
114
+ "twig-loader": "github:fourkitchens/twig-loader",
115
+ "twig-testing-library": "^1.2.0",
116
+ "webpack": "^5.91.0",
117
+ "webpack-cli": "^5.1.4",
118
+ "webpack-merge": "^5.10.0",
119
+ "yaml": "^2.4.1"
120
+ },
121
+ "devDependencies": {
122
+ "@commitlint/cli": "^19.2.0",
123
+ "@commitlint/config-conventional": "^19.1.0",
124
+ "@semantic-release/changelog": "^6.0.2",
125
+ "@semantic-release/commit-analyzer": "^11.1.0",
126
+ "@semantic-release/git": "^10.0.1",
127
+ "@semantic-release/github": "^10.0.2",
128
+ "@semantic-release/release-notes-generator": "^12.1.0",
129
+ "husky": "^9.0.11",
130
+ "semantic-release": "^23.0.4"
131
+ },
132
+ "overrides": {
133
+ "graceful-fs": "^4.2.11"
134
+ },
135
+ "main": "commitlint.config.js"
136
+ }
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "@emulsify/core",
3
+ "version": "1.1.1",
4
+ "description": "Bundled tooling for Storybook development + Webpack Build",
5
+ "keywords": [
6
+ "component library",
7
+ "design system",
8
+ "drupal",
9
+ "pattern library",
10
+ "storybook",
11
+ "styleguide"
12
+ ],
13
+ "author": "Four Kitchens <shout@fourkitchens.com>",
14
+ "license": "GPL-2.0",
15
+ "engines": {
16
+ "node": ">=20"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/emulsify-ds/emulsify-core.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/emulsify-ds/emulsify-core/issues"
24
+ },
25
+ "homepage": "https://github.com/emulsify-ds/emulsify-core#readme",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "scripts": {
30
+ "coverage": "npm run test && open-cli .coverage/lcov-report/index.html",
31
+ "format": "npm run lint-fix; npm run prettier-fix",
32
+ "husky:commit-msg": "commitlint --edit $1",
33
+ "husky:pre-commit": "npm run lint",
34
+ "lint": "npm run lint-js",
35
+ "lint-fix": "npm run lint-js -- --fix",
36
+ "lint-js": "eslint --config config/eslintrc.config.json --no-error-on-unmatched-pattern ./config ./storybook",
37
+ "lint-staged": "lint-staged",
38
+ "prepare": "[ -d '.git' ] && (husky install) || true",
39
+ "prettier": "prettier --config config/prettierrc.json --ignore-unknown \"**/*.{js,yml,scss,md}\"",
40
+ "prettier-fix": "prettier --config config/prettierrc.json --write --ignore-unknown \"**/*.{js,yml,scss,md}\"",
41
+ "semantic-release": "semantic-release",
42
+ "storybook": "storybook dev --ci -s ../../dist,../../assets/images,../../assets/icons,../../assets/videos -p 6006",
43
+ "storybook-build": "storybook build -s ../../dist,../../assets/images,../../assets/icons,../../assets/videos -o .out",
44
+ "storybook-deploy": "storybook-to-ghpages -o .out",
45
+ "test": "jest --coverage --config ./config/jest.config.js",
46
+ "twatch": "jest --no-coverage --watch --verbose"
47
+ },
48
+ "dependencies": {
49
+ "@babel/core": "^7.24.0",
50
+ "@babel/eslint-parser": "^7.23.10",
51
+ "@emulsify/cli": "^1.6.0",
52
+ "@storybook/addon-a11y": "^7.6.17",
53
+ "@storybook/addon-actions": "^7.6.17",
54
+ "@storybook/addon-essentials": "^7.6.17",
55
+ "@storybook/addon-links": "^7.6.17",
56
+ "@storybook/addon-styling-webpack": "^1.0.0",
57
+ "@storybook/addon-themes": "^7.6.17",
58
+ "@storybook/html": "^7.6.17",
59
+ "@storybook/html-webpack5": "^7.6.17",
60
+ "add-attributes-twig-extension": "^0.1.0",
61
+ "autoprefixer": "^10.4.19",
62
+ "babel-loader": "^9.1.3",
63
+ "babel-preset-minify": "^0.5.2",
64
+ "bem-twig-extension": "^0.1.1",
65
+ "breakpoint-sass": "^3.0.0",
66
+ "chalk": "^5.2.0",
67
+ "clean-webpack-plugin": "^4.0.0",
68
+ "concurrently": "^8.2.2",
69
+ "css-loader": "^7.1.1",
70
+ "eslint": "^8.57.0",
71
+ "eslint-config-airbnb-base": "^15.0.0",
72
+ "eslint-config-prettier": "^9.1.0",
73
+ "eslint-plugin-import": "^2.29.1",
74
+ "eslint-plugin-jest": "^27.9.0",
75
+ "eslint-plugin-prettier": "^5.1.3",
76
+ "eslint-plugin-security": "^2.1.1",
77
+ "eslint-plugin-storybook": "^0.8.0",
78
+ "eslint-webpack-plugin": "^4.1.0",
79
+ "file-loader": "^6.2.0",
80
+ "fs-extra": "^11.2.0",
81
+ "glob": "^10.3.12",
82
+ "graceful-fs": "^4.2.11",
83
+ "html-webpack-plugin": "^5.6.0",
84
+ "imagemin-webpack-plugin": "^2.4.2",
85
+ "jest": "^29.7.0",
86
+ "jest-environment-jsdom": "^29.7.0",
87
+ "js-yaml": "^4.1.0",
88
+ "js-yaml-loader": "^1.2.2",
89
+ "lint-staged": "^15.2.2",
90
+ "mini-css-extract-plugin": "^2.9.0",
91
+ "node-sass-glob-importer": "^5.3.3",
92
+ "normalize.css": "^8.0.1",
93
+ "open-cli": "^8.0.0",
94
+ "pa11y": "^7.0.0",
95
+ "postcss": "^8.4.38",
96
+ "postcss-loader": "^8.1.1",
97
+ "postcss-scss": "^4.0.9",
98
+ "ramda": "^0.29.1",
99
+ "react": "^18.2.0",
100
+ "react-dom": "^18.2.0",
101
+ "regenerator-runtime": "^0.14.1",
102
+ "sass": "^1.75.0",
103
+ "sass-loader": "^14.2.1",
104
+ "storybook": "^7.6.17",
105
+ "style-dictionary": "^3.9.2",
106
+ "stylelint": "^16.3.1",
107
+ "stylelint-config-standard-scss": "^13.1.0",
108
+ "stylelint-prettier": "^5.0.0",
109
+ "stylelint-selector-bem-pattern": "^4.0.0",
110
+ "stylelint-webpack-plugin": "^5.0.0",
111
+ "svg-sprite-loader": "^6.0.11",
112
+ "token-transformer": "^0.0.33",
113
+ "twig-drupal-filters": "^3.2.0",
114
+ "twig-loader": "github:fourkitchens/twig-loader",
115
+ "twig-testing-library": "^1.2.0",
116
+ "webpack": "^5.91.0",
117
+ "webpack-cli": "^5.1.4",
118
+ "webpack-merge": "^5.10.0",
119
+ "yaml": "^2.4.1"
120
+ },
121
+ "devDependencies": {
122
+ "@commitlint/cli": "^19.2.0",
123
+ "@commitlint/config-conventional": "^19.1.0",
124
+ "@semantic-release/changelog": "^6.0.2",
125
+ "@semantic-release/commit-analyzer": "^11.1.0",
126
+ "@semantic-release/git": "^10.0.1",
127
+ "@semantic-release/github": "^10.0.2",
128
+ "@semantic-release/release-notes-generator": "^12.1.0",
129
+ "husky": "^9.0.11",
130
+ "semantic-release": "^23.0.4"
131
+ },
132
+ "overrides": {
133
+ "graceful-fs": "^4.2.11"
134
+ }
135
+ }
@@ -1,13 +1,13 @@
1
1
  module.exports = {
2
2
  stories: [
3
- '../../../components/**/*.stories.@(js|jsx|ts|tsx)',
3
+ '../../../../components/**/*.stories.@(js|jsx|ts|tsx)',
4
4
  ],
5
5
  addons: [
6
- '../../@storybook/addon-a11y',
7
- '../../@storybook/addon-links',
8
- '../../@storybook/addon-essentials',
9
- '../../@storybook/addon-themes',
10
- '../../@storybook/addon-styling-webpack'
6
+ '../../../@storybook/addon-a11y',
7
+ '../../../@storybook/addon-links',
8
+ '../../../@storybook/addon-essentials',
9
+ '../../../@storybook/addon-themes',
10
+ '../../../@storybook/addon-styling-webpack'
11
11
  ],
12
12
  core: {
13
13
  builder: 'webpack5',
@@ -2,7 +2,7 @@ import { addons } from '@storybook/addons';
2
2
 
3
3
  import emulsifyTheme from './emulsifyTheme';
4
4
 
5
- import('../../../config/emulsify-core/storybook/theme')
5
+ import('../../../../config/emulsify-core/storybook/theme')
6
6
  .then((customTheme) => {
7
7
  addons.setConfig({
8
8
  theme: customTheme.default,
@@ -3,20 +3,10 @@ import Twig from 'twig';
3
3
  import { setupTwig } from './setupTwig';
4
4
 
5
5
  // GLOBAL CSS
6
- (async () => {
7
- let compiled;
8
- try {
9
- compiled = await import('../../../dist/css/style.css');
10
- } catch (e) {}
11
- })();
6
+ import('../../../../dist/css/style.css');
12
7
 
13
8
  // Custom theme preview config if it exists.
14
- (async () => {
15
- let preview;
16
- try {
17
- preview = await import('../../../config/emulsify-core/storybook/preview');
18
- } catch (e) {}
19
- })();
9
+ import('../../../../config/emulsify-core/storybook/preview');
20
10
 
21
11
  // If in a Drupal project, it's recommended to import a symlinked version of drupal.js.
22
12
  import './_drupal.js';
@@ -5,34 +5,18 @@ const twigAddAttributes = require('add-attributes-twig-extension');
5
5
 
6
6
  /**
7
7
  * Fetches project-based variant configuration. If no such configuration
8
- * exists, returns default values.
8
+ * exists, returns default values as a flat component structure.
9
9
  *
10
10
  * @returns project-based variant configuration, or default config.
11
11
  */
12
12
  const fetchVariantConfig = () => {
13
13
  try {
14
- return require('../../../project.emulsify.json').variant.structureImplementations;
14
+ return require('../../../../project.emulsify.json').variant.structureImplementations;
15
15
  } catch (e) {
16
16
  return [
17
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',
18
+ name: 'components',
19
+ directory: '../../../../components',
36
20
  },
37
21
  ];
38
22
  }
@@ -40,7 +24,7 @@ const fetchVariantConfig = () => {
40
24
 
41
25
  module.exports.namespaces = {};
42
26
  for (const { name, directory } of fetchVariantConfig()) {
43
- module.exports.namespaces[name] = resolve(__dirname, '../../../', directory);
27
+ module.exports.namespaces[name] = resolve(__dirname, '../../../../', directory);
44
28
  }
45
29
 
46
30
  /**
@@ -23,11 +23,11 @@ describe('setupTwig', () => {
23
23
 
24
24
  it('exports emulsifys namespaces', () => {
25
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',
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
31
  });
32
32
  });
33
33
  });
package/README.md CHANGED
@@ -1,24 +1,46 @@
1
- > [!WARNING]
2
- > Work in progress.
3
-
4
1
  ![Emulsify Core Design System](https://github.com/emulsify-ds/.github/blob/6bd435be881bd820bddfa05d88905efe29176a0a/assets/images/header.png)
5
2
 
6
3
  # Emulsify Core
7
4
 
8
5
  An open-source toolset for creating and implementing design systems.
9
6
 
10
- ### Storybook development and Webpack build
11
-
12
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.
13
8
 
14
- ## Documentation
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.
15
39
 
16
- [docs.emulsify.info](https://emulsify.info/docs)
17
40
 
18
41
  ### Quick Links
19
42
 
20
- 1. [Installation](https://www.emulsify.info/docs/emulsify-drupal)
21
- 2. [Usage](https://www.emulsify.info/docs/emulsify-drupal/basic-usage/commands)
43
+ - [Emulsify Homepage](https://www.emulsify.info/)
22
44
 
23
45
  ## Demo
24
46
 
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- storybookBuildDir: '../../../.out',
2
+ storybookBuildDir: '../../../../.out',
3
3
  pa11y: {
4
4
  includeNotices: false,
5
5
  includeWarnings: false,
@@ -1 +1 @@
1
- import '../../../../../components/style.scss';
1
+ import '../../../../../../components/style.scss';
@@ -1 +1 @@
1
- import '../../../../components/style.scss';
1
+ import '../../../../../../components/style.scss';
@@ -9,14 +9,14 @@ let postcssConfig;
9
9
  if (fs.existsSync('./config/babel.config.js')) {
10
10
  babelConfig = './config/babel.config.js';
11
11
  } else {
12
- babelConfig = './node_modules/emulsify-core/config/babel.config.js';
12
+ babelConfig = './node_modules/@emulsify/core/config/babel.config.js';
13
13
  }
14
14
 
15
15
  // Check if custom postcss config is available.
16
16
  if (fs.existsSync('./config/postcss.config.js')) {
17
17
  postcssConfig = './config/postcss.config.js';
18
18
  } else {
19
- postcssConfig = './node_modules/emulsify-core/config/postcss.config.js';
19
+ postcssConfig = './node_modules/@emulsify/core/config/postcss.config.js';
20
20
  }
21
21
 
22
22
  const JSLoader = {
@@ -7,7 +7,7 @@ const _ImageminPlugin = require('imagemin-webpack-plugin').default;
7
7
  const _SpriteLoaderPlugin = require('svg-sprite-loader/plugin');
8
8
  const glob = require('glob');
9
9
 
10
- const imagePath = path.resolve(__dirname, '../../../../assets/images');
10
+ const imagePath = path.resolve(__dirname, '../../../../../assets/images');
11
11
 
12
12
  const MiniCssExtractPlugin = new _MiniCssExtractPlugin({
13
13
  filename: '[name].css',
@@ -2,4 +2,4 @@ function requireAll(r) {
2
2
  r.keys().forEach(r);
3
3
  }
4
4
 
5
- requireAll(require.context('../../../../assets/icons/', true, /\.svg$/));
5
+ requireAll(require.context('../../../../../assets/icons/', true, /\.svg$/));
@@ -4,8 +4,8 @@ const loaders = require('./loaders');
4
4
  const plugins = require('./plugins');
5
5
 
6
6
  const webpackDir = path.resolve(__dirname);
7
- const rootDir = path.resolve(__dirname, '../../../..');
8
- const distDir = path.resolve(__dirname, '../../../../dist');
7
+ const rootDir = path.resolve(__dirname, '../../../../..');
8
+ const distDir = path.resolve(__dirname, '../../../../../dist');
9
9
 
10
10
  // Glob pattern for scss files that ignore file names prefixed with underscore.
11
11
  const scssPattern = path.resolve(rootDir, 'components/**/!(_*).scss');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emulsify/core",
3
- "version": "0.0.0-development",
3
+ "version": "1.1.2",
4
4
  "description": "Bundled tooling for Storybook development + Webpack Build",
5
5
  "keywords": [
6
6
  "component library",
@@ -107,7 +107,7 @@
107
107
  "stylelint-config-standard-scss": "^13.1.0",
108
108
  "stylelint-prettier": "^5.0.0",
109
109
  "stylelint-selector-bem-pattern": "^4.0.0",
110
- "stylelint-webpack-plugin": "^5.0.0",
110
+ "stylelint-webpack-plugin": "^5.0.1",
111
111
  "svg-sprite-loader": "^6.0.11",
112
112
  "token-transformer": "^0.0.33",
113
113
  "twig-drupal-filters": "^3.2.0",
@@ -119,18 +119,17 @@
119
119
  "yaml": "^2.4.1"
120
120
  },
121
121
  "devDependencies": {
122
- "@commitlint/cli": "^19.2.0",
122
+ "@commitlint/cli": "^19.3.0",
123
123
  "@commitlint/config-conventional": "^19.1.0",
124
124
  "@semantic-release/changelog": "^6.0.2",
125
125
  "@semantic-release/commit-analyzer": "^11.1.0",
126
126
  "@semantic-release/git": "^10.0.1",
127
127
  "@semantic-release/github": "^10.0.2",
128
- "@semantic-release/release-notes-generator": "^12.1.0",
128
+ "@semantic-release/release-notes-generator": "^14.0.0",
129
129
  "husky": "^9.0.11",
130
130
  "semantic-release": "^23.0.4"
131
131
  },
132
132
  "overrides": {
133
133
  "graceful-fs": "^4.2.11"
134
- },
135
- "main": "commitlint.config.js"
134
+ }
136
135
  }