@emulsify/core 1.3.0 → 1.3.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.
|
@@ -0,0 +1,88 @@
|
|
|
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: /\.(png|svg|jpg|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
|
+
api: "legacy",
|
|
63
|
+
sourceMap: true,
|
|
64
|
+
sassOptions: {
|
|
65
|
+
importer: globImporter(),
|
|
66
|
+
outputStyle: 'compressed',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const SVGSpriteLoader = {
|
|
74
|
+
test: /icons\/.*\.svg$/, // your icons directory
|
|
75
|
+
loader: 'svg-sprite-loader',
|
|
76
|
+
options: {
|
|
77
|
+
extract: true,
|
|
78
|
+
runtimeCompat: true,
|
|
79
|
+
spriteFilename: './icons.svg',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
module.exports = {
|
|
84
|
+
JSLoader,
|
|
85
|
+
CSSLoader,
|
|
86
|
+
SVGSpriteLoader,
|
|
87
|
+
ImageLoader,
|
|
88
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
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: /\.(png|svg|jpg|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
|
+
api: 'legacy',
|
|
63
|
+
sourceMap: true,
|
|
64
|
+
sassOptions: {
|
|
65
|
+
importer: globImporter(),
|
|
66
|
+
outputStyle: 'compressed',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const SVGSpriteLoader = {
|
|
74
|
+
test: /icons\/.*\.svg$/, // your icons directory
|
|
75
|
+
loader: 'svg-sprite-loader',
|
|
76
|
+
options: {
|
|
77
|
+
extract: true,
|
|
78
|
+
runtimeCompat: true,
|
|
79
|
+
spriteFilename: './icons.svg',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
module.exports = {
|
|
84
|
+
JSLoader,
|
|
85
|
+
CSSLoader,
|
|
86
|
+
SVGSpriteLoader,
|
|
87
|
+
ImageLoader,
|
|
88
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@emulsify/core",
|
|
3
|
+
"version": "1.3.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.25.2",
|
|
50
|
+
"@babel/eslint-parser": "^7.25.1",
|
|
51
|
+
"@emulsify/cli": "^1.10.2",
|
|
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.20",
|
|
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.8",
|
|
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": "^8.0.0",
|
|
95
|
+
"postcss": "^8.4.41",
|
|
96
|
+
"postcss-loader": "^8.1.1",
|
|
97
|
+
"postcss-scss": "^4.0.9",
|
|
98
|
+
"ramda": "^0.30.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": "^16.0.0",
|
|
104
|
+
"storybook": "^7.6.17",
|
|
105
|
+
"style-dictionary": "^3.9.2",
|
|
106
|
+
"stylelint": "^16.8.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.1",
|
|
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": "^6.0.1",
|
|
119
|
+
"yaml": "^2.5.0"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@commitlint/cli": "^19.3.0",
|
|
123
|
+
"@commitlint/config-conventional": "^19.1.0",
|
|
124
|
+
"@semantic-release/changelog": "^6.0.2",
|
|
125
|
+
"@semantic-release/commit-analyzer": "^13.0.0",
|
|
126
|
+
"@semantic-release/git": "^10.0.1",
|
|
127
|
+
"@semantic-release/github": "^10.1.3",
|
|
128
|
+
"@semantic-release/release-notes-generator": "^14.0.0",
|
|
129
|
+
"husky": "^9.1.4",
|
|
130
|
+
"semantic-release": "^24.0.0"
|
|
131
|
+
},
|
|
132
|
+
"overrides": {
|
|
133
|
+
"graceful-fs": "^4.2.11"
|
|
134
|
+
}
|
|
135
|
+
}
|