-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1f63542
Showing
250 changed files
with
42,368 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# WordPress plugin | ||
plugins/*/src/public/dist | ||
plugins/*/src/public/dev | ||
plugins/*/src/public/lib | ||
plugins/*/src/inc/base/others/cachebuster* | ||
plugins/*/build | ||
plugins/*/docs | ||
plugins/*/wporg | ||
|
||
# Packages | ||
packages/*/dist | ||
packages/*/dev | ||
|
||
# Tests | ||
packages/*/coverage | ||
plugins/*/coverage | ||
plugins/*/test/cypress/videos | ||
plugins/*/test/cypress/screenshots | ||
|
||
# Misc | ||
.publish | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Dependency directories | ||
node_modules | ||
vendor | ||
vendor-temp | ||
|
||
# Cache directories | ||
.npm | ||
.eslintcache | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
stages: | ||
- containerize | ||
- install | ||
- validate | ||
- build | ||
- test | ||
- release | ||
- build production | ||
- deploy | ||
|
||
image: $CI_REGISTRY_IMAGE/gitlab-ci:$CI_COMMIT_REF_SLUG | ||
|
||
variables: | ||
# Prefix created compose services so we can act on them (volumes, network, not container because they are named by container_name), should be same as package.json name | ||
# Also consider that all docker relevant prefixes should also contain the CI_COMMIT_REF_SLUG environment variable | ||
COMPOSE_PROJECT_NAME: wp-reactjs-multi-starter | ||
# Define cache folders for yarn and cypress so they can be cached | ||
CYPRESS_CACHE_FOLDER: .cypress | ||
YARN_CACHE_FOLDER: .yarn | ||
# This is set to 1 by your project variables so jobs like E2E and review apps gets activated. Currently I do not know another way to detect that, feel free to contribute... | ||
# DOCKER_DAEMON_ALLOW_UP: 1 | ||
# Additional settings | ||
DOCKER_DRIVER: overlay2 | ||
JOB_PACKAGE_FOLDER: plugins | ||
LERNA_SKIP_MESSAGE: Lerna detected no change in this package, skip it... | ||
GL_TOKEN: $GITLAB_TOKEN | ||
# Allow git interactions (e. g. lerna version & publish) | ||
GIT_AUTHOR_NAME: $GITLAB_USER_NAME | ||
GIT_AUTHOR_EMAIL: $GITLAB_USER_EMAIL | ||
GIT_COMMITTER_NAME: $GITLAB_USER_NAME | ||
GIT_COMMITTER_EMAIL: $GITLAB_USER_EMAIL | ||
|
||
# Cache installation of yarn, cypress and co | ||
cache: &cache # see https://gitlab.com/gitlab-org/gitlab-runner/issues/2838#note_95134689 | ||
key: "$CI_COMMIT_REF_SLUG" | ||
untracked: true | ||
policy: pull # As we have an install job, all next steps do not need to push again | ||
paths: | ||
- .yarn/ | ||
- .cypress/ | ||
- node_modules/ | ||
- plugins/*/.yarn/* | ||
- plugins/*/node_modules/* | ||
- plugins/*/vendor/* | ||
- packages/*/.yarn/* | ||
- packages/*/node_modules/* | ||
- packages/*/vendor/* | ||
|
||
# Install all needed node and composer modules as extendable job | ||
.install: | ||
before_script: | ||
# Make sure all dependencies are installed correctly | ||
- yarn bootstrap | ||
# Make sure cypress is installed correctly | ||
- test $DOCKER_DAEMON_ALLOW_UP && yarn cypress install | ||
|
||
# Run a job only in production branch | ||
.only production: | ||
only: | ||
refs: [master] | ||
|
||
# Only go on with the job if lerna detected changes | ||
.lerna changes: | ||
before_script: | ||
- "[ ! -f $JOB_PACKAGE_FOLDER/$JOB_PACKAGE_NAME/.publish ] && echo $LERNA_SKIP_MESSAGE && exit 0" | ||
|
||
# Initial installation so the cache gets filled | ||
install: | ||
extends: .install | ||
stage: install | ||
cache: | ||
<<: *cache | ||
policy: pull-push | ||
script: | ||
- echo Installation done, make cache for the next jobs... | ||
|
||
include: | ||
- /devops/.gitlab/stage-containerize.yml | ||
- /devops/.gitlab/stage-validate.yml | ||
- /devops/.gitlab/stage-build.yml | ||
- /devops/.gitlab/stage-test.yml | ||
- /devops/.gitlab/stage-release.yml | ||
- /packages/utils/devops/.gitlab/.gitlab-ci.yml | ||
# Below you will se a custom "anchor". | ||
# Do not remove that because it is used in `create-wp-react-app create-plugin` | ||
# create-wp-react-app --> | ||
- /plugins/wp-reactjs-starter/devops/.gitlab/.gitlab-ci.yml | ||
# <-- create-wp-react-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
common/create-wp-react-app | ||
**/CHANGELOG.md | ||
**/*.lock | ||
plugins/*/languages | ||
plugins/*/public/languages | ||
plugins/*/build | ||
**/LICENSE* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"recommendations": [ | ||
"valeryanm.vscode-phpsab", | ||
"felixfbecker.php-debug", | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"bmewburn.vscode-intelephense-client", | ||
"mrorz.language-gettext", | ||
"steoates.autoimport", | ||
"ms-azuretools.vscode-docker", | ||
"stringham.move-ts", | ||
"streetsidesoftware.code-spell-checker", | ||
"alexkrechik.cucumberautocomplete" | ||
], | ||
"unwantedRecommendations": ["vscode.php-language-features"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Listen for XDebug", | ||
"type": "php", | ||
"request": "launch", | ||
"port": 9000, | ||
"preLaunchTask": "Start xdebug in WordPress container", | ||
"postDebugTask": "Stop xdebug in WordPress container", | ||
"pathMappings": { | ||
// Do not remove that because it is used in `../common/generate-launch-json.js` | ||
// create-wp-react-app --> | ||
"/var/www/html/wp-content/plugins/wp-reactjs-starter": "${workspaceFolder}/plugins/wp-reactjs-starter/src", | ||
"/var/www/html/wp-content/packages/utils/src": "${workspaceFolder}/packages/utils/src" | ||
// <-- create-wp-react-app | ||
}, | ||
"xdebugSettings": { | ||
"max_data": 65535, | ||
"show_hidden": 1, | ||
"max_children": 100, | ||
"max_depth": 5 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
// Cucumber | ||
"cucumberautocomplete.steps": ["plugins/*/test/cypress/step-definitions/**/*.ts"], | ||
"cucumberautocomplete.syncfeatures": "plugins/*/test/cypress/integration/*feature", | ||
"cucumberautocomplete.strictGherkinCompletion": true, | ||
// cSpell | ||
"cSpell.enabled": true, | ||
// ESLint | ||
"eslint.enable": true, | ||
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], | ||
// PHP CodeSniffer | ||
"phpsab.composerJsonPath": "packages/utils/composer.json", // use utils package as binary because its the first available package (composer does not support hoisting for monorepos) | ||
"phpsab.fixerEnable": true, // disable automatic fixer because it is done by runOnSave | ||
"phpsab.snifferEnable": true, | ||
"phpsab.snifferMode": "onType", | ||
"phpsab.snifferTypeDelay": 500, | ||
"phpsab.standard": "common/phpcs.xml", | ||
// Editor | ||
"editor.useTabStops": false, | ||
"editor.formatOnSave": false, | ||
"editor.tabSize": 4, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSaveTimeout": 3000, // Increase because phpcs can take longer | ||
// Intelephense | ||
"intelephense.files.maxSize": 4000000, // increase max file size so WordPress sub is considered, too | ||
// Per language | ||
"[typescript]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
}, | ||
"[typescriptreact]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
}, | ||
"[javascript]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
}, | ||
"[jsonc]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
}, | ||
"[php]": { | ||
"editor.defaultFormatter": "valeryanm.vscode-phpsab", | ||
"editor.formatOnSave": true | ||
}, | ||
"[markdown]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[json]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[yaml]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[xml]": { | ||
"editor.formatOnSave": true | ||
}, | ||
// Hide additional files/folders from sidebar because they are caused through Docker volumes | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.DS_Store": true, | ||
"devops/scripts/plugins/": true, | ||
"plugins/*/src/vendor/": true | ||
}, | ||
// Exclude files from watcher, it can be expensive | ||
"files.watcherExclude": { | ||
"**/.git/objects/**": true, | ||
"**/.git/subtree-cache/**": true, | ||
"**/node_modules/*/**": true, | ||
"**/vendor/*/**": true, | ||
"**/vendor-temp/*/**": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Start xdebug in WordPress container", | ||
"command": "${workspaceFolder}/devops/scripts/task-xdebug-start.sh", | ||
"presentation": { | ||
"reveal": "never", | ||
"showReuseMessage": false | ||
} | ||
}, | ||
{ | ||
"label": "Stop xdebug in WordPress container", | ||
"command": "${workspaceFolder}/devops/scripts/task-xdebug-stop.sh", | ||
"presentation": { | ||
"reveal": "never", | ||
"showReuseMessage": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
The software "WP React Starter" is comprised of multiple parts | ||
(files in these directories and subdirectories, if the subdirectory | ||
be under no other licence): | ||
|
||
/: WP React Starter Licence Agreement v1.0 or later (wp-react-starter-licence-1.0-or-later) | ||
/.vscode: WP React Starter Licence Agreement v1.0 or later (wp-react-starter-licence-1.0-or-later) | ||
/common: WP React Starter Licence Agreement v1.0 or later (wp-react-starter-licence-1.0-or-later) | ||
/devops: WP React Starter Licence Agreement v1.0 or later (wp-react-starter-licence-1.0-or-later) | ||
/docs: WP React Starter Licence Agreement v1.0 (wp-react-starter-licence-1.0-or-later) | ||
/packages/utils: GNU General Public License v3.0 or later (GPL-3.0-or-later) | ||
/plugins/wp-reactjs-starter: GNU General Public License v3.0 or later (GPL-3.0-or-later) | ||
|
||
You can find a copy of both licenses at: | ||
|
||
React Starter Licence Agreement v1.0: https://devowl.io/wp-react-starter-licence-agreement/v1.0/ | ||
GNU General Public License v3.0: https://www.gnu.org/licenses/gpl-3.0.en.html | ||
|
||
In practice, this means that the build of the WordPress plugins | ||
that you create with WP React Starter is only licensed under | ||
GNU General Public License v3.0 or later. Most or all devtools | ||
are licensed under WP React Starter Licence Agreement v1.0 or later. | ||
|
||
If you want to use WP React Starter, please get a license from | ||
https://devowl.io/wp-react-starter/licence/. | ||
|
||
In addition to the license agreements, you must agree to | ||
the following documents when you order a license: | ||
|
||
devowl.io General terms and conditions: https://devowl.io/terms/ | ||
devowl.io Privacy Policy: https://stage.devowl.io/privacy-policy/ |
Oops, something went wrong.