Skip to content

Commit

Permalink
Auto setup after wp-env start.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Sep 20, 2023
1 parent 59fba67 commit ab9314f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
14 changes: 10 additions & 4 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
{
"core": null,
"plugins": [
".",
"../../../",
"https://downloads.wordpress.org/plugin/ninja-forms.3.6.13.zip",
"pronamic/wp-pronamic-pay-test-helper",
"https://downloads.wordpress.org/plugin/ninja-forms.zip",
"https://downloads.wordpress.org/plugin/pronamic-client.zip",
"https://downloads.wordpress.org/plugin/query-monitor.zip",
"https://downloads.wordpress.org/plugin/one-time-login.zip",
"https://downloads.wordpress.org/plugin/wp-plugin-dependencies.zip"
"https://downloads.wordpress.org/plugin/wp-plugin-dependencies.zip",
"https://downloads.wordpress.org/plugin/wp-mail-logging.zip"
],
"mappings": {
"wp-content/plugins/pronamic-ideal": "../../../",
"wp-content/plugins/pronamic-pay-ninja-forms": "."
},
"config": {
"PRONAMIC_PAY_DEBUG": true
},
"lifecycleScripts": {
"afterStart": "npm run wp-env-after-start"
}
}
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"last 2 versions"
],
"devDependencies": {
"@wordpress/env": "^5.2.0",
"grunt": "^1.3.0",
"grunt-contrib-jshint": "^3.0.0",
"@wordpress/env": "^8.7.0",
"grunt": "^1.6.1",
"grunt-contrib-jshint": "^3.2.0",
"grunt-phpcs": "^0.4.0",
"grunt-phplint": "0.1.0",
"grunt-phpmd": "^0.1.1",
Expand All @@ -47,10 +47,12 @@
"private": true,
"scripts": {
"start": "wp-env start && npm run setup && npm run login",
"setup": "npm-run-all setup-*",
"setup-mollie": "wp-env run cli wp config set MOLLIE_API_KEY $MOLLIE_API_KEY",
"setup-buckaroo-website-key": "wp-env run cli wp config set BUCKAROO_WEBSITE_KEY $BUCKAROO_WEBSITE_KEY",
"setup-buckaroo-secret-key": "wp-env run cli wp config set BUCKAROO_SECRET_KEY $BUCKAROO_SECRET_KEY",
"login": "wp-env run cli wp user one-time-login admin"
"wp-env-setup": "npm-run-all wp-env-setup-*",
"wp-env-setup-mollie": "wp-env run cli wp config set MOLLIE_API_KEY $MOLLIE_API_KEY",
"wp-env-setup-buckaroo-website-key": "wp-env run cli wp config set BUCKAROO_WEBSITE_KEY $BUCKAROO_WEBSITE_KEY",
"wp-env-setup-buckaroo-secret-key": "wp-env run cli wp config set BUCKAROO_SECRET_KEY $BUCKAROO_SECRET_KEY",
"wp-env-setup-plugins": "wp-env run cli wp plugin activate pronamic-ideal pronamic-pay-ninja-forms",
"wp-env-login": "wp-env run cli wp user one-time-login admin",
"wp-env-after-start": "npm-run-all wp-env-setup"
}
}

0 comments on commit ab9314f

Please sign in to comment.