Skip to content

Commit ace3ef1

Browse files
koskinparkandypost
authored andcommitted
Added @drupal/once to storybook
1 parent b6b4537 commit ace3ef1

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

packages/kaizen-tg/_templates/drupal-9-theme/new/.storybook/preview-head.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
to: <%= h.src() %>/<%= h.changeCase.lower(name) %>/.storybook/preview-head.html
33
---
44
<!--
5-
We use drupal's once() function which is an analogue of jquery.once()
6-
in our component's javascript.
5+
Put here anything you want to attach in <head>
76
-->
8-
<script src="https://unpkg.com/@drupal/once"></script>

packages/kaizen-tg/_templates/drupal-9-theme/new/.storybook/preview.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ window.svgSpritePath = svgSpritePath;
1414
// Extend Twig.js with drupal filters.
1515
import Twig from 'twig';
1616
import twigDrupalFilters from 'twig-drupal-filters';
17+
import once from '@drupal/once';
18+
window.once = once;
1719
twigDrupalFilters(Twig);

packages/kaizen-tg/_templates/drupal-9-theme/new/packages/components/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ to: <%= h.src() %>/<%= h.changeCase.lower(name) %>/packages/components/package.j
55
"name": "@<%= h.changeCase.lower(name) %>/components",
66
"version": "1.0.0",
77
"main": "index.js",
8-
"license": "MIT"
8+
"license": "MIT",
9+
"dependencies": {
10+
"@drupal/once": "^1.0.1"
11+
}
912
}

packages/kaizen-tg/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@skilld/kaizen-tg",
3-
"version": "2.0.0-alpha.7",
3+
"version": "2.0.0-alpha.8",
44
"description": "Kaizen drupal theme generator",
55
"bin": "index.js",
66
"main": "index.js",

0 commit comments

Comments
 (0)