Skip to content

Commit

Permalink
Merge pull request #20 from a8cteam51/rename-prefix
Browse files Browse the repository at this point in the history
Rename prefix
  • Loading branch information
ahegyes authored Aug 21, 2024
2 parents 94e2105 + 7ab3b77 commit 2b4dda7
Show file tree
Hide file tree
Showing 94 changed files with 7,252 additions and 3,913 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/block-json-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '> [!CAUTION]\n> This PR includes a `block.json` file. If you are adding a new block, please ensure this goes into [the WPCOM Special Projects Monorepo](https://github.com/a8cteam51/special-projects-blocks-monorepo) instead. You will find[ full documentation on the process here](https://github.com/a8cteam51/special-projects-blocks-monorepo/wiki). Please discuss with WPComSP Engineering Leads if you believe your block should be exempt from the monorepo.'
body: '> [!CAUTION]\n> This PR includes a `block.json` file. If you are adding a new block, please ensure this goes into [the A8C Special Projects Monorepo](https://github.com/a8cteam51/special-projects-blocks-monorepo) instead. You will find[ full documentation on the process here](https://github.com/a8cteam51/special-projects-blocks-monorepo/wiki). Please discuss with A8CSP Engineering Leads if you believe your block should be exempt from the monorepo.'
})
core.setFailed('This PR included a block.json file and so was rejected.')
14 changes: 7 additions & 7 deletions .github/workflows/fill-in-scaffold.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ const buildTemplate = async ( filePath ) => {
};
} else {
replacements = {
'Build Processes Demo': repository.custom_properties['human-title'] ?? repository.name,
'A demo project for showcasing standardized build processes for various asset types.': repository.description ?? '',
'https://build-processes-demo-production.mystagingwebsite.com': repository.homepage ?? 'https://wpspecialprojects.com',
'build-processes-demo': repository.name,
'build_processes_demo': repository.custom_properties['php-globals-long-prefix'],
'bpd': repository.custom_properties['php-globals-short-prefix'],
'BPD': repository.custom_properties['php-globals-short-prefix'].toUpperCase(),
'A8CSP Project Scaffold': repository.custom_properties['human-title'] ?? repository.name,
'The scaffold for new projects used by the Automattic Special Projects team.': repository.description ?? '',
'https://a8csp-project-scaffold-production.mystagingwebsite.com': repository.homepage ?? 'https://wpspecialprojects.com',
'a8csp-project-scaffold': repository.name,
'a8csp_project_scaffold': repository.custom_properties['php-globals-long-prefix'],
'a8csp': repository.custom_properties['php-globals-short-prefix'],
'A8CSP': repository.custom_properties['php-globals-short-prefix'].toUpperCase(),
};
}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fill-in-scaffold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
git submodule init
git submodule update
git mv --force README.scaffold.md README.md
git mv themes/build-processes-demo themes/${{ github.event.repository.name }}
git mv mu-plugins/build-processes-demo-features mu-plugins/${{ github.event.repository.name }}-features
git mv themes/a8csp-project-scaffold themes/${{ github.event.repository.name }}
git mv mu-plugins/a8csp-project-scaffold-features mu-plugins/${{ github.event.repository.name }}-features
- name: Commit the changed files.
run: git commit -am "chore -- rename files from scaffolding"
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ mu-plugins/*
!mu-plugins/mu-loader.php
!mu-plugins/colophon
!mu-plugins/team51-tracking
!mu-plugins/build-processes-demo-features
!mu-plugins/a8csp-project-scaffold-features

themes/*
!themes/build-processes-demo
!themes/a8csp-project-scaffold

# Other wp-content exclusions
upgrade/*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build Processes Demo
# Automattic Special Projects -- Project Scaffold

This is a demo project for showcasing standardized build processes of theme and plugin assets. Learn more about it in the [Soft Launch](https://wpspecialprojectsp2.wordpress.com/2023/01/26/front-end-build-processes-task-force-product-soft-launch/) post.

Expand Down
32 changes: 16 additions & 16 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "a8cteam51/build-processes-demo",
"name": "a8csp/project-scaffold",
"type": "wordpress-project",

"description": "A demo project for showcasing standardized build processes for various asset types.",
"homepage": "https://build-processes-demo-production.mystagingwebsite.com",
"description": "The scaffold for new projects used by the Automattic Special Projects team.",
"homepage": "https://a8csp-project-scaffold-production.mystagingwebsite.com",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Contributors",
"homepage": "https://github.com/a8cteam51/build-processes-demo/graphs/contributors"
"homepage": "https://github.com/a8cteam51/team51-project-scaffold/graphs/contributors"
}
],

Expand All @@ -27,7 +27,7 @@
}
],
"require": {
"php": ">=7.4",
"php": ">=8.3",
"ext-json": "*"
},
"require-dev": {
Expand All @@ -48,15 +48,15 @@
"@format:php:theme",
"@format:php:features"
],
"format:php:theme": "phpcbf --standard=./themes/build-processes-demo/.phpcs.xml.dist --basepath=. ./themes/build-processes-demo -v",
"format:php:features": "phpcbf --standard=./mu-plugins/build-processes-demo-features/.phpcs.xml.dist --basepath=. ./mu-plugins/build-processes-demo-features -v",
"format:php:theme": "phpcbf --standard=./themes/a8csp-project-scaffold/.phpcs.xml.dist --basepath=. ./themes/a8csp-project-scaffold -v",
"format:php:features": "phpcbf --standard=./mu-plugins/a8csp-project-scaffold-features/.phpcs.xml.dist --basepath=. ./mu-plugins/a8csp-project-scaffold-features -v",

"lint:php": [
"@lint:php:theme",
"@lint:php:features"
],
"lint:php:theme": "phpcs --standard=./themes/build-processes-demo/.phpcs.xml.dist --basepath=. ./themes/build-processes-demo -v",
"lint:php:features": "phpcs --standard=./mu-plugins/build-processes-demo-features/.phpcs.xml.dist --basepath=. ./mu-plugins/build-processes-demo-features -v",
"lint:php:theme": "phpcs --standard=./themes/a8csp-project-scaffold/.phpcs.xml.dist --basepath=. ./themes/a8csp-project-scaffold -v",
"lint:php:features": "phpcs --standard=./mu-plugins/a8csp-project-scaffold-features/.phpcs.xml.dist --basepath=. ./mu-plugins/a8csp-project-scaffold-features -v",

"internationalize": [
"@makepot:theme",
Expand All @@ -66,18 +66,18 @@
"@updatepo:features"
],

"makepot:theme": "wp i18n make-pot themes/build-processes-demo",
"updatepo:theme": "wp i18n update-po themes/build-processes-demo/languages/build-processes-demo.pot",
"makemo:theme": "wp i18n make-mo themes/build-processes-demo/languages",
"makepot:theme": "wp i18n make-pot themes/a8csp-project-scaffold",
"updatepo:theme": "wp i18n update-po themes/a8csp-project-scaffold/languages/a8csp-project-scaffold.pot",
"makemo:theme": "wp i18n make-mo themes/a8csp-project-scaffold/languages",

"makepot:features": "wp i18n make-pot mu-plugins/build-processes-demo-features",
"updatepo:features": "wp i18n update-po mu-plugins/build-processes-demo-features/languages/build-processes-demo-features.pot",
"makemo:features": "wp i18n make-mo mu-plugins/build-processes-demo-features/languages",
"makepot:features": "wp i18n make-pot mu-plugins/a8csp-project-scaffold-features",
"updatepo:features": "wp i18n update-po mu-plugins/a8csp-project-scaffold-features/languages/a8csp-project-scaffold-features.pot",
"makemo:features": "wp i18n make-mo mu-plugins/a8csp-project-scaffold-features/languages",

"packages-install": "@composer install --ignore-platform-reqs --no-interaction",
"packages-update": [
"@composer clear-cache",
"@composer update --prefer-stable --no-interaction"
"@composer update --prefer-stable --ignore-platform-reqs --no-interaction"
]
},
"config": {
Expand Down
63 changes: 32 additions & 31 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions mu-plugins/a8csp-project-scaffold-features/.phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<ruleset name="a8csp-project-scaffold-features" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>Custom ruleset for the A8CSP Project Scaffold site features.</description>

<!-- Extend the A8CSP ruleset. -->
<rule ref="../../vendor/a8cteam51/team51-configs/quality-tools/phpcs.xml.dist"/>

<!-- Check that the proper text domain(s) is used everywhere. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="a8csp-project-scaffold-features"/> <!-- Change this value to your plugin slug. -->
</property>
</properties>
</rule>

<!-- Check that the proper prefix is used everywhere. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="a8csp_project_scaffold_features"/> <!-- Change this value to your plugin prefix. -->
<element value="a8csp_features"/> <!-- Change this value to your plugin prefix. -->
</property>
</properties>
</rule>

<!-- Add any other custom rules here. -->
</ruleset>
Loading

0 comments on commit 2b4dda7

Please sign in to comment.