Skip to content

Commit

Permalink
Merge pull request #3 from sarahjean/pru-1-st
Browse files Browse the repository at this point in the history
PRU-1: Update composer file to automatically pull in dependencies for Prudentia theme.
  • Loading branch information
mayelaatf committed Apr 9, 2021
2 parents cc60a0a + 5e20b76 commit 1b07478
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ It uses GULP to compile SASS and copy USWDS assets.

INSTALLATION
------------
1. Install uswds_base theme
`lando composer require 'drupal/uswds_base:^2.4'`

2. Install Prudentia theme
1. Install Prudentia theme
`lando composer require atf/prudentia`

3. Copy the "**yourthemename**" folder from the "*/prudentia/starterkit*" dir to the "*themes/custom*" directory in your codebase.
Expand Down Expand Up @@ -60,7 +57,8 @@ tooling:
- Runs on lando rebuild and installs Node and NPM in your docker container, adds gulp and other packages and their dependencies to the 'node_modules' in /themes.contrib/prudentia directory.
- Assumes your webroot folder name is "web". You might need to change it with "docroot" or with the name of your webroot folder.

- You need to install/enable **Components Library** Drupal module (https://www.drupal.org/project/components) to use the Prudentia components
- The Prudentia theme depends on the Components Library Drupal module (https://www.drupal.org/project/components) and the module must be enabled to enable the theme. If you install the theme via composer the module will be pulled into your codebase automatically.


- This theme uses as reference the uswds-gulp repo to configure npm and gulp files.

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
"type": "drupal-theme",
"license": "GPL-2.0-or-later",
"minimum-stability": "dev",
"require": {}
"require": {
"drupal/uswds_base": "^2.4",
"drupal/components": "^2.2"
}
}
10 changes: 6 additions & 4 deletions prudentia.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ base theme: uswds_base
package: 'USWDS Base'
core: 8.x
core_version_requirement: ^8 || ^9
dependencies:
- drupal:components
logo: 'logo.png'
screenshot: 'screenshot.png'

Expand All @@ -29,7 +31,7 @@ libraries:
# if Prudentia is set as a theme default uncomment this
# - prudentia/assets

component-libraries:
uswds:
paths:
- ../../contrib/prudentia/components
components:
namespaces:
uswds:
- ../../contrib/prudentia/components
11 changes: 4 additions & 7 deletions starterkit/yourthemename/yourthemename.info.rename.me.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ regions:
libraries:
- 'yourthemename/assets'

component-libraries:
uswds:
paths:
components:
namespaces:
uswds:
- ../../../themes/contrib/prudentia/components

yourthemename:
paths:
yourthemename:
- components

0 comments on commit 1b07478

Please sign in to comment.