diff --git a/projects/packages/forms/.gitattributes b/projects/packages/forms/.gitattributes new file mode 100644 index 000000000000..b0b228d4ad6a --- /dev/null +++ b/projects/packages/forms/.gitattributes @@ -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 diff --git a/projects/packages/forms/.gitignore b/projects/packages/forms/.gitignore new file mode 100644 index 000000000000..501ea3b50954 --- /dev/null +++ b/projects/packages/forms/.gitignore @@ -0,0 +1,3 @@ +vendor/ +wordpress/ +node_modules/ diff --git a/projects/packages/forms/.phpcs.dir.xml b/projects/packages/forms/.phpcs.dir.xml new file mode 100644 index 000000000000..28466ebe5b5e --- /dev/null +++ b/projects/packages/forms/.phpcs.dir.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/packages/forms/CHANGELOG.md b/projects/packages/forms/CHANGELOG.md new file mode 100644 index 000000000000..721294abd00a --- /dev/null +++ b/projects/packages/forms/CHANGELOG.md @@ -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). + diff --git a/projects/packages/forms/README.md b/projects/packages/forms/README.md new file mode 100644 index 000000000000..95c63fb7fae5 --- /dev/null +++ b/projects/packages/forms/README.md @@ -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) + diff --git a/projects/packages/forms/changelog/.gitkeep b/projects/packages/forms/changelog/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/projects/packages/forms/changelog/add-jetpack-forms b/projects/packages/forms/changelog/add-jetpack-forms new file mode 100644 index 000000000000..face0db4eb98 --- /dev/null +++ b/projects/packages/forms/changelog/add-jetpack-forms @@ -0,0 +1,4 @@ +Significance: minor +Type: added + +Added a new jetpack/forms package diff --git a/projects/packages/forms/composer.json b/projects/packages/forms/composer.json new file mode 100644 index 000000000000..d328729c36af --- /dev/null +++ b/projects/packages/forms/composer.json @@ -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 + } + } +} diff --git a/projects/packages/forms/package.json b/projects/packages/forms/package.json new file mode 100644 index 000000000000..6fa686995798 --- /dev/null +++ b/projects/packages/forms/package.json @@ -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" + } +} diff --git a/projects/packages/forms/phpunit.xml.dist b/projects/packages/forms/phpunit.xml.dist new file mode 100644 index 000000000000..3223c32458db --- /dev/null +++ b/projects/packages/forms/phpunit.xml.dist @@ -0,0 +1,14 @@ + + + + tests/php + + + + + + + src + + + diff --git a/projects/packages/forms/src/class-jetpack-forms.php b/projects/packages/forms/src/class-jetpack-forms.php new file mode 100644 index 000000000000..0d1bce094bae --- /dev/null +++ b/projects/packages/forms/src/class-jetpack-forms.php @@ -0,0 +1,17 @@ +