Problem/Motivation

Hey Guys!

I'm experiencing some issues while maintaining a few D8 sites with Bootstrap 8.x-3.x due to the approaches used when the themes were built, some of them, even a year ago.

I'm willing to help to work on the docs files and setup the guidelines of how (and when), starterkits should be used.

We are definitely getting a lot of D8 work at our Company and would love to help setting up a pattern on this.

Proposed resolution

Improve the documentation on the starterkits beyond the actual setup instructions with a few:

  • Use examples.
  • Upgrade instructions
  • Good Practices
  • (...)

Specifically:
http://drupal-bootstrap.org/api/bootstrap/starterkits%21cdn%21README.md/...
http://drupal-bootstrap.org/api/bootstrap/starterkits%21less%21README.md...
http://drupal-bootstrap.org/api/bootstrap/starterkits%21sass%21README.md...

Remaining tasks

Use cases, ideas, whatever you think may help as tips, will be great. Everyone is invited to post. Mark @markcarver, would be great to have some long term thoughts about any trend you think may be good to put in, or even links to some threads you think worth to have in too (and thanks for all you have done for Drupal/Bootstrap...) congrats it is on #1 Contrib Theme, a huuuuge percent of that, thanks to you.

Comments

jorgediazhav created an issue. See original summary.

jorgediazhav’s picture

Ok, here I go with a few ones. I will appreciate some feedback and hopefully this can turn into docs somehow:

"sass" starterkit

The SASS starterkit is intended to be used when a local copy of Bootstrap codebase is be included on the site, instead of being loaded from an external CDN provider or a minified one.

  1. Download Bootstrap 3 SASS source, or do it install via composer, https://github.com/twbs/bootstrap-sass Preferably on "/libraries" although the SASS files don't need to be accessible through the web as these will be compiled, the JS files do.
  2. Use the following reference (depending on your theme folder structure, on this case /themes/custom/THEMENAME) to reference Bootstrap JS files from the theme THEMENAME.libraries.yml
bootstrap-scripts:
  js:
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/affix.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/alert.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/button.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/carousel.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/collapse.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/dropdown.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/modal.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/tooltip.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/popover.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/scrollspy.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/tab.js: {}
    ./../../../libraries/twbs/bootstrap-sass/assets/javascripts/bootstrap/transition.js: {}
markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

No. A theme's source files shouldn't live in "libraries". I understand that some people think this is acceptable, but it's not. It's flat out just wrong. This becomes more apparent when dealing with multi-leveled base/sub-themes and why "base themes" (as a concept) exists in the first place. Furthermore, adding documentation like ./../../../ is extremely confusing to developers, let alone newcomers.

I'm tempted to close this because it's not really offering anything new from the existing documentation. I would also appreciate patches over inline comments like the one above as well.

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
Issue tags: -starterkit, -CDN, -Sass, -LESS, -Documentation

No activity/response.