Skip to content

Commit

Permalink
chore(v5): Updating twing loader configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
planctus committed Jan 10, 2025
1 parent 24908fa commit ecab24e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/playground/ec/.storybook/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const pageAbsPath = path.resolve(
__dirname,
'../../../implementations/twig/pages',
);
const componentNewAbsPath = path.resolve(__dirname, '../../../components');
const compositionsNewAbsPath = path.resolve(__dirname, '../../../compositions');
const pageNewAbsPath = path.resolve(__dirname, '../../../page-example');

const loader = new TwingLoaderFilesystem(componentAbsPath);

Expand All @@ -23,6 +26,9 @@ if (typeof loader.addPath === 'function') {
loader.addPath(componentAbsPath, 'ecl');
loader.addPath(compositionsAbsPath, 'ecl');
loader.addPath(pageAbsPath, 'ecl');
loader.addPath(componentNewAbsPath, 'ecl');
loader.addPath(compositionsNewAbsPath, 'ecl');
loader.addPath(pageNewAbsPath, 'ecl');
}

module.exports = new TwingEnvironment(loader, { autoescape: false });
6 changes: 6 additions & 0 deletions src/playground/eu/.storybook/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const pageAbsPath = path.resolve(
__dirname,
'../../../implementations/twig/pages',
);
const componentNewAbsPath = path.resolve(__dirname, '../../../components');
const compositionsNewAbsPath = path.resolve(__dirname, '../../../compositions');
const pageNewAbsPath = path.resolve(__dirname, '../../../page-example');

const loader = new TwingLoaderFilesystem(componentAbsPath);

Expand All @@ -23,6 +26,9 @@ if (typeof loader.addPath === 'function') {
loader.addPath(componentAbsPath, 'ecl');
loader.addPath(compositionsAbsPath, 'ecl');
loader.addPath(pageAbsPath, 'ecl');
loader.addPath(componentNewAbsPath, 'ecl');
loader.addPath(compositionsNewAbsPath, 'ecl');
loader.addPath(pageNewAbsPath, 'ecl');
}

module.exports = new TwingEnvironment(loader, { autoescape: false });

1 comment on commit ecab24e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.