-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move package.json files for tests to a different folders (admin and storefront), e.g. a subfolder tests #217
Comments
Hi thank you for this as far as I know, this is based on the guides of Shopware. theres a clear section for prod and dev dependencies in package.json so i think its better if shopware itself get fixed...or maybe theres a reason for this |
@boxblinkracer Dev dependencies can be required by webpack to correctly do the dependency build. E.g. usually in dependencies one puts things that are deployed in the end but things like webpack/babel/file loaders etc. are still required to build it, which are to be placed in devDependencies. devDependencies for node are a bit different to require-dev in PHP. They are modules that are not required during runtime but still required during development / building of assets. So if I want to build my plugin javascript files and the mollie plugin is installed, those dependencies are could still be required. One scenario would be a plugin adding a fileloader and adding webpack build adjustments (which is possible), in this case the file loader will be required to successfully completely the build. However, if I understand it correctly you only use it for tests, so the question is are those dependencies needed at all. Probably not but Shopware cannot make that distinction. Your plugin can though by e.g. moving the package.json in a Though I could be wrong but from what I understand that's how it is, e.g. according to: https://medium.com/@dylanavery720/npmmmm-1-dev-dependencies-dependencies-8931c2583b0c |
Hi there thanks for this, ok so you basically just mean, now i got you, right? |
@boxblinkracer Yes. I think it would make sense to do so? |
With current shopware production template all plugin dependencies call a
npm install
for all installed plugins in admin and storefront build processes:https://github.com/shopware/production/blob/v6.4.5.1/bin/build-storefront.sh#L32
This means that the npm install is triggered for your tests which seems unnecessary if those dependencies are really only necessary for tests.
The text was updated successfully, but these errors were encountered: