Closed (fixed)
Project:
Bootstrap Storybook
Version:
8.x-2.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2020 at 15:31 UTC
Updated:
6 Apr 2020 at 10:09 UTC
Jump to comment: Most recent
Comments
Comment #2
doxigo commentedSorry for the late response, it is now fixed on the new release, was okay on the dev release though
Thanks for the report
Comment #3
jcandan commentedI am so excited about the potential of this project, and I love that it is inspired in part by Radix.
However, this issue has not been fixed. No
composer.jsonfile exists as part of this project to list the php dependencies necessary for this project to work (e.g. Robo).I recommend something like the following (based on Radix's own composer.json file):
I don't have the time at the moment to submit a patch, so this is what I can offer for now. I may have missed dependencies. At the very least, all dependencies should be listed in documentation.
Comment #4
jcandan commentedYeah, maybe, in fact we ought to not explicitly require Robo, but instead note it as a dependency if one wished to use the sub-theme feature. I don't know. I am on the fence now, thinking about it.
Comment #5
jcandan commentedBut, definitely this should still have a composer file and list drupal components as required, and the psr-4 autoloading.
Comment #6
doxigo commentedHey @jcandan, Thanks for your considerations and thoughtful ideas, unfortunately the roadmap of this theme is a lot of features and I'm quite limited in time.
Back to your comment, I personally avoid using a
composer.jsonin the theme because it will cause a lot of issues due to how Drupal handles the dependencies.For instance, right now with Radix you'll get an error if you're more than one person working on a website, imagine the scenario that I install the theme, make the child theme and then commit my changes to git, the next person pulling that changes will get an error due to lack of Components module since people would just run
composer installin the root as usual.The problem can be avoided if we just add it as an extra step to install the Components as a Drupal module itself
but having a composer.json file in theme makes sense in general
let me know what you think
Comment #7
jcandan commentedWouldn't the second person in your scenario get the Components module because it is required? I am not sure I follow.
Comment #8
doxigo commentedUnless you commit the
modules/componentsdirectory itself they wouldn't, the database shows it as enabled but the file is missing, that's an issue right now on Radix, for instance, if you try to install the Radix theme and make a child theme, there won't be anydrupal/componentslisted as requirements in the rootcomposer.jsonfileMaybe we can add another step to readme like:
make sure to run `composer install` inside the theme itself, hm? 🤔
That way you're right we can have it inside the theme as a dependency, But I still think it's going to be misleading since you have a module installed and it's not listed in the root
composer.jsonComment #9
jcandan commentedOkay, this Components bit might need its own ticket, but getting back to Robo, I am still getting the same error above, even after running
composer require --dev consolidation/robo! Thoughts?Comment #10
doxigo commentedAbout your issue have you updated to the latest version/dev?
I've checked and it's fixed, maybe re-download the whole thing and let me know the steps you're taking so I can re-create it
Comment #11
jcandan commentedI had
"drupal/bootstrap_storybook": "^2.5".I ran
composer require drupal/bootstrap_storybook:2.x-devso that I now have"drupal/bootstrap_storybook": "2.x-dev"as per your suggestion. I reran the drush command, but this change did not fix the issue.It's strange, PHPStorm sees TaskAccessor, why doesn't this drush command?
Comment #12
jcandan commentedOh! Duh. I was using global drush that comes installed with Lando. I needed to
composer require --dev drush/drush! Fixed. I would still recommend listing these dependencies in documentation, please. Thanks for your help!Comment #13
doxigo commentedGlad that it worked, thanks for your note, I updated the frontpage readme here
Comment #14
doxigo commentedComment #15
jcandan commentedCool. Still need to note the Robo dependency though, too. :)
Comment #16
jcandan commentedSorry to be a stickler, but the Robo dependency is still not on the project page or in the README.
Comment #18
doxigo commentedSorry I forgot that part. added the `composer.json` let me know if it works alright