Commit b835a00b authored by Abdullah Yassin's avatar Abdullah Yassin
Browse files

Issue #3293118: Add storybook configuration files and packages

parent a960f4f1
Loading
Loading
Loading
Loading

.storybook/config.js

0 → 100755
+9 −0
Original line number Diff line number Diff line
import { configure } from '@storybook/html';
import Twig from 'twig';
import twigDrupal from 'twig-drupal-filters';
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap';
// Add the filters to Twig instance.
twigDrupal(Twig);

configure(require.context('../src/components', true, /\.stories\.js$/), module);
+15 −0
Original line number Diff line number Diff line
const path = require('path');

module.exports = ({ config }) => {

  // Twig:
  config.module.rules.push({
    test: /\.twig$/,
    use: [
      {
        loader: 'twig-loader',
      },
    ],
  });
  return config;
};
 No newline at end of file
+19 −10
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@
		"watch": "mix watch",
		"watch-poll": "mix watch -- --watch-options-poll=1000",
		"hot": "mix watch --hot",
		"production": "mix --production"
		"production": "mix --production",
		"storybook": "start-storybook"
	},
	"devDependencies": {
		"@popperjs/core": "^2.9.2",
@@ -22,16 +23,24 @@
		"cross-env": "^7.0.3",
		"laravel-mix": "^6.0.18",
		"laravel-mix-copy-watched": "^2.3.1",
		"laravel-mix-stylelint": "^1.0.0",
		"node-sass": "^7.0.0",
		"postcss-scss": "^4.0.2",
		"sass": "^1.32.11",
		"sass-loader": "^11.0.1",
    "postcss-scss": "^4.0.2",
		"stylelint": "^14.1.0",
		"laravel-mix-stylelint": "^1.0.0",
		"stylelint-config-prettier": "^9.0.3",
		"stylelint-config-recess-order": "^3.0.0",
		"stylelint-config-standard": "^24.0.0",
		"stylelint-webpack-plugin": "^3.1.0"
	},
	"dependencies": {}
	"dependencies": {
		"@babel/core": "^7.18.6",
		"@storybook/html": "^6.5.9",
		"babel-loader": "^8.2.5",
		"drupal-attribute": "^1.0.2",
		"twig": "^1.15.4",
		"twig-drupal-filters": "^3.1.2",
		"twig-loader": "^0.5.5"
	}
}
+4729 −120

File changed.

Preview size limit exceeded, changes collapsed.