-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/update-picture-demo
* master: Update all deps. (#835) Update generator demo yml files to have Demo info above content. (#825) SVG with Tailwind. (#829) TASK :: Revise Drupal + Pattern Lab Directory Structure (#831) Issue/827 10.8.0 drupal docs (#828)
- Loading branch information
Showing
176 changed files
with
3,245 additions
and
1,217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Particle Drupal | ||
|
||
This directory contains Webpack config for Drupal apps within Particle. In | ||
addition it contains a Drupal theme integration and optional helpers module. | ||
This readme assumes Particle is installed inside your Drupal theme. Check | ||
[the Particle docs](https://phase2.gitbook.io/frontend/) for complete details. | ||
|
||
If you'd like to separate your Particle tooling from Drupal's theme, see | ||
[Decoupled Drupal Installation](#decoupling) below. | ||
|
||
## Drupal Integration | ||
|
||
This folder contains two additional directories: `particle_helper` and | ||
`particle_theme`. Due to the process by which Drupal loads services, several | ||
optional Particle-specific functions are expected to exist within a module | ||
separate from the theme. This module can then specify various requirements and | ||
dependencies, which Drupal 8 themes still cannot declare. | ||
|
||
**Important**! The Drupal `particle_helper` module is optional template for | ||
additional integration work you may wish to do. However its Twig extension is | ||
required if you are making use of the `attributify` twig filter. This is needed | ||
to manage the separate requirements of Pattern Lab and Drupal's Twig | ||
environments for common HTML attributes. | ||
|
||
### Standard Drupal Installation: | ||
|
||
1. Move the contents of the `particle_helper` folder to your Drupal | ||
`modules/contrib` directory (optional). | ||
1. Ensure the module is enabled: `drush en particle_helper` (optional). | ||
1. Ensure the theme is enabled: `drush theme:enable particle`. | ||
1. Ensure the theme is set: | ||
`drush config-set system.theme default THEME_MACHINE_NAME`. | ||
|
||
### Decoupled Drupal Installation | ||
|
||
1. Move the contents of the `particle_helper` folder to your Drupal | ||
`modules/contrib` directory. | ||
1. Move the contents of the `particle_theme` folder to your Drupal | ||
`theme/contrib` directory. | ||
1. From the main root of the Particle application, open | ||
`particle.root.config.js` | ||
1. Find the line that starts with `DRUPAL_DIST` | ||
1. Update the `DRUPAL_DIST` line so that the path resolves to the theme created | ||
in step 2. For example, if the Drupal installation is in a folder named | ||
`web`, your line might look like this: | ||
`DRUPAL_DIST: path.resolve('../../web/themes/custom/particle/dist/'),` | ||
1. Ensure the module is enabled: `drush en particle_helper` (optional). | ||
1. Ensure the theme is enabled: `drush theme:enable particle`. | ||
1. Ensure the theme is set: | ||
`drush config-set system.theme default THEME_MACHINE_NAME`. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: 'Particle Helper' | ||
type: module | ||
description: 'Particle Components and Particle Tools. Theme utilities to integrate Drupal with Particle themes.' | ||
core: 8.x | ||
package: 'Particle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
apps/drupal-default/particle_helper/particle_helper.services.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
particle_helper.twig_extension: | ||
arguments: ["@renderer"] | ||
class: Drupal\particle_helper\TwigExtension\ParticleHelperTwig | ||
tags: | ||
- { name: twig.extension } | ||
|
||
particle_helper.particle_tools: | ||
class: Drupal\particle_helper\Tools\ParticleTools | ||
|
||
particle_helper.atoms: | ||
class: Drupal\particle_helper\Components\Atoms | ||
|
||
particle_helper.molecules: | ||
class: Drupal\particle_helper\Components\Molecules |
2 changes: 1 addition & 1 deletion
2
...e/particle_theme/src/Components/Atoms.php → .../particle_helper/src/Components/Atoms.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rticle_theme/src/Components/Molecules.php → ...ticle_helper/src/Components/Molecules.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...theme/src/ParticleTools/ParticleTools.php → ...elper/src/ParticleTools/ParticleTools.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.