Changeset 7428
- Timestamp:
- 07/11/2018 09:05:30 PM (7 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/Gruntfile.js
r6277 r7428 39 39 files: [ 'Gruntfile.js', 'js/**/*.js' ], 40 40 options: grunt.file.readJSON( '.jshintrc' ) 41 }, 42 uglify: { 43 options: { 44 ASCIIOnly: true, 45 screwIE8: false 46 }, 47 js: { 48 expand: true, 49 cwd: 'js/', 50 dest: 'js/', 51 ext: '.min.js', 52 src: '**/*.js', 53 } 41 54 }, 42 55 sass: { … … 157 170 grunt.loadNpmTasks( 'grunt-contrib-watch' ); 158 171 grunt.loadNpmTasks( 'grunt-contrib-jshint' ); 172 grunt.loadNpmTasks( 'grunt-contrib-uglify' ); 159 173 160 174 grunt.registerTask( 'css', ['sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic'] ); 161 175 grunt.registerTask( 'default', ['jshint', 'css'] ); 162 grunt.registerTask( 'build', ['css' ] );176 grunt.registerTask( 'build', ['css', 'uglify:js'] ); 163 177 }; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/functions.php
r7358 r7428 100 100 */ 101 101 function scripts() { 102 $script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG; 103 $suffix = $script_debug ? '' : '.min'; 104 105 // Concatenates core scripts when possible. 106 if ( ! $script_debug ) { 107 $GLOBALS['concatenate_scripts'] = true; 108 } 109 102 110 wp_enqueue_style( 'wporg-style', get_theme_file_uri( '/css/style.css' ), [ 'dashicons', 'open-sans' ], '20180702' ); 103 111 wp_style_add_data( 'wporg-style', 'rtl', 'replace' ); 104 112 105 113 // phpcs:ignore Squiz.PHP.CommentedOutCode.Found, Squiz.Commenting.InlineComment.InvalidEndChar 106 // wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );107 wp_enqueue_script( 'wporg-plugins-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );114 // wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . "/js/navigation$suffix.js", array(), '20151215', true ); 115 wp_enqueue_script( 'wporg-plugins-skip-link-focus-fix', get_template_directory_uri() . "/js/skip-link-focus-fix$suffix.js", array(), '20151215', true ); 108 116 109 117 if ( ! is_front_page() && is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.