Guide/best practices for how to use Radix the proper way

Created on 25 July 2022, almost 2 years ago
Updated 16 February 2023, over 1 year ago

I'm "porting" a subtheme from a previous version of Radix to the latest Bootstrap 5 version, and I'm confused by the default need to use npm for this, like, why the theme even has a "src" folder.

The instructions expect npm/nodejs knowledge on the part of the user, and the configuration of generated subthemes expects a "build" folder, but for people who don't use or aren't familiar with that workflow, there's no indication in the documentation that they could be using it "wrong."

Everyone is different, but if a user does want to compile the code in their subtheme (SASS, Typescript, or something else), surely the theme should stay out of it and let you compile using your preferred method (I have a local sass compiler and just upload the css, for example). Having the default usage requiring you to use npm to "build" your subtheme seems needlessly complex and prescriptive, preventing both novice users, part-time maintainers, and simpler website setups (say, on shared hosting) from easily using this theme.

So, I have two questions:

  1. I can "hand build" my subtheme, but is there a best practice for creating a one without using npm? Do I need to "build" the base theme first?
  2. Am I just off-base here? Is there an obvious reason I'm missing why it's set up this way?

I marked this as a feature request because I'd like there to be at least a non-npm workflow option for users.

✨ Feature request
Status

Fixed

Version

5.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States Mark LaCroix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡©πŸ‡ͺGermany kreatIL

    Okay, I went on and created a video explaining a little bit, we can of course document things in details in the future:

    This is great, thank you! Your video was of big help for me.

    There is one thing I have not yet understood. I had thought that when you create folders in "components", the files they contain are automatically taken into account. I removed the default "block" folder from it and now I get error messages:

    ERROR in /components/block/block
    Module not found: Error: Can't resolve '/[local_path]/web/themes/custom/pbs5/src/components/block/block.js' in '/[local_path]/web/themes/custom/pbs5'
    
    ERROR in /js/main.script
    Module not found: Error: Can't resolve '/[local_path]/web/themes/custom/pbs5/src/components/block/block.scss' in '/[local_path]/web/themes/custom/pbs5'
    
    ERROR in /js/main.script
    Module not found: Error: Can't resolve '/[local_path]/web/themes/custom/pbs5/src/js/main.script.js' in '/[local_path]/themes/custom/pbs5'

    I have searched all the files of the subtheme for a statement that embeds "block", but have not found any. Where does the error come from?

  • Status changed to Fixed over 1 year ago
  • Yes that's the Webpack behavior, thanks for the edit

    Closing the ticket for now

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024