thinkshout / thinkwp-starter-theme

Forked for ThinkShout from Timber: a dead-simple theme that you can build anything from
MIT License
1 stars 0 forks source link

Base Assets repo to be shared by Drupal and WP #39

Open JulesKhong opened 9 months ago

JulesKhong commented 9 months ago

Description

Base tokens, tailwind components, components and blocks will live in two places: base Drupal theme and base WP theme. Are there pieces that could be shared, and put into another repo? Are there ways to make these more maintainable

Dev

We have a base build in the WP base theme, but it also needs to live in FORUM and Drupal soon for some upcoming work. Do we have a separate repo? Is there a smart way to pull in directories based on whether you’re in WP or Drupal? How do we make maintaining the base build and adding to it as streamlined as possible?

SHARED FILES/DIRECTORIES: In the BASE BUILD theme for Drupal and WP

Things that are different: field data values on the views/block/* directories for each block. Do we have a WP one and a Drupal one and you delete the ones not in use? (edited)

mariacha commented 9 months ago

I'm interested in helping with this, but will need guidance on what to do!

JulesKhong commented 3 months ago

Test Base Script (test-base-script)

p: login

Step 1: Use Pantheon Build tools to create the project.

Create the new project, based off of the Pantheon Build tools:

At this point, the following things should be true. Stop and check:

Step 2. Customize the repo

There are a handful of things we always do on sites. This set of instructions takes care of that.

Replace Master branch with Main

Give ownership to ThinkShout

Add Drupal integrations (Drupal only)

Preserve the develop branch

Git-Ignore some useful things

Add helpful packages to composer.json (Drupal version)

Make your code sniffer smarter

Make your README real (Drupal version)

Improve your Visual Regression reliability

Add Robo (Drupal only):

Create your local site connection (Wordpress only)

Step 3. Configure Circle CI options

To get Circle to behave the way we want it, it's helpful to set some options in the Circle project that Pantheon created as part of the script you ran above.

Step 4. Set up the Wiki on github

Step 5. Slack integration (optional)

Step 6. Create your theme

(Drupal version)

(Wordpress version)

Step 7. Compile your theme with circle

Instead of committing our css files directly to our repo, we are compiling them with node on circle. To do that, add the following to your ".circleci/config" file.

- run: name: Install n and switch to 16 command: npm install -g n && n 16 - run: name: Compile the theme command: cd web/themes/custom/your_theme && npm ci - run: name: Format code command: cd web/themes/custom/your_theme && npm run theme.bundle.prod - persist_to_workspace: root: . paths: - bash_env.txt - web/themes/custom/your_theme

Step 8. Set up auto-config-export (Drupal only)

You should already have a lot of the items in place to use config_suite, but to get things properly set up do the following:

Step 9: Tell ThinkShout about your project