Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mpysiak committed Sep 18, 2024
1 parent dedd5fb commit d5bae70
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 31 deletions.
6 changes: 3 additions & 3 deletions config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ sylius_locale:

sylius_order:
resources:
order:
classes:
model: App\Entity\Order\Order
# order:
# classes:
# model: App\Entity\Order\Order
order_item:
classes:
model: App\Entity\Order\OrderItem
Expand Down
4 changes: 3 additions & 1 deletion config/packages/twig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
twig:
paths: ['%kernel.project_dir%/templates']
paths:
'%kernel.project_dir%/templates': ~
'%kernel.project_dir%/vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/assets/': 'SyliusShopAssets'
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
"bootstrap": "^5.3.0",
"choices.js": "^10.2.0",
"infinite-tree": "^1.17.1",
"flag-icons": "^7.2.3",
"slugify": "^1.6",
"stimulus-use": "^0.52",
"@sylius-ui/frontend": "^1.0",
"@symfony/ux-autocomplete": "file:vendor/symfony/ux-autocomplete/assets",
"@symfony/ux-live-component": "file:vendor/symfony/ux-live-component/assets",
"@sylius-ui/admin": "file:vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle",
"@sylius-ui/shop": "file:vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle",
"tom-select": "^2.2.2"
}
}

This file was deleted.

2 changes: 0 additions & 2 deletions templates/bundles/SyliusAdminBundle/_scripts.html.twig

This file was deleted.

2 changes: 0 additions & 2 deletions templates/bundles/SyliusAdminBundle/_styles.html.twig

This file was deleted.

20 changes: 2 additions & 18 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path');
const Encore = require('@symfony/webpack-encore');

const SyliusAdmin = require('@sylius-ui/admin');
const SyliusShop = require('@sylius-ui/shop');

const syliusBundles = path.resolve(__dirname, 'vendor/sylius/sylius/src/Sylius/Bundle/');
const uiBundleScripts = path.resolve(syliusBundles, 'UiBundle/Resources/private/js/');
Expand All @@ -11,24 +12,7 @@ const uiBundleResources = path.resolve(syliusBundles, 'UiBundle/Resources/privat
const adminConfig = SyliusAdmin.getWebpackConfig(path.resolve(__dirname));

// Shop config
Encore
.setOutputPath('public/build/shop/')
.setPublicPath('/build/shop')
.addEntry('shop-entry', './vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/private/entry.js')
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
.enableSassLoader();

const shopConfig = Encore.getWebpackConfig();

shopConfig.resolve.alias['sylius/ui'] = uiBundleScripts;
shopConfig.resolve.alias['sylius/ui-resources'] = uiBundleResources;
shopConfig.resolve.alias['sylius/bundle'] = syliusBundles;
shopConfig.name = 'shop';

Encore.reset();
const shopConfig = SyliusShop.getWebpackConfig(path.resolve(__dirname));

// App shop config
Encore
Expand Down

0 comments on commit d5bae70

Please sign in to comment.