@emulsify/core 1.1.1 → 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.
@@ -18,4 +18,4 @@ jobs:
18
18
  # You can target a repository in a different organization
19
19
  # to the issue
20
20
  project-url: https://github.com/orgs/emulsify-ds/projects/6
21
- github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
21
+ token: ${{ secrets.ADD_TO_PROJECT_PAT }}
@@ -4,7 +4,7 @@ on:
4
4
  - cron: "20 20 * * *"
5
5
  push:
6
6
  branches:
7
- - master
7
+ - main
8
8
 
9
9
  jobs:
10
10
  add-contributors:
@@ -0,0 +1,21 @@
1
+ name: Add to projects
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ pull_request:
8
+ types:
9
+ - opened
10
+
11
+ jobs:
12
+ add-to-project:
13
+ name: Add issue to project
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/add-to-project@v0.3.0
17
+ with:
18
+ # You can target a repository in a different organization
19
+ # to the issue
20
+ project-url: https://github.com/orgs/emulsify-ds/projects/6
21
+ github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
@@ -0,0 +1,21 @@
1
+ name: Add to projects
2
+
3
+ on:
4
+ issues:
5
+ types:
6
+ - opened
7
+ pull_request:
8
+ types:
9
+ - opened
10
+
11
+ jobs:
12
+ add-to-project:
13
+ name: Add issue to project
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/add-to-project@v0.3.0
17
+ with:
18
+ # You can target a repository in a different organization
19
+ # to the issue
20
+ project-url: https://github.com/orgs/emulsify-ds/projects/6
21
+ token: ${{ secrets.ADD_TO_PROJECT_PAT }}
@@ -0,0 +1,23 @@
1
+ name: Add contributors
2
+ on:
3
+ schedule:
4
+ - cron: "20 20 * * *"
5
+ push:
6
+ branches:
7
+ - master
8
+
9
+ jobs:
10
+ add-contributors:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: BobAnkh/add-contributors@master
15
+ with:
16
+ CONTRIBUTOR: "### Contributors"
17
+ COLUMN_PER_ROW: "6"
18
+ ACCESS_TOKEN: ${{secrets.ADD_TO_PROJECT_PAT}}
19
+ IMG_WIDTH: "100"
20
+ FONT_SIZE: "14"
21
+ PATH: "/README.md"
22
+ COMMIT_MESSAGE: "docs(README): update contributors"
23
+ AVATAR_SHAPE: "round"
@@ -0,0 +1,23 @@
1
+ name: Add contributors
2
+ on:
3
+ schedule:
4
+ - cron: "20 20 * * *"
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ add-contributors:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: BobAnkh/add-contributors@master
15
+ with:
16
+ CONTRIBUTOR: "### Contributors"
17
+ COLUMN_PER_ROW: "6"
18
+ ACCESS_TOKEN: ${{secrets.ADD_TO_PROJECT_PAT}}
19
+ IMG_WIDTH: "100"
20
+ FONT_SIZE: "14"
21
+ PATH: "/README.md"
22
+ COMMIT_MESSAGE: "docs(README): update contributors"
23
+ AVATAR_SHAPE: "round"
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ stories: [
3
+ '../../../../components/**/*.stories.@(js|jsx|ts|tsx)',
4
+ ],
5
+ addons: [
6
+ '../../../@storybook/addon-a11y',
7
+ '../../../@storybook/addon-links',
8
+ '../../../@storybook/addon-essentials',
9
+ '../../../@storybook/addon-themes',
10
+ '../../../@storybook/addon-styling-webpack'
11
+ ],
12
+ core: {
13
+ builder: 'webpack5',
14
+ },
15
+ framework: {
16
+ name: '@storybook/html-webpack5',
17
+ options: {},
18
+ },
19
+ docs: {
20
+ autodocs: true,
21
+ },
22
+ };
@@ -0,0 +1,37 @@
1
+ import { useEffect } from '@storybook/client-api';
2
+ import Twig from 'twig';
3
+ import { setupTwig } from './setupTwig';
4
+
5
+ (async () => {
6
+ let compiled;
7
+ let preview;
8
+ // GLOBAL CSS
9
+ try {
10
+ compiled = await import('../../../dist/css/style.css');
11
+ } catch (e) { }
12
+ // Custom theme preview config if it exists.
13
+ try {
14
+ preview = await import('../../../../config/emulsify-core/storybook/preview');
15
+ } catch (e) {}
16
+ })();
17
+
18
+ // If in a Drupal project, it's recommended to import a symlinked version of drupal.js.
19
+ import './_drupal.js';
20
+
21
+ export const decorators = [
22
+ (Story, { args }) => {
23
+ const { renderAs } = args || {};
24
+
25
+ // Usual emulsify hack to add Drupal behaviors.
26
+ useEffect(() => {
27
+ Drupal.attachBehaviors();
28
+ }, [args]);
29
+ return Story();
30
+ },
31
+ ];
32
+
33
+ setupTwig(Twig);
34
+
35
+ export const parameters = {
36
+ actions: { argTypesRegex: '^on[A-Z].*' },
37
+ };
@@ -0,0 +1,30 @@
1
+ import { useEffect } from '@storybook/client-api';
2
+ import Twig from 'twig';
3
+ import { setupTwig } from './setupTwig';
4
+
5
+ // GLOBAL CSS
6
+ import('../../../../dist/css/style.css');
7
+
8
+ // Custom theme preview config if it exists.
9
+ import('../../../../config/emulsify-core/storybook/preview');
10
+
11
+ // If in a Drupal project, it's recommended to import a symlinked version of drupal.js.
12
+ import './_drupal.js';
13
+
14
+ export const decorators = [
15
+ (Story, { args }) => {
16
+ const { renderAs } = args || {};
17
+
18
+ // Usual emulsify hack to add Drupal behaviors.
19
+ useEffect(() => {
20
+ Drupal.attachBehaviors();
21
+ }, [args]);
22
+ return Story();
23
+ },
24
+ ];
25
+
26
+ setupTwig(Twig);
27
+
28
+ export const parameters = {
29
+ actions: { argTypesRegex: '^on[A-Z].*' },
30
+ };
@@ -0,0 +1,87 @@
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
+ 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
+ };
@@ -0,0 +1,87 @@
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
+ 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
+ };
@@ -3,11 +3,11 @@ module.exports = {
3
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',
@@ -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';
@@ -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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emulsify/core",
3
- "version": "1.1.1",
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,13 +119,13 @@
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
  },