Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions projects/packages/forms/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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
.phpcsignore production-exclude
3 changes: 3 additions & 0 deletions projects/packages/forms/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
wordpress/
node_modules/
24 changes: 24 additions & 0 deletions projects/packages/forms/.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="jetpack-forms" />
</property>
</properties>
</rule>
<rule ref="Jetpack.Functions.I18n">
<properties>
<property name="text_domain" value="jetpack-forms" />
</properties>
</rule>

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

</ruleset>
7 changes: 7 additions & 0 deletions projects/packages/forms/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/forms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# forms

Jetpack Forms

## How to install forms

### 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

forms is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

Empty file.
4 changes: 4 additions & 0 deletions projects/packages/forms/changelog/add-jetpack-forms
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: added

Added a new jetpack/forms package
61 changes: 61 additions & 0 deletions projects/packages/forms/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "automattic/jetpack-forms",
"description": "Jetpack Forms",
"type": "jetpack-library",
"license": "GPL-2.0-or-later",
"require": {},
"require-dev": {
"yoast/phpunit-polyfills": "1.0.4",
"automattic/jetpack-changelogger": "@dev",
"automattic/wordbless": "dev-master"
},
"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"
],
"build-production": "echo 'Add your build step to composer.json, please!'",
"build-development": "echo 'Add your build step to composer.json, please!'",
"post-update-cmd": "php -r \"copy('vendor/automattic/wordbless/src/dbless-wpdb.php', 'wordpress/wp-content/db.php');\""
},
"repositories": [
{
"type": "path",
"url": "../../packages/*",
"options": {
"monorepo": true
}
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"autotagger": true,
"mirror-repo": "Automattic/jetpack-forms",
"changelogger": {
"link-template": "https://github.com/automattic/jetpack-forms/compare/v${old}...v${new}"
},
"branch-alias": {
"dev-trunk": "0.1.x-dev"
},
"textdomain": "jetpack-forms",
"version-constants": {
"::PACKAGE_VERSION": "src/class-jetpack-forms.php"
}
},
"config": {
"allow-plugins": {
"roots/wordpress-core-installer": true
}
}
}
29 changes: 29 additions & 0 deletions projects/packages/forms/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"private": true,
"name": "@automattic/jetpack-forms",
"version": "0.1.0-alpha",
"description": "Jetpack Forms",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/forms/#readme",
"bugs": {
"url": "https://github.com/Automattic/jetpack/labels/[Package] Forms"
},
"repository": {
"type": "git",
"url": "https://github.com/Automattic/jetpack.git",
"directory": "projects/packages/forms"
},
"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": "^16.13.2",
"yarn": "use pnpm instead - see docs/yarn-upgrade.md"
}
}
14 changes: 14 additions & 0 deletions projects/packages/forms/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>
17 changes: 17 additions & 0 deletions projects/packages/forms/src/class-jetpack-forms.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Package description here
*
* @package automattic/jetpack-forms
*/

namespace Automattic\Jetpack\Forms;

/**
* Class description.
*/
class Jetpack_Forms {

const PACKAGE_VERSION = '0.1.0-alpha';

}
11 changes: 11 additions & 0 deletions projects/packages/forms/tests/php/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
/**
* Bootstrap.
*
* @package automattic/
*/

/**
* Include the composer autoloader.
*/
require_once __DIR__ . '/../../vendor/autoload.php';