-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK :: Revise Drupal + Pattern Lab Directory Structure (#831)
* Revise Drupal Theme and App Dirs * Update Module Name * Rename PL App and Path * Remove Node Prefix from Package * Add markdown formatter, format markdown * remove link from readme * Tune up on fmt and pl webpack Co-authored-by: Christopher Bloom <[email protected]>
- Loading branch information
1 parent
d8d652e
commit 57a64ec
Showing
157 changed files
with
248 additions
and
212 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,43 +5,43 @@ | |
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
size, disability, ethnicity, sex characteristics, gender identity and | ||
expression, level of experience, education, socio-economic status, nationality, | ||
personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
Project maintainers have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, or to ban temporarily or permanently any | ||
contributor for other behaviors that they deem inappropriate, threatening, | ||
offensive, or harmful. | ||
|
||
## Scope | ||
|
||
|
@@ -55,20 +55,23 @@ further defined and clarified by project maintainers. | |
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [[email protected]](mailto:[email protected]). All | ||
reported by contacting the project team at | ||
[[email protected]](mailto:[email protected]). All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
obligated to maintain confidentiality with regard to the reporter of an | ||
incident. Further details of specific enforcement policies may be posted | ||
separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at | ||
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
|
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.