Changeset 44359 for trunk/src/index.php
- Timestamp:
- 12/24/2018 01:28:22 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/index.php
r43571 r44359 2 2 3 3 /** 4 * Note: this file exists only to remind developers to run WordPress from the5 * build directory.For the real index.php that gets built and boots WordPress,4 * Note: this file exists only to remind developers to build the assets. 5 * For the real index.php that gets built and boots WordPress, 6 6 * please refer to _index.php. 7 7 */ … … 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 11 define( 'ABSPATH', dirname( __FILE__ ) . '/' ); 12 } 13 14 if ( file_exists( ABSPATH . 'wp-includes/js/dist/edit-post.js' ) ) { 15 require_once ABSPATH . '/_index.php'; 16 return; 12 17 } 13 18 … … 27 32 // Die with an error message 28 33 $die = sprintf( 29 /* translators: %1$s: WordPress, %2$s: src, %3$s: build */ 30 __( 'You seem to be running %1$s from the %2$s directory. %1$s needs to be built and run from the %3$s directory before we can get started.' ), 31 'WordPress', 32 '<code>src</code>', 33 '<code>build</code>' 34 ) . '</p>'; 35 $die .= '<p>' . sprintf( 36 /* translators: %s: WordPress */ 37 __( 'You can build %s by running:' ), 34 /* translators: %1$s: WordPress */ 35 __( 'You are running %1$s without JavaScript and CSS files. These need to be built.' ), 38 36 'WordPress' 39 37 ) . '</p>'; 40 $die .= '<p><code>npm install && grunt build</code></p>'; 38 39 $die .= '<p>' . __( 'Before running any grunt tasks you need to make sure the dependencies are installed. You can install these by running '); 40 $die .= '<code style="color: green;">npm install</code>.</p>'; 41 42 $die .= '<ul>'; 43 $die .= '<li>' . sprintf( 44 /* translators: %s: WordPress */ 45 __( 'To build %s while developing run:' ), 46 'WordPress' 47 ) . '<br /><br />'; 48 $die .= '<code style="color: green;">grunt build --dev</code></li>'; 49 $die .= '<li>' . sprintf( 50 __( 'To build files automatically when changing the source files run:' ), 51 'WordPress' 52 ) . '<br /><br />'; 53 $die .= '<code style="color: green;">grunt watch</code></li>'; 54 $die .= '<li>' . sprintf( 55 __( 'To create a production build of %s run:' ), 56 'WordPress' 57 ) . '<br /><br />'; 58 $die .= '<code style="color: green;">grunt build</code></li>'; 59 $die .= '</ul>'; 60 61 41 62 $die .= '<p>' . sprintf( 42 63 /* translators: %1$s: NPM URL, %2$s: Grunt URL */
Note: See TracChangeset
for help on using the changeset viewer.