@emulsify/core 2.7.1 → 3.0.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.
@@ -1,79 +1,93 @@
1
- const path = require('path');
2
- const glob = require('glob');
3
- const loaders = require('./loaders');
4
- const plugins = require('./plugins');
5
- const resolves = require('./resolves');
6
- const optimizers = require('./optimizers');
7
- const emulsifyConfig = require('../../../../../project.emulsify.json');
8
- const fs = require('fs-extra');
9
-
10
- // Utility to sanitize file paths (to prevent unwanted characters).
1
+ /**
2
+ * @fileoverview Webpack configuration entry file.
3
+ * This file generates Webpack entries for JS, SCSS, and SVG assets.
4
+ */
5
+
6
+ import { resolve, dirname } from 'path';
7
+ import { sync as globSync } from 'glob';
8
+ import fs from 'fs-extra';
9
+ import loaders from './loaders.js';
10
+ import plugins from './plugins.js';
11
+ import resolves from './resolves.js';
12
+ import optimizers from './optimizers.js';
13
+ import emulsifyConfig from '../../../../../project.emulsify.json' with { type: 'json' };
14
+
15
+ // Create __filename from import.meta.url without fileURLToPath
16
+ let _filename = decodeURIComponent(new URL(import.meta.url).pathname);
17
+
18
+ // On Windows, remove the leading slash (e.g. "/C:/path" -> "C:/path")
19
+ if (process.platform === 'win32' && _filename.startsWith('/')) {
20
+ _filename = _filename.slice(1);
21
+ }
22
+
23
+ const _dirname = dirname(_filename);
24
+
25
+ /**
26
+ * Sanitize a file path by removing unwanted characters.
27
+ *
28
+ * @param {string} inputPath - The file path to sanitize.
29
+ * @returns {string} The sanitized file path.
30
+ */
11
31
  const sanitizePath = (inputPath) => inputPath.replace(/[^a-zA-Z0-9/_-]/g, '');
12
32
 
13
33
  // Get directories for file contexts.
14
- const webpackDir = path.resolve(__dirname);
15
- const projectDir = path.resolve(__dirname, '../../../../..');
16
- const srcDir = fs.existsSync(path.resolve(projectDir, 'src'))
17
- ? path.resolve(projectDir, 'src')
18
- : path.resolve(projectDir, 'components');
19
-
20
- // Glob pattern for scss files that ignore file names prefixed with underscore.
21
- const BaseScssPattern = fs.existsSync(path.resolve(projectDir, 'src'))
22
- ? path.resolve(srcDir, '!(components|util)/**/!(_*|cl-*|sb-*).scss')
34
+ const projectDir = resolve(_dirname, '../../../../..');
35
+
36
+ const srcPath = resolve(projectDir, 'src');
37
+ const isSrcExists = fs.pathExistsSync(srcPath);
38
+ const srcDir = isSrcExists ? srcPath : resolve(projectDir, 'components');
39
+ const isDrupal = emulsifyConfig.project.platform === 'drupal';
40
+
41
+ // Glob pattern for SCSS files that ignore file names prefixed with underscore.
42
+ const BaseScssPattern = fs.pathExistsSync(resolve(projectDir, 'src'))
43
+ ? resolve(srcDir, '!(components|util)/**/!(_*|cl-*|sb-*).scss')
23
44
  : '';
24
- const ComponentScssPattern = fs.existsSync(path.resolve(projectDir, 'src'))
25
- ? path.resolve(srcDir, 'components/**/!(_*|cl-*|sb-*).scss')
26
- : path.resolve(srcDir, '**/!(_*|cl-*|sb-*).scss');
27
- const ComponentLibraryScssPattern = path.resolve(
28
- srcDir,
29
- '**/*{cl-*,sb-*}.scss',
30
- );
45
+ const ComponentScssPattern = fs.pathExistsSync(resolve(projectDir, 'src'))
46
+ ? resolve(srcDir, 'components/**/!(_*|cl-*|sb-*).scss')
47
+ : resolve(srcDir, '**/!(_*|cl-*|sb-*).scss');
48
+ const ComponentLibraryScssPattern = resolve(srcDir, '**/*{cl-*,sb-*}.scss');
31
49
 
32
50
  // Glob pattern for JS files.
33
- const BaseJsPattern = fs.existsSync(path.resolve(projectDir, 'src'))
34
- ? path.resolve(
51
+ const BaseJsPattern = fs.pathExistsSync(resolve(projectDir, 'src'))
52
+ ? resolve(
35
53
  srcDir,
36
54
  '!(components|util)/**/!(*.stories|*.component|*.min|*.test).js',
37
55
  )
38
56
  : '';
39
- const ComponentJsPattern = fs.existsSync(path.resolve(projectDir, 'src'))
40
- ? path.resolve(
41
- srcDir,
42
- 'components/**/!(*.stories|*.component|*.min|*.test).js',
43
- )
44
- : path.resolve(srcDir, '**/!(*.stories|*.component|*.min|*.test).js');
57
+ const ComponentJsPattern = fs.pathExistsSync(resolve(projectDir, 'src'))
58
+ ? resolve(srcDir, 'components/**/!(*.stories|*.component|*.min|*.test).js')
59
+ : resolve(srcDir, '**/!(*.stories|*.component|*.min|*.test).js');
45
60
 
46
- // Glob pattern for svgSprite config.
47
- const spritePattern = path.resolve(webpackDir, 'svgSprite.js');
61
+ // Glob pattern for SVG sprite config.
62
+ const spritePattern = resolve(projectDir, 'assets/icons/**/*.svg');
48
63
 
49
64
  /**
50
- * Return all scss/js/svg files that Webpack needs to compile.
51
- * @constructor
52
- * @param {string} str - Path to file.
53
- * @param {string} replacement - string to replace str.
65
+ * Replace the last occurrence of a slash in a string with a replacement.
66
+ *
67
+ * @param {string} str - The original string.
68
+ * @param {string} replacement - The string to replace the last slash with.
69
+ * @returns {string} The modified string.
54
70
  */
55
71
  function replaceLastSlash(str, replacement) {
56
- // Find the last occurrence of '/'
57
72
  const lastSlashIndex = str.lastIndexOf('/');
58
- // If there is no '/' in the string, return the original string
59
73
  if (lastSlashIndex === -1) {
60
74
  return str;
61
75
  }
62
- // Replace the last '/' with the specified replacement
63
76
  return (
64
77
  str.slice(0, lastSlashIndex) + replacement + str.slice(lastSlashIndex + 1)
65
78
  );
66
79
  }
67
80
 
68
81
  /**
69
- * Return all scss/js/svg files that Webpack needs to compile.
70
- * @constructor
71
- * @param {string} BaseJsMatcher - Glob pattern.
72
- * @param {string} jsMatcher - Glob pattern.
73
- * @param {string} BaseScssMatcher - Glob pattern.
74
- * @param {string} ComponentScssMatcher - Glob pattern.
75
- * @param {string} ComponentLibraryScssMatcher - Glob pattern.
76
- * @param {string} spriteMatcher - Glob pattern.
82
+ * Generate Webpack entries for JS, SCSS, and SVG files.
83
+ *
84
+ * @param {string} BaseJsMatcher - Glob pattern for base JS files.
85
+ * @param {string} jsMatcher - Glob pattern for component JS files.
86
+ * @param {string} BaseScssMatcher - Glob pattern for base SCSS files.
87
+ * @param {string} ComponentScssMatcher - Glob pattern for component SCSS files.
88
+ * @param {string} ComponentLibraryScssMatcher - Glob pattern for component library SCSS files.
89
+ * @param {string} spriteMatcher - Glob pattern for SVG sprite configuration.
90
+ * @returns {Object} An object containing the Webpack entries.
77
91
  */
78
92
  function getEntries(
79
93
  BaseJsMatcher,
@@ -85,96 +99,90 @@ function getEntries(
85
99
  ) {
86
100
  const entries = {};
87
101
 
102
+ /**
103
+ * Add an entry to the entries object after sanitizing the key.
104
+ *
105
+ * @param {string} key - The key for the entry.
106
+ * @param {string} file - The file path to associate with the entry.
107
+ */
88
108
  const addEntry = (key, file) => {
89
109
  const sanitizedKey = sanitizePath(key);
90
110
  if (
91
111
  sanitizedKey &&
92
112
  !Object.prototype.hasOwnProperty.call(entries, sanitizedKey)
93
113
  ) {
114
+ // eslint-disable-next-line security/detect-object-injection
94
115
  entries[sanitizedKey] = file;
95
116
  }
96
117
  };
97
118
 
98
119
  // Non-component or global JS entries.
99
- glob.sync(BaseJsMatcher).forEach((file) => {
120
+ globSync(BaseJsMatcher).forEach((file) => {
100
121
  const filePath = file.split(`${srcDir}/`)[1];
101
122
  const pathParts = filePath.split('/');
102
- // Construct the output path by joining all path parts except the last, with "/js/" prefix.
103
- const filePathDist = `${pathParts.slice(0, -1).join('/')}/js/${pathParts.at(-1).replace('.js', '')}`;
104
- // Determine if the src directory exists and construct the appropriate path.
105
- const newFilePath = fs.existsSync(path.resolve(projectDir, 'src'))
123
+ const filePathDist = `${pathParts.slice(0, -1).join('/')}/js/${pathParts
124
+ .at(-1)
125
+ .replace('.js', '')}`;
126
+ const newFilePath = fs.pathExistsSync(resolve(projectDir, 'src'))
106
127
  ? `dist/global/${filePathDist}`
107
128
  : `dist/js/${filePathDist}`;
108
- // Add the file to the entries.
109
129
  addEntry(newFilePath, file);
110
130
  });
111
131
 
112
132
  // Component JS entries.
113
- glob.sync(jsMatcher).forEach((file) => {
133
+ globSync(jsMatcher).forEach((file) => {
114
134
  if (!file.includes('dist/')) {
115
- const filePath = file.split('components/')[1];
116
- const filePathDist = replaceLastSlash(filePath, '/js/');
117
- const distStructure = fs.existsSync(path.resolve(projectDir, 'src'))
118
- ? 'components'
119
- : 'js';
120
- const newFilePath =
121
- emulsifyConfig.project.platform === 'drupal' &&
122
- fs.existsSync(path.resolve(projectDir, 'src'))
123
- ? `components/${filePathDist.replace('.js', '')}`
124
- : `dist/${distStructure}/${filePathDist.replace('.js', '')}`;
135
+ const filePath = file.split(`${srcDir}/components/`)[1];
136
+ const filePathDistRaw = replaceLastSlash(filePath, '/js/');
137
+ const filePathDist = filePathDistRaw.replace(/\.js$/, '');
138
+ const prefix = isDrupal && isSrcExists ? 'components' : 'dist/components';
139
+ const newFilePath = `${prefix}/${filePathDist}`;
125
140
  addEntry(newFilePath, file);
126
141
  }
127
142
  });
128
143
 
129
144
  // Non-component or global SCSS entries.
130
- glob.sync(BaseScssMatcher).forEach((file) => {
145
+ globSync(BaseScssMatcher).forEach((file) => {
131
146
  const filePath = file.split(`${srcDir}/`)[1];
132
147
  const pathParts = filePath.split('/');
133
-
134
- // Construct the output path by joining all path parts except the last, with "/css/" prefix.
135
- const filePathDist = `${pathParts.slice(0, -1).join('/')}/css/${pathParts.at(-1).replace('.scss', '')}`;
136
-
137
- // Determine if the src directory exists and construct the appropriate path.
138
- const newFilePath = fs.existsSync(path.resolve(projectDir, 'src'))
148
+ const filePathDist = `${pathParts.slice(0, -1).join('/')}/css/${pathParts
149
+ .at(-1)
150
+ .replace('.scss', '')}`;
151
+ const newFilePath = fs.pathExistsSync(resolve(projectDir, 'src'))
139
152
  ? `dist/global/${filePathDist}`
140
153
  : `dist/css/${filePathDist}`;
141
-
142
- // Add the file to the entries.
143
154
  addEntry(newFilePath, file);
144
155
  });
145
156
 
146
- // Component SCSS entries.-
147
- glob.sync(ComponentScssMatcher).forEach((file) => {
148
- const filePath = file.split('components/')[1];
149
- const filePathDist = replaceLastSlash(filePath, '/css/');
150
- const distStructure = fs.existsSync(path.resolve(projectDir, 'src'))
151
- ? 'components'
152
- : 'css';
153
- const newFilePath =
154
- emulsifyConfig.project.platform === 'drupal' &&
155
- fs.existsSync(path.resolve(projectDir, 'src'))
156
- ? `components/${filePathDist.replace('.scss', '')}`
157
- : `dist/${distStructure}/${filePathDist.replace('.scss', '')}`;
157
+ // Component SCSS entries.
158
+ globSync(ComponentScssMatcher).forEach((file) => {
159
+ const filePath = file.split(`${srcDir}/components/`)[1];
160
+ const filePathDistRaw = replaceLastSlash(filePath, '/css/');
161
+ const filePathDist = filePathDistRaw.replace(/\.scss$/, '');
162
+ const prefix = isDrupal && isSrcExists ? 'components' : 'dist/components';
163
+ const newFilePath = `${prefix}/${filePathDist}`;
158
164
  addEntry(newFilePath, file);
159
165
  });
160
166
 
161
167
  // Component Library SCSS entries.
162
- glob.sync(ComponentLibraryScssMatcher).forEach((file) => {
168
+ globSync(ComponentLibraryScssMatcher).forEach((file) => {
163
169
  const filePath = file.split(`${srcDir}/`)[1];
164
170
  const newFilePath = `dist/storybook/${filePath.replace('.scss', '')}`;
165
171
  addEntry(newFilePath, file);
166
172
  });
167
173
 
168
- glob.sync(spriteMatcher).forEach((file) => {
169
- const filePath = file.split('/webpack/')[1];
170
- const newFilePath = `dist/${filePath.replace('.js', '')}`;
171
- addEntry(newFilePath, file);
174
+ // SVG sprite config entries.
175
+ globSync(spriteMatcher).forEach((file) => {
176
+ const filePath = file.split('/assets/')[1];
177
+ const newEntry = `dist/${filePath}`;
178
+ addEntry(newEntry, file);
172
179
  });
173
180
 
174
181
  return entries;
175
182
  }
176
183
 
177
- module.exports = {
184
+ export default {
185
+ target: 'web',
178
186
  stats: {
179
187
  errorDetails: true,
180
188
  },
@@ -1,7 +1,7 @@
1
- const { merge } = require('webpack-merge');
2
- const common = require('./webpack.common.js');
1
+ import { merge } from 'webpack-merge';
2
+ import common from './webpack.common.js';
3
3
 
4
- module.exports = merge(common, {
4
+ export default merge(common, {
5
5
  mode: 'development',
6
6
  devtool: 'source-map',
7
7
  });
@@ -1,6 +1,6 @@
1
- const { merge } = require('webpack-merge');
2
- const common = require('./webpack.common.js');
1
+ import { merge } from 'webpack-merge';
2
+ import common from './webpack.common.js';
3
3
 
4
- module.exports = merge(common, {
4
+ export default merge(common, {
5
5
  mode: 'production',
6
6
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emulsify/core",
3
- "version": "2.7.1",
3
+ "version": "3.0.2",
4
4
  "description": "Bundled tooling for Storybook development + Webpack Build",
5
5
  "keywords": [
6
6
  "component library",
@@ -13,8 +13,9 @@
13
13
  "author": "Four Kitchens <shout@fourkitchens.com>",
14
14
  "license": "GPL-2.0",
15
15
  "engines": {
16
- "node": ">=20"
16
+ "node": ">=24"
17
17
  },
18
+ "type": "module",
18
19
  "repository": {
19
20
  "type": "git",
20
21
  "url": "git+https://github.com/emulsify-ds/emulsify-core.git"
@@ -26,6 +27,9 @@
26
27
  "publishConfig": {
27
28
  "access": "public"
28
29
  },
30
+ "config": {
31
+ "scripts-prepend-node-path": "auto"
32
+ },
29
33
  "scripts": {
30
34
  "coverage": "npm run test && open-cli .coverage/lcov-report/index.html",
31
35
  "format": "npm run lint-fix; npm run prettier-fix",
@@ -33,34 +37,35 @@
33
37
  "husky:pre-commit": "npm run lint",
34
38
  "lint": "npm run lint-js",
35
39
  "lint-fix": "npm run lint-js -- --fix",
36
- "lint-js": "eslint --config config/eslintrc.config.json --no-error-on-unmatched-pattern ./config ./storybook",
40
+ "lint-js": "eslint --config config/eslint.config.js --no-error-on-unmatched-pattern ./config ./storybook",
37
41
  "lint-staged": "lint-staged",
38
42
  "prepare": "[ -d '.git' ] && (husky install) || true",
39
43
  "prettier": "prettier --config config/prettierrc.json --ignore-unknown \"**/*.{js,yml,scss,md}\"",
40
44
  "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",
45
+ "semantic-release": "semantic-release --config ./release.config.cjs",
46
+ "storybook": "NODE_OPTIONS=--no-deprecation storybook dev --ci -s ../../dist,../../assets/images,../../assets/icons,../../assets/videos -p 6006",
43
47
  "storybook-build": "storybook build -s ../../dist,../../assets/images,../../assets/icons,../../assets/videos -o .out",
44
48
  "storybook-deploy": "storybook-to-ghpages -o .out",
45
49
  "test": "jest --coverage --config ./config/jest.config.js",
46
50
  "twatch": "jest --no-coverage --watch --verbose"
47
51
  },
48
52
  "dependencies": {
49
- "@babel/core": "^7.26.10",
50
- "@babel/eslint-parser": "^7.27.0",
51
- "@babel/preset-env": "^7.26.9",
53
+ "@babel/core": "^7.27.3",
54
+ "@babel/eslint-parser": "^7.27.1",
55
+ "@babel/preset-env": "^7.27.2",
52
56
  "@emulsify/cli": "^1.11.4",
53
- "@storybook/addon-a11y": "^8.6.12",
54
- "@storybook/addon-actions": "^8.6.12",
55
- "@storybook/addon-essentials": "^8.6.12",
56
- "@storybook/addon-links": "^8.6.12",
57
+ "@eslint/js": "^9.27.0",
58
+ "@storybook/addon-a11y": "^8.6.14",
59
+ "@storybook/addon-actions": "^8.6.14",
60
+ "@storybook/addon-essentials": "^8.6.14",
61
+ "@storybook/addon-links": "^8.6.14",
57
62
  "@storybook/addon-styling-webpack": "^1.0.1",
58
- "@storybook/addon-themes": "^8.6.12",
59
- "@storybook/html": "^8.6.12",
60
- "@storybook/html-webpack5": "^8.6.12",
61
- "@storybook/manager-api": "^8.6.12",
62
- "@storybook/preview-api": "^8.6.12",
63
- "@storybook/theming": "^8.6.12",
63
+ "@storybook/addon-themes": "^8.6.14",
64
+ "@storybook/html": "^8.6.14",
65
+ "@storybook/html-webpack5": "^8.6.14",
66
+ "@storybook/manager-api": "^8.6.14",
67
+ "@storybook/preview-api": "^8.6.14",
68
+ "@storybook/theming": "^8.6.14",
64
69
  "add-attributes-twig-extension": "^0.1.0",
65
70
  "autoprefixer": "^10.4.21",
66
71
  "babel-loader": "^10.0.0",
@@ -72,14 +77,14 @@
72
77
  "concurrently": "^9.1.2",
73
78
  "copy-webpack-plugin": "^13.0.0",
74
79
  "css-loader": "^7.1.1",
75
- "eslint": "^8.57.0",
76
- "eslint-config-prettier": "^9.1.0",
80
+ "eslint": "^9.27.0",
81
+ "eslint-config-prettier": "^10.1.5",
77
82
  "eslint-plugin-import": "^2.31.0",
78
- "eslint-plugin-jest": "^28.11.0",
79
- "eslint-plugin-prettier": "^5.2.6",
83
+ "eslint-plugin-jest": "^28.11.1",
84
+ "eslint-plugin-prettier": "^5.4.0",
80
85
  "eslint-plugin-security": "^3.0.1",
81
86
  "eslint-plugin-storybook": "^0.12.0",
82
- "eslint-webpack-plugin": "^4.1.0",
87
+ "eslint-webpack-plugin": "^5.0.1",
83
88
  "file-loader": "^6.2.0",
84
89
  "fs-extra": "^11.3.0",
85
90
  "glob": "^11.0.2",
@@ -98,20 +103,18 @@
98
103
  "node-sass-glob-importer": "^5.3.3",
99
104
  "normalize.css": "^8.0.1",
100
105
  "open-cli": "^8.0.0",
101
- "pa11y": "^8.0.0",
106
+ "pa11y": "^9.0.0",
102
107
  "postcss": "^8.5.1",
103
108
  "postcss-loader": "^8.1.1",
104
109
  "postcss-scss": "^4.0.9",
105
110
  "ramda": "^0.30.1",
106
- "react": "^19.1.0",
107
- "react-dom": "^19.1.0",
108
111
  "regenerator-runtime": "^0.14.1",
109
- "sass": "^1.87.0",
112
+ "sass": "^1.89.0",
110
113
  "sass-loader": "^16.0.5",
111
- "storybook": "^8.4.7",
114
+ "storybook": "^8.6.14",
112
115
  "style-dictionary": "^4.4.0",
113
116
  "stylelint": "^16.19.1",
114
- "stylelint-config-standard-scss": "^14.0.0",
117
+ "stylelint-config-standard-scss": "^15.0.1",
115
118
  "stylelint-prettier": "^5.0.3",
116
119
  "stylelint-selector-bem-pattern": "^4.0.1",
117
120
  "stylelint-webpack-plugin": "^5.0.1",
@@ -120,24 +123,30 @@
120
123
  "twig-drupal-filters": "^3.2.0",
121
124
  "twig-testing-library": "^1.2.0",
122
125
  "twigjs-loader": "^1.0.3",
123
- "webpack": "^5.99.1",
126
+ "webpack": "^5.99.9",
124
127
  "webpack-cli": "^6.0.1",
125
128
  "webpack-merge": "^6.0.1",
126
- "yaml": "^2.7.1"
129
+ "yaml": "^2.8.0"
127
130
  },
128
131
  "devDependencies": {
129
- "@commitlint/cli": "^19.8.0",
130
- "@commitlint/config-conventional": "^19.8.0",
132
+ "@commitlint/cli": "^19.8.1",
133
+ "@commitlint/config-conventional": "^19.8.1",
131
134
  "@semantic-release/changelog": "^6.0.2",
132
135
  "@semantic-release/commit-analyzer": "^13.0.1",
133
136
  "@semantic-release/git": "^10.0.1",
134
- "@semantic-release/github": "^11.0.2",
137
+ "@semantic-release/github": "^11.0.3",
135
138
  "@semantic-release/release-notes-generator": "^14.0.3",
136
139
  "husky": "^9.1.7",
137
- "lint-staged": "^15.5.1",
138
- "semantic-release": "^24.2.3"
140
+ "lint-staged": "^16.1.0",
141
+ "semantic-release": "^24.2.5"
139
142
  },
140
143
  "overrides": {
141
- "graceful-fs": "^4.2.11"
144
+ "inflight": "^1.0.7",
145
+ "graceful-fs": "^4.2.11",
146
+ "glob": "^11.0.2",
147
+ "rimraf": "^4.3.0",
148
+ "source-map-url": "^0.4.1",
149
+ "source-map-resolve": "^0.6.0",
150
+ "uuid": "^8.3.2"
142
151
  }
143
152
  }
@@ -0,0 +1,30 @@
1
+ // release.config.cjs
2
+ module.exports = {
3
+ branches: ['main'],
4
+ repositoryUrl: 'git@github.com:emulsify-ds/emulsify-core.git',
5
+ plugins: [
6
+ [
7
+ '@semantic-release/commit-analyzer',
8
+ {
9
+ preset: 'angular',
10
+ parserOpts: {
11
+ noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING']
12
+ }
13
+ }
14
+ ],
15
+ [
16
+ '@semantic-release/release-notes-generator',
17
+ {
18
+ preset: 'angular',
19
+ parserOpts: {
20
+ noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING']
21
+ },
22
+ writerOpts: {
23
+ commitsSort: ['subject', 'scope']
24
+ }
25
+ }
26
+ ],
27
+ ['@semantic-release/npm', { npmPublish: false }],
28
+ '@semantic-release/github'
29
+ ]
30
+ }
package/.eslintignore DELETED
@@ -1,2 +0,0 @@
1
- **/*.min.js
2
- **/node_modules/**/*
@@ -1,76 +0,0 @@
1
- {
2
- "extends": [
3
- "eslint:recommended",
4
- "plugin:import/recommended",
5
- "plugin:security/recommended-legacy",
6
- "plugin:prettier/recommended"
7
- ],
8
- "plugins": [
9
- "import",
10
- "security",
11
- "prettier"
12
- ],
13
- "root": true,
14
- "env": {
15
- "browser": true,
16
- "es6": true,
17
- "node": true
18
- },
19
- "globals": {
20
- "expect": true,
21
- "it": true,
22
- "describe": true
23
- },
24
- "parser": "@babel/eslint-parser",
25
- "parserOptions": {
26
- "requireConfigFile": false,
27
- "babelOptions": {
28
- "babelrc": false,
29
- "configFile": false
30
- }
31
- },
32
- "rules": {
33
- "strict": 0,
34
- "consistent-return": ["off"],
35
- "no-underscore-dangle": ["off"],
36
- "max-nested-callbacks": ["warn", 3],
37
- "import/extensions": ["off"],
38
- "import/no-unresolved": ["off"],
39
- "import/no-extraneous-dependencies": ["warn"],
40
- "import/no-mutable-exports": ["warn"],
41
- "no-plusplus": ["warn", {
42
- "allowForLoopAfterthoughts": true
43
- }],
44
- "no-param-reassign": ["off"],
45
- "no-prototype-builtins": ["off"],
46
- "prettier/prettier": ["error", { "singleQuote": true }],
47
- "valid-jsdoc": ["warn", {
48
- "prefer": {
49
- "returns": "return",
50
- "property": "prop"
51
- },
52
- "requireReturn": false
53
- }],
54
- "no-unused-vars": ["warn"],
55
- "operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
56
- "quotes": ["error", "single"]
57
- },
58
- "settings": {
59
- "import/ignore": [
60
- "\\.(scss|less|css)$"
61
- ],
62
- "import/resolver": {
63
- "node": {
64
- "extensions": [
65
- ".js",
66
- ".jsx"
67
- ],
68
- "moduleDirectory": [
69
- "src",
70
- "node_modules"
71
- ]
72
- }
73
- }
74
- }
75
- }
76
-
@@ -1,5 +0,0 @@
1
- function requireAll(r) {
2
- r.keys().forEach(r);
3
- }
4
-
5
- requireAll(require.context('../../../../../assets/icons/', true, /\.svg$/));
package/release.config.js DELETED
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- tagFormat: '${version}',
3
- branches: ['main'],
4
- repositoryUrl: 'git@github.com:emulsify-ds/emulsify-core.git',
5
- plugins: [
6
- '@semantic-release/commit-analyzer',
7
- '@semantic-release/release-notes-generator',
8
- ['@semantic-release/npm', { npmPublish: false }],
9
- '@semantic-release/github',
10
- ],
11
- };