Comments (4)
Hi @averet-lea,
thank you for testing and for your feedback. 👍 I would say if you already have an app with this naming and everything works for you at the moment, it is fine to keep it this way. I can totally understand that it can be a headache to change it afterwards. But for future Apps/Plugins I would stick with PascalCase.
We also adjusted the app docs now to make it more clear.
If the issue is resolved for you, you can already close it. In the meantime we will check what change fixed it and post another comment.
from shopware.
We found the following existing issues which may help or are related to your topic:
- [Github] fix: Make sure that the Storefront scripts are only included once
- Compile theme at the end of build-storefront.sh #71
- Compiled storefront JS not executed by default installation
from shopware.
Hi @averet-lea,
sorry for my late reply.
Thank you for providing a test app, thats much appreciated. 👍
We would actually recommend to use PascalCase
/UpperCamelCase
for app as well as plugin names. But admittedly it is not that explicitly told in the app base guide as it is in the plugin base guide at the moment. In the app docs all examples are PascalCase wheras the plugin docs additionally state "written in UpperCamelCase".
https://developer.shopware.com/docs/guides/plugins/plugins/plugin-base-guide.html#name-your-plugin
The new sub-folder inside dist/storefront/js/your-app-technical-name/
is expected in 6.6 and will be copied later into /public/theme
. This is needed so webpack knows from which folder async JS files are supposed to be loaed. Each app has its own folder for separation and to prevent naming conflicts. With the async JS possibility there can now be more generated JS dist files in an app/plugin. Previously everything was merged into the all.js in 6.5.
Your example repo was supposed to be used as an app, right? Because it also has a composer.json but no plugin class so I was not 100% sure. But installing as app worked out fine.
I was not able to reproduce the issue The "custom/apps/TestABC_DEF/Resources/app/storefront/dist/storefront/js/test-a-b-c_-d-e-f" directory does not exist.
- Installed and activated as an app
- Run
composer build:js:storefront
(Also runstheme:compile
) - Compiled as expected with output:
# Plugin "TestABC_DEF": Injected successfully
✔ Shopware 6 Storefront
Compiled successfully in 1.32s
✔ TestABC_DEF
shopware-6-storefront:
78 assets
617 modules
shopware-6-storefront (webpack 5.89.0) compiled successfully in 1339 ms
test-a-b-c--d-e-f:
1 asset
10 modules
test-a-b-c--d-e-f (webpack 5.89.0) compiled successfully in 349 ms
> cd src/Storefront/Resources/app/storefront && node copy-to-vendor.js
- copied "/Users/tobiasberge/www/platform/src/Storefront/Resources/app/storefront/node_modules/tiny-slider" to "/Users/tobiasberge/www/platform/src/Storefront/Resources/app/storefront/vendor/tiny-slider"
- copied "/Users/tobiasberge/www/platform/src/Storefront/Resources/app/storefront/node_modules/bootstrap" to "/Users/tobiasberge/www/platform/src/Storefront/Resources/app/storefront/vendor/bootstrap"
- copied "/Users/tobiasberge/www/platform/src/Storefront/Resources/app/storefront/node_modules/flatpickr" to "/Users/tobiasberge/www/platform/src/Storefront/Resources/app/storefront/vendor/flatpickr"
✓ Done, all directories / files copied successfully.
Execution time: 167.880917ms
> @php bin/console theme:compile
Start theme compilation
Compiling theme for sales channel for : 018e13c4f03670739042fc11ef720fcb
! [NOTE] Took 1.931193 seconds
I can also see the console.log
with init
as well as the apps <script>
tag.
Maybe you can try again with the latest rc-4 or trunk
since it was tested with rc-2.
And you always have the option to rename everything to PascalCase
then you are on the safe side. This works the same in 6.5 and 6.6.
from shopware.
Hello @tobiasberge,
Thank you very much for your detailed answer!
Sorry for replying only now (missed the notification).
I've just tried it with rc-4 (using bin/build-storefront.sh
) and now it works correctly.
So maybe something was wrong with rc-2, rc-3.
It's definitely a good idea about renaming to PascalCase
, but what if we already have an app registered in Shopware Store and it's technical name has underscore in it's name (the hint there says that 'the technical name is unique and can't be changed afterwards')? I suppose it will be hard to change the name there:)
But certainly for new extensions we should follow PascalCase
.
So, as a conclusion: no more bug in 6.6.0.0-rc-4.
Of course, it would be nice to know what the cause was, but at least everything works now.
Should I close the issue, or will you do it with some comment from your side (or some further investigation if required)?
from shopware.
Related Issues (20)
- Installer does not accept existing database (does not detect fresh install from console) HOT 1
- ProductIndexer run out of memory in case of over 5.000 variants HOT 2
- Original cart deliveries are changed in DeliveryProcessor HOT 1
- Storefront listing plugin onpopstate event is triggered by anchor "jump" links HOT 1
- CartLoadRoute is called with unauthenticated SalesChannelContext via CacheResponseSubscriber after LoginRoute HOT 4
- Cart is lost after logging in again HOT 4
- Shopware6 not installing in Cpanel server. HOT 2
- App script macros return Twig\Markup instance instead of actual return value HOT 2
- Regression - Can't login if sales domain has custom paths - Unable to find a matching sales channel for the request HOT 3
- Icons misplaced when adjusting font size globally HOT 1
- Document generation only supports PDF files HOT 2
- Add connection profiler if "--profile" is used for CLI commands HOT 2
- You must call "setEnvironment()" before calling "Twig\\Extension\\EscaperExtension::setEscaper()". HOT 3
- Control settings "None" on image sliders don't work HOT 2
- Meta information in landing pages is not inherited HOT 3
- Custom field (image) in list view: Not displayed when on paginated pages. But displayed when force refresh paginated list-view page. HOT 2
- Shopware v.6.6 stateMachineState for delivery and payment is always = (null) HOT 2
- CMS form data is not cleared from local storage after form is submitted HOT 4
- The selection of a main variant doesn't have any effect HOT 1
- Admin: Unable to move category as first child into another category HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopware.