diff --git a/Gruntfile.js b/Gruntfile.js
index 41c3edd2a8..a27fc2b735 100644
|
a
|
b
|
module.exports = function(grunt) { |
| 171 | 171 | [ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.js' ], |
| 172 | 172 | [ WORKING_DIR + 'wp-includes/js/jquery/jquery-migrate.min.js' ]: [ './node_modules/jquery-migrate/dist/jquery-migrate.min.js' ], |
| 173 | 173 | [ WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js' ]: [ './node_modules/jquery-form/src/jquery.form.js' ], |
| 174 | | [ WORKING_DIR + 'wp-includes/js/jquery/jquery.form.min.js' ]: [ './node_modules/jquery-form/dist/jquery.form.min.js' ], |
| 175 | 174 | [ WORKING_DIR + 'wp-includes/js/jquery/jquery.js' ]: [ './node_modules/jquery/dist/jquery.min.js' ], |
| 176 | 175 | [ WORKING_DIR + 'wp-includes/js/masonry.min.js' ]: [ './node_modules/masonry-layout/dist/masonry.pkgd.min.js' ], |
| 177 | 176 | [ WORKING_DIR + 'wp-includes/js/twemoji.js' ]: [ './node_modules/twemoji/2/twemoji.js' ], |
| … |
… |
module.exports = function(grunt) { |
| 720 | 719 | src: WORKING_DIR + 'wp-includes/js/imgareaselect/jquery.imgareaselect.js', |
| 721 | 720 | dest: WORKING_DIR + 'wp-includes/js/imgareaselect/jquery.imgareaselect.min.js' |
| 722 | 721 | }, |
| | 722 | jqueryform: { |
| | 723 | src: WORKING_DIR + 'wp-includes/js/jquery/jquery.form.js', |
| | 724 | dest: WORKING_DIR + 'wp-includes/js/jquery/jquery.form.min.js' |
| | 725 | }, |
| 723 | 726 | dynamic: { |
| 724 | 727 | expand: true, |
| 725 | 728 | cwd: WORKING_DIR, |
| … |
… |
module.exports = function(grunt) { |
| 1193 | 1196 | 'webpack:prod', |
| 1194 | 1197 | 'jshint:corejs', |
| 1195 | 1198 | 'uglify:imgareaselect', |
| | 1199 | 'uglify:jqueryform', |
| 1196 | 1200 | 'qunit:compiled' |
| 1197 | 1201 | ] ); |
| 1198 | 1202 | |
| … |
… |
module.exports = function(grunt) { |
| 1332 | 1336 | 'uglify:core', |
| 1333 | 1337 | 'uglify:embed', |
| 1334 | 1338 | 'uglify:jqueryui', |
| 1335 | | 'uglify:imgareaselect' |
| | 1339 | 'uglify:imgareaselect', |
| | 1340 | 'uglify:jqueryform' |
| 1336 | 1341 | ] ); |
| 1337 | 1342 | |
| 1338 | 1343 | grunt.registerTask( 'build:js', [ |
diff --git a/tests/phpunit/tests/dependencies/backbonejs.php b/tests/phpunit/tests/dependencies/backbonejs.php
deleted file mode 100644
index 4c276ad898..0000000000
|
+
|
-
|
|
| 1 | | <?php |
| 2 | | |
| 3 | | /** |
| 4 | | * @group dependencies |
| 5 | | * @group scripts |
| 6 | | */ |
| 7 | | class Tests_Dependencies_Backbonejs extends WP_UnitTestCase { |
| 8 | | |
| 9 | | function test_exclusion_of_sourcemaps() { |
| 10 | | $file = ABSPATH . WPINC . '/js/backbone.min.js'; |
| 11 | | $this->assertFileExists( $file ); |
| 12 | | $contents = trim( file_get_contents( $file ) ); |
| 13 | | $this->assertFalse( strpos( $contents, 'sourceMappingURL' ), 'Presence of sourceMappingURL' ); |
| 14 | | } |
| 15 | | } |
diff --git a/tests/phpunit/tests/dependencies/jquery.php b/tests/phpunit/tests/dependencies/jquery.php
index 8f8bc7e1f0..30ea876e2f 100644
|
a
|
b
|
class Tests_Dependencies_jQuery extends WP_UnitTestCase { |
| 82 | 82 | set_current_screen( 'front' ); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | | /** |
| 86 | | * @ticket 24994 |
| 87 | | */ |
| 88 | | function test_exclusion_of_sourcemaps() { |
| 89 | | $contents = trim( file_get_contents( ABSPATH . WPINC . '/js/jquery/jquery.js' ) ); |
| 90 | | $this->assertFalse( strpos( $contents, 'sourceMappingURL' ), 'Presence of sourceMappingURL' ); |
| 91 | | } |
| 92 | | |
| 93 | 85 | /** |
| 94 | 86 | * @ticket 28404 |
| 95 | 87 | */ |
diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php
index b1e8e6c8f8..dd6ca40f31 100644
|
a
|
b
|
JS; |
| 1341 | 1341 | array_keys( $wp_enqueue_code_editor['htmlhint'] ) |
| 1342 | 1342 | ); |
| 1343 | 1343 | } |
| | 1344 | |
| | 1345 | function test_no_source_mapping() { |
| | 1346 | $all_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( dirname( ABSPATH ) . '/build/' ) ); |
| | 1347 | $js_files = new RegexIterator( $all_files, '/\.js$/' ); |
| | 1348 | foreach( $js_files as $js_file ) { |
| | 1349 | $contents = trim( file_get_contents( $js_file ) ); |
| | 1350 | |
| | 1351 | // We allow data: URLs. |
| | 1352 | $found = preg_match( '/sourceMappingURL=((?!data:).)/', $contents ); |
| | 1353 | $this->assertSame( $found, 0, "sourceMappingURL found in $js_file" ); |
| | 1354 | } |
| | 1355 | } |
| 1344 | 1356 | } |