Dev Tools: Load the wp-admin
build instructions from src
.
This de-duplicates the content, so it only needs to be modified in one place. Additionally, we now link to the NPM/Grunt install guides on the build instructions page. Props pento, ocean90. Fixes #43732. git-svn-id: https://develop.svn.wordpress.org/trunk@44664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5d7089f5bf
commit
b7794e63ce
@ -50,8 +50,8 @@ $die .= '</ul>';
|
||||
$die .= '<p>' . sprintf(
|
||||
/* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */
|
||||
__( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
|
||||
'https://www.npmjs.com/',
|
||||
'https://gruntjs.com/',
|
||||
'https://www.npmjs.com/get-npm',
|
||||
'https://gruntjs.com/getting-started',
|
||||
__( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
|
||||
) . '</p>';
|
||||
|
||||
|
@ -11,48 +11,4 @@ if ( file_exists( dirname( __FILE__ ) . '/../wp-includes/js/dist/edit-post.js' )
|
||||
return;
|
||||
}
|
||||
|
||||
/** Define ABSPATH as this file's directory */
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
define( 'ABSPATH', dirname( __FILE__ ) . '/../' );
|
||||
}
|
||||
|
||||
define( 'WPINC', 'wp-includes' );
|
||||
require_once( ABSPATH . WPINC . '/load.php' );
|
||||
|
||||
// Standardize $_SERVER variables across setups.
|
||||
wp_fix_server_vars();
|
||||
|
||||
require_once( ABSPATH . WPINC . '/functions.php' );
|
||||
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
||||
require_once( ABSPATH . WPINC . '/version.php' );
|
||||
|
||||
wp_check_php_mysql_versions();
|
||||
wp_load_translations_early();
|
||||
|
||||
// Die with an error message
|
||||
$die = __( 'You are running WordPress without JavaScript and CSS files. These need to be built.' ) . '</p>';
|
||||
|
||||
$die .= '<p>' . sprintf(
|
||||
/* translators: %s: npm install */
|
||||
__( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running %s.' ),
|
||||
'<code style="color: green;">npm install</code>'
|
||||
) . '</p>';
|
||||
|
||||
$die .= '<ul>';
|
||||
$die .= '<li>' . __( 'To build WordPress while developing, run:' ) . '<br /><br />';
|
||||
$die .= '<code style="color: green;">grunt build --dev</code></li>';
|
||||
$die .= '<li>' . __( 'To build files automatically when changing the source files, run:' ) . '<br /><br />';
|
||||
$die .= '<code style="color: green;">grunt watch</code></li>';
|
||||
$die .= '<li>' . __( 'To create a production build of WordPress, run:' ) . '<br /><br />';
|
||||
$die .= '<code style="color: green;">grunt build</code></li>';
|
||||
$die .= '</ul>';
|
||||
|
||||
$die .= '<p>' . sprintf(
|
||||
/* translators: 1: NPM URL, 2: Grunt URL, 3: Handbook URL */
|
||||
__( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
|
||||
'https://www.npmjs.com/',
|
||||
'https://gruntjs.com/',
|
||||
__( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
|
||||
) . '</p>';
|
||||
|
||||
wp_die( $die, __( 'WordPress › Error' ) );
|
||||
require_once dirname( dirname( __FILE__ ) ) . '/index.php';
|
||||
|
Loading…
Reference in New Issue
Block a user