Skip to content

Commit

Permalink
OP-546 - webpack dependencies - upgraded to Sylius-2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkalon committed Sep 20, 2024
1 parent 8f5e85a commit 21ad505
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 17 deletions.
27 changes: 15 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
"require": {
"php": "^8.1",
"ext-json": "*",
"friendsofsymfony/elastica-bundle": "^6.0",
"sylius/sylius": "~1.13.0",
"symfony/property-access": "^5.4 || ^6.0",
"symfony/webpack-encore-bundle": "^1.15",
"symfony/proxy-manager-bridge": "^5.4 || ^6.0"
"friendsofsymfony/elastica-bundle": "^6.4",
"sylius/sylius": "~v2.0.0-alpha.1",
"symfony/property-access": "^6.4",
"symfony/proxy-manager-bridge": "^6.4",
"symfony/stimulus-bundle": "^2.19",
"symfony/ux-autocomplete": "^2.19",
"symfony/ux-live-component": "^2.19",
"symfony/webpack-encore-bundle": "^1.15"
},
"require-dev": {
"behat/behat": "^3.6.1",
Expand Down Expand Up @@ -40,11 +43,11 @@
"robertfausk/behat-panther-extension": "^1.1",
"sylius-labs/coding-standard": "^4.2",
"sylius-labs/suite-tags-extension": "^0.2",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0"
"symfony/browser-kit": "^6.4",
"symfony/debug-bundle": "^6.4",
"symfony/dotenv": "^6.4",
"symfony/intl": "^6.4",
"symfony/web-profiler-bundle": "^6.4"
},
"conflict": {
"api-platform/core": "v2.7.17",
Expand All @@ -62,10 +65,10 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.13-dev"
"dev-master": "v2.0.x-dev"
},
"symfony": {
"require": "^5.4 || ^6.0"
"require": "^6.4"
}
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/assets/admin/entry.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'sylius/bundle/AdminBundle/Resources/private/entry';
import 'sylius/bundle/AdminBundle/Resources/assets/entrypoint';
5 changes: 5 additions & 0 deletions tests/Application/assets/controllers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"controllers": {
},
"entrypoints": []
}
2 changes: 1 addition & 1 deletion tests/Application/assets/shop/entry.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'sylius/bundle/ShopBundle/Resources/private/entry';
import 'sylius/bundle/ShopBundle/Resources/assets/entrypoint';
15 changes: 14 additions & 1 deletion tests/Application/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
"dependencies": {
"@babel/polyfill": "^7.0.0",
"@popperjs/core": "^2.11.8",
"@tabler/core": "^1.0.0-beta21",
"apexcharts": "^3.53.0",
"bootstrap": "^5.3.3",
"chart.js": "^3.7.1",
"flag-icons": "^7.2.3",
"infinite-tree": "^1.18.0",
"jquery": "^3.5.0",
"jquery.dirtyforms": "^2.0.0",
"lightbox2": "^2.9.0",
"semantic-ui-css": "^2.2.0",
"slick-carousel": "^1.8.1"
},
"devDependencies": {
"@hotwired/stimulus": "^3.2.2",
"@symfony/stimulus-bridge": "^3.2.2",
"@symfony/ux-autocomplete": "file:../../vendor/symfony/ux-autocomplete/assets",
"@symfony/ux-live-component": "file:../../vendor/symfony/ux-live-component/assets",
"@symfony/webpack-encore": "^1.6.1",
"babel-core": "^6.26.3",
"babel-plugin-external-helpers": "^6.22.0",
Expand All @@ -23,7 +33,10 @@
"eslint-plugin-import": "^2.11.0",
"merge-stream": "^1.0.0",
"sass": "^1.39.2",
"sass-loader": "^12.1.0"
"sass-loader": "^12.1.0",
"slugify": "^1.6.6",
"stimulus-use": "^0.52.2",
"tom-select": "^2.3.1"
},
"scripts": {
"dev": "yarn encore dev",
Expand Down
7 changes: 5 additions & 2 deletions tests/Application/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const path = require('path');
const Encore = require('@symfony/webpack-encore');

const [bitbagElasticsearchShop, bitbagElasticsearchAdmin] = require('../../webpack.config.js')
const [bitbagElasticsearchShop, bitbagElasticsearchAdmin] = require('../../webpack.config.js');

const syliusBundles = path.resolve(__dirname, '../../vendor/sylius/sylius/src/Sylius/Bundle/');

const uiBundleScripts = path.resolve(syliusBundles, 'UiBundle/Resources/private/js/');
Expand All @@ -12,6 +13,7 @@ Encore
.setOutputPath('public/build/shop/')
.setPublicPath('/build/shop')
.addEntry('shop-entry', './assets/shop/entry.js')
.enableStimulusBridge('./assets/controllers.json')
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
Expand All @@ -32,6 +34,7 @@ Encore
.setOutputPath('public/build/admin/')
.setPublicPath('/build/admin')
.addEntry('admin-entry', './assets/admin/entry.js')
.enableStimulusBridge('./assets/controllers.json')
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
Expand All @@ -46,4 +49,4 @@ adminConfig.resolve.alias['sylius/bundle'] = syliusBundles;
adminConfig.externals = Object.assign({}, adminConfig.externals, { window: 'window', document: 'document' });
adminConfig.name = 'admin';

module.exports = [shopConfig, adminConfig, bitbagElasticsearchShop, bitbagElasticsearchAdmin];
module.exports = [shopConfig, adminConfig, bitbagElasticsearchShop, bitbagElasticsearchAdmin];

0 comments on commit 21ad505

Please sign in to comment.