Skip to content

Commit

Permalink
Add Google Font provider and register fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecoder committed Feb 22, 2022
1 parent a1d6f84 commit 9444b6c
Show file tree
Hide file tree
Showing 14 changed files with 628 additions and 54 deletions.
16 changes: 16 additions & 0 deletions projects/packages/google-fonts-provider/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Files not needed to be distributed in the package.
.gitattributes export-ignore
.github/ export-ignore
package.json export-ignore

# Files to include in the mirror repo, but excluded via gitignore
# Remember to end all directories with `/**` to properly tag every file.
# /src/js/example.min.js production-include

# Files to exclude from the mirror repo, but included in the monorepo.
# Remember to end all directories with `/**` to properly tag every file.
.gitignore production-exclude
changelog/** production-exclude
phpunit.xml.dist production-exclude
.phpcs.dir.xml production-exclude
tests/** production-exclude
2 changes: 2 additions & 0 deletions projects/packages/google-fonts-provider/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
node_modules/
24 changes: 24 additions & 0 deletions projects/packages/google-fonts-provider/.phpcs.dir.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset>

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="package-name" />
</property>
</properties>
</rule>
<rule ref="Jetpack.Functions.I18n">
<properties>
<property name="text_domain" value="package-name" />
</properties>
</rule>

<rule ref="WordPress.Utils.I18nTextDomainFixer">
<properties>
<property name="old_text_domain" type="array" />
<property name="new_text_domain" value="package-name" />
</properties>
</rule>

</ruleset>
7 changes: 7 additions & 0 deletions projects/packages/google-fonts-provider/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

20 changes: 20 additions & 0 deletions projects/packages/google-fonts-provider/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# google-fonts-provider

WordPress Webfonts provider for Google Fonts

## How to install google-fonts-provider

### Installation From Git Repo

## Contribute

## Get Help

## Security

Need to report a security vulnerability? Go to [https://automattic.com/security/](https://automattic.com/security/) or directly to our security bug bounty site [https://hackerone.com/automattic](https://hackerone.com/automattic).

## License

google-fonts-provider is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

Empty file.
44 changes: 44 additions & 0 deletions projects/packages/google-fonts-provider/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "automattic/jetpack-google-fonts-provider",
"description": "WordPress Webfonts provider for Google Fonts",
"type": "library",
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.3",
"automattic/jetpack-changelogger": "^3.0"
},
"autoload": {
"classmap": [
"src/"
]
},
"scripts": {
"phpunit": [
"./vendor/phpunit/phpunit/phpunit --colors=always"
],
"test-coverage": [
"php -dpcov.directory=. ./vendor/bin/phpunit --coverage-clover \"$COVERAGE_DIR/clover.xml\""
],
"test-php": [
"@composer phpunit"
]
},
"repositories": [
{
"type": "path",
"url": "../../packages/*",
"options": {
"monorepo": true
}
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"branch-alias": {
"dev-master": "0.1.x-dev"
},
"textdomain": "jetpack-google-fonts-provider"
}
}
29 changes: 29 additions & 0 deletions projects/packages/google-fonts-provider/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"private": true,
"name": "@automattic/jetpack-google-fonts-provider",
"version": "0.1.0-alpha",
"description": "WordPress Webfonts provider for Google Fonts",
"homepage": "https://jetpack.com",
"bugs": {
"url": "https://github.com/Automattic/jetpack/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/Automattic/jetpack.git"
},
"license": "GPL-2.0-or-later",
"author": "Automattic",
"scripts": {
"build": "echo 'Not implemented.",
"build-js": "echo 'Not implemented.",
"build-production": "echo 'Not implemented.",
"build-production-js": "echo 'Not implemented.",
"clean": "true"
},
"devDependencies": {},
"engines": {
"node": "^14.18.3 || ^16.13.2",
"pnpm": "^6.23.6",
"yarn": "use pnpm instead - see docs/yarn-upgrade.md"
}
}
14 changes: 14 additions & 0 deletions projects/packages/google-fonts-provider/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<phpunit bootstrap="tests/php/bootstrap.php" backupGlobals="false" colors="true" convertDeprecationsToExceptions="true">
<testsuites>
<testsuite name="main">
<directory prefix="test" suffix=".php">tests/php</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="false">
<!-- Better to only include "src" than to add "." and then exclude "tests", "vendor", and so on, as PHPUnit still scans the excluded directories. -->
<!-- Add additional lines for any files or directories outside of src/ that need coverage. -->
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 9444b6c

Please sign in to comment.