@emulsify/core 0.0.0-development → 1.1.1
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/.history/.storybook/main_20240401184129.js +22 -0
- package/.history/.storybook/main_20240607162805.js +22 -0
- package/.history/.storybook/manager_20240311205454.js +15 -0
- package/.history/.storybook/manager_20240607162817.js +15 -0
- package/.history/.storybook/preview_20240401184023.js +40 -0
- package/.history/.storybook/preview_20240607162826.js +40 -0
- package/.history/.storybook/setupTwig.test_20240228163244.js +33 -0
- package/.history/.storybook/setupTwig.test_20240607163045.js +33 -0
- package/.history/.storybook/setupTwig_20240326081425.js +59 -0
- package/.history/.storybook/setupTwig_20240607163001.js +43 -0
- package/.history/.storybook/setupTwig_20240607163019.js +43 -0
- package/.history/README_20240312154948.md +72 -0
- package/.history/README_20240607162731.md +94 -0
- package/.history/config/a11y.config_20240607110020.js +61 -0
- package/.history/config/a11y.config_20240607163052.js +61 -0
- package/.history/config/a11y.config_20240607163120.js +61 -0
- package/.history/config/webpack/css/style_20240228152007.js +1 -0
- package/.history/config/webpack/css/style_20240607163238.js +1 -0
- package/.history/config/webpack/css_20240317194751.js +1 -0
- package/.history/config/webpack/css_20240607163108.js +1 -0
- package/.history/config/webpack/css_20240607163132.js +1 -0
- package/.history/config/webpack/plugins_20240401184104.js +48 -0
- package/.history/config/webpack/plugins_20240607163148.js +48 -0
- package/.history/config/webpack/svgSprite_20240401184053.js +5 -0
- package/.history/config/webpack/svgSprite_20240607163207.js +5 -0
- package/.history/config/webpack/webpack.common_20240607090919.js +72 -0
- package/.history/config/webpack/webpack.common_20240607163224.js +72 -0
- package/.history/package_20240607155640.json +136 -0
- package/.history/package_20240607163353.json +135 -0
- package/.storybook/main.js +1 -1
- package/.storybook/manager.js +1 -1
- package/.storybook/preview.js +2 -2
- package/.storybook/setupTwig.js +5 -21
- package/.storybook/setupTwig.test.js +5 -5
- package/README.md +31 -9
- package/config/a11y.config.js +1 -1
- package/config/webpack/css/style.js +1 -1
- package/config/webpack/css.js +1 -1
- package/config/webpack/plugins.js +1 -1
- package/config/webpack/svgSprite.js +1 -1
- package/config/webpack/webpack.common.js +2 -2
- package/package.json +2 -3
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../components/style.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../components/style.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../components/style.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../components/style.scss';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../../../../../components/style.scss';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const webpack = require('webpack');
|
|
4
|
+
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
5
|
+
const _MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
6
|
+
const _ImageminPlugin = require('imagemin-webpack-plugin').default;
|
|
7
|
+
const _SpriteLoaderPlugin = require('svg-sprite-loader/plugin');
|
|
8
|
+
const glob = require('glob');
|
|
9
|
+
|
|
10
|
+
const imagePath = path.resolve(__dirname, '../../../../assets/images');
|
|
11
|
+
|
|
12
|
+
const MiniCssExtractPlugin = new _MiniCssExtractPlugin({
|
|
13
|
+
filename: '[name].css',
|
|
14
|
+
chunkFilename: '[id].css',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const ImageminPlugin = new _ImageminPlugin({
|
|
18
|
+
disable: process.env.NODE_ENV !== 'production',
|
|
19
|
+
externalImages: {
|
|
20
|
+
context: imagePath,
|
|
21
|
+
sources: glob.sync(path.resolve(imagePath, '**/*.{png,jpg,gif,svg}')),
|
|
22
|
+
destination: imagePath,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const SpriteLoaderPlugin = new _SpriteLoaderPlugin({
|
|
27
|
+
plainSprite: true,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const ProgressPlugin = new webpack.ProgressPlugin();
|
|
31
|
+
|
|
32
|
+
module.exports = {
|
|
33
|
+
ProgressPlugin,
|
|
34
|
+
MiniCssExtractPlugin,
|
|
35
|
+
ImageminPlugin,
|
|
36
|
+
SpriteLoaderPlugin,
|
|
37
|
+
CleanWebpackPlugin: new CleanWebpackPlugin({
|
|
38
|
+
protectWebpackAssets: false, // Required for removal of extra, unwanted dist/css/*.js files.
|
|
39
|
+
cleanOnceBeforeBuildPatterns: ['!*.{png,jpg,gif,svg}'],
|
|
40
|
+
cleanAfterEveryBuildPatterns: [
|
|
41
|
+
'remove/**',
|
|
42
|
+
'!js',
|
|
43
|
+
'css/**/*.js', // Remove all unwanted, auto generated JS files from dist/css folder.
|
|
44
|
+
'css/**/*.js.map',
|
|
45
|
+
'!*.{png,jpg,gif,svg}',
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* eslint-disable no-underscore-dangle */
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const webpack = require('webpack');
|
|
4
|
+
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
5
|
+
const _MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
6
|
+
const _ImageminPlugin = require('imagemin-webpack-plugin').default;
|
|
7
|
+
const _SpriteLoaderPlugin = require('svg-sprite-loader/plugin');
|
|
8
|
+
const glob = require('glob');
|
|
9
|
+
|
|
10
|
+
const imagePath = path.resolve(__dirname, '../../../../../assets/images');
|
|
11
|
+
|
|
12
|
+
const MiniCssExtractPlugin = new _MiniCssExtractPlugin({
|
|
13
|
+
filename: '[name].css',
|
|
14
|
+
chunkFilename: '[id].css',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const ImageminPlugin = new _ImageminPlugin({
|
|
18
|
+
disable: process.env.NODE_ENV !== 'production',
|
|
19
|
+
externalImages: {
|
|
20
|
+
context: imagePath,
|
|
21
|
+
sources: glob.sync(path.resolve(imagePath, '**/*.{png,jpg,gif,svg}')),
|
|
22
|
+
destination: imagePath,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const SpriteLoaderPlugin = new _SpriteLoaderPlugin({
|
|
27
|
+
plainSprite: true,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const ProgressPlugin = new webpack.ProgressPlugin();
|
|
31
|
+
|
|
32
|
+
module.exports = {
|
|
33
|
+
ProgressPlugin,
|
|
34
|
+
MiniCssExtractPlugin,
|
|
35
|
+
ImageminPlugin,
|
|
36
|
+
SpriteLoaderPlugin,
|
|
37
|
+
CleanWebpackPlugin: new CleanWebpackPlugin({
|
|
38
|
+
protectWebpackAssets: false, // Required for removal of extra, unwanted dist/css/*.js files.
|
|
39
|
+
cleanOnceBeforeBuildPatterns: ['!*.{png,jpg,gif,svg}'],
|
|
40
|
+
cleanAfterEveryBuildPatterns: [
|
|
41
|
+
'remove/**',
|
|
42
|
+
'!js',
|
|
43
|
+
'css/**/*.js', // Remove all unwanted, auto generated JS files from dist/css folder.
|
|
44
|
+
'css/**/*.js.map',
|
|
45
|
+
'!*.{png,jpg,gif,svg}',
|
|
46
|
+
],
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
@@ -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,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
|
+
}
|
package/.storybook/main.js
CHANGED
package/.storybook/manager.js
CHANGED
|
@@ -2,7 +2,7 @@ import { addons } from '@storybook/addons';
|
|
|
2
2
|
|
|
3
3
|
import emulsifyTheme from './emulsifyTheme';
|
|
4
4
|
|
|
5
|
-
import('
|
|
5
|
+
import('../../../../config/emulsify-core/storybook/theme')
|
|
6
6
|
.then((customTheme) => {
|
|
7
7
|
addons.setConfig({
|
|
8
8
|
theme: customTheme.default,
|
package/.storybook/preview.js
CHANGED
|
@@ -6,7 +6,7 @@ import { setupTwig } from './setupTwig';
|
|
|
6
6
|
(async () => {
|
|
7
7
|
let compiled;
|
|
8
8
|
try {
|
|
9
|
-
compiled = await import('
|
|
9
|
+
compiled = await import('../../../../dist/css/style.css');
|
|
10
10
|
} catch (e) {}
|
|
11
11
|
})();
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ import { setupTwig } from './setupTwig';
|
|
|
14
14
|
(async () => {
|
|
15
15
|
let preview;
|
|
16
16
|
try {
|
|
17
|
-
preview = await import('
|
|
17
|
+
preview = await import('../../../../config/emulsify-core/storybook/preview');
|
|
18
18
|
} catch (e) {}
|
|
19
19
|
})();
|
|
20
20
|
|