mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
Build Tools: Add a WordPress Development Environment.
This commit adds the first iteration of a Docker-based config for setting up a local WordPress development environment. Props pento, noisysocks, mcsf, pbearne, isabel_brison. See #47767. git-svn-id: https://develop.svn.wordpress.org/trunk@45745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+29
-4
@@ -22,8 +22,12 @@
|
||||
"babel-jest": "24.8.0",
|
||||
"check-node-version": "3.2.0",
|
||||
"copy-webpack-plugin": "^4.6.0",
|
||||
"copyfiles": "2.1.1",
|
||||
"core-js": "3.1.4",
|
||||
"cross-env": "5.2.0",
|
||||
"cross-var": "1.1.0",
|
||||
"cssnano": "4.1.8",
|
||||
"dotenv-cli": "2.0.1",
|
||||
"grunt": "~1.0.3",
|
||||
"grunt-banner": "^0.6.0",
|
||||
"grunt-contrib-clean": "~2.0.0",
|
||||
@@ -53,6 +57,7 @@
|
||||
"source-map-loader": "^0.2.4",
|
||||
"uglify-js": "^3.4.9",
|
||||
"uglifyjs-webpack-plugin": "2.1.1",
|
||||
"wait-on": "3.3.0",
|
||||
"webpack": "4.29.2",
|
||||
"webpack-dev-server": "3.1.14",
|
||||
"webpack-livereload-plugin": "2.2.0"
|
||||
@@ -119,12 +124,32 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "grunt build",
|
||||
"dev": "grunt build --dev",
|
||||
"build:dev": "grunt build --dev",
|
||||
"dev": "grunt watch --dev",
|
||||
"test": "grunt test",
|
||||
"watch": "grunt watch",
|
||||
"grunt": "grunt",
|
||||
"env:start": "./tools/local-env/start.sh",
|
||||
"env:reset-site": "./tools/local-env/install-wordpress.sh --reset-site",
|
||||
"test:e2e": "wp-scripts test-e2e --config tests/e2e/jest.config.js"
|
||||
"env:start": "dotenv npm run env:__start-next",
|
||||
"env:__start-next": "docker-compose -f ./tools/local-env/docker-compose.yml up -d",
|
||||
"env:stop": "dotenv npm run env:__stop-next",
|
||||
"env:clean": "dotenv npm run env:__stop-next -- -- -v --remove-orphans",
|
||||
"env:reset": "dotenv npm run env:__stop-next -- -- --rmi all -v --remove-orphans",
|
||||
"env:__stop-next": "docker-compose -f ./tools/local-env/docker-compose.yml -f ./tools/local-env/docker-compose.scripts.yml down",
|
||||
"env:install": "dotenv npm run env:__install-next",
|
||||
"env:__install-next": "npm run env:__install-config && npm run env:__install-config-define-wp_debug && npm run env:__install-config-define-wp_debug_log && npm run env:__install-config-define-wp_debug_display && npm run env:__install-config-define-script_debug && copyfiles -f src/wp-config.php . && npm run env:__reset-site && npm run env:__install-site",
|
||||
"env:__install-config": "cross-var npm run env:__cli-next config create -- --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --path=/var/www/src --force",
|
||||
"env:__install-config-define-wp_debug": "cross-var npm run env:__cli-next config set WP_DEBUG $LOCAL_WP_DEBUG -- --raw",
|
||||
"env:__install-config-define-wp_debug_log": "cross-var npm run env:__cli-next config set WP_DEBUG_LOG $LOCAL_WP_DEBUG_LOG -- --raw",
|
||||
"env:__install-config-define-wp_debug_display": "cross-var npm run env:__cli-next config set WP_DEBUG_DISPLAY $LOCAL_WP_DEBUG_DISPLAY -- --raw",
|
||||
"env:__install-config-define-script_debug": "cross-var npm run env:__cli-next config set SCRIPT_DEBUG $LOCAL_SCRIPT_DEBUG -- --raw",
|
||||
"env:__install-site": "cross-var wait-on tcp:localhost:$LOCAL_PORT && cross-var npm run env:__cli-next core install -- --title=WPDEV --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:$LOCAL_PORT --quiet",
|
||||
"env:__reset-site": "cross-var wait-on tcp:localhost:$LOCAL_PORT && npm run env:__cli-next db reset -- --yes --quiet",
|
||||
"env:cli": "dotenv npm run env:__cli-next",
|
||||
"env:__cli-next": "docker-compose -f ./tools/local-env/docker-compose.yml -f ./tools/local-env/docker-compose.scripts.yml run --rm cli",
|
||||
"env:logs": "docker-compose -f ./tools/local-env/docker-compose.yml -f ./tools/local-env/docker-compose.scripts.yml logs",
|
||||
"test:e2e": "dotenv npm run test:__e2e-next",
|
||||
"test:__e2e-next": "cross-var cross-env WP_BASE_URL=http://localhost:$LOCAL_PORT wp-scripts test-e2e --config tests/e2e/jest.config.js",
|
||||
"test:php": "dotenv npm run test:__php-next",
|
||||
"test:__php-next": "docker-compose -f ./tools/local-env/docker-compose.yml -f ./tools/local-env/docker-compose.scripts.yml run --rm phpunit phpunit"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user