diff --git a/grunt_options/browserSync.js b/grunt_options/browserSync.js index 33c1fd70..9a185edd 100644 --- a/grunt_options/browserSync.js +++ b/grunt_options/browserSync.js @@ -5,75 +5,53 @@ * */ -module.exports = { - dev: { - bsFiles: { - src: [ - '<%= pkg._bc_css_dist_path %>master.css', - '<%= pkg._bc_css_dist_path %>master-amp.css', - '<%= pkg._bc_css_dist_path %>login.css', - '<%= pkg._bc_css_dist_path %>editor-style.css', - '<%= pkg._bc_assets_path %>/**/*.php', - '<%= pkg._bc_assets_path %>/**/*.twig', - '<%= pkg._bc_public_js_dist_path %>*.js', - '<%= pkg._bc_admin_js_dist_path %>*.js', - '<%= pkg._bc_public_img_path %>**/*.jpg', - '<%= pkg._bc_admin_img_path %>**/*.jpg', +const commonFiles = [ + '<%= pkg._bc_css_dist_path %>master.css', + '<%= pkg._bc_css_dist_path %>master-amp.css', + '<%= pkg._bc_css_dist_path %>login.css', + '<%= pkg._bc_css_dist_path %>editor-style.css', + '<%= pkg._bc_assets_path %>/**/*.php', + '<%= pkg._bc_assets_path %>/**/*.twig', + '<%= pkg._bc_public_js_dist_path %>*.js', + '<%= pkg._bc_admin_js_dist_path %>*.js', + '<%= pkg._bc_public_img_path %>**/*.jpg', + '<%= pkg._bc_admin_img_path %>**/*.jpg', + '<%= pkg._bc_plugin_path %>assets/**/*.css', + '<%= pkg._bc_plugin_path %>assets/**/*.js', + '<%= pkg._bc_plugin_path %>**/*.php', +]; - '<%= pkg._bc_plugin_path %>assets/**/*.css', - '<%= pkg._bc_plugin_path %>assets/**/*.js', - '<%= pkg._bc_plugin_path %>**/*.php', - ], - }, - options: { - watchTask: true, - debugInfo: true, - logConnections: true, - notify: true, - proxy: '<%= dev.proxy %>', - ghostMode: { - scroll: true, - links: true, - forms: true, - }, - }, - }, - devDocker: { - bsFiles: { - src: [ - '<%= pkg._bc_css_dist_path %>master.css', - '<%= pkg._bc_css_dist_path %>master-amp.css', - '<%= pkg._bc_css_dist_path %>login.css', - '<%= pkg._bc_css_dist_path %>editor-style.css', - '<%= pkg._bc_assets_path %>/**/*.php', - '<%= pkg._bc_assets_path %>/**/*.twig', - '<%= pkg._bc_public_js_dist_path %>*.js', - '<%= pkg._bc_admin_js_dist_path %>*.js', - '<%= pkg._bc_public_img_path %>**/*.jpg', - '<%= pkg._bc_admin_img_path %>**/*.jpg', +const commonOptions = { + watchTask: true, + debugInfo: true, + logConnections: true, + notify: true, + ghostMode: { + scroll: true, + links: true, + forms: true, + }, +}; - '<%= pkg._bc_plugin_path %>assets/**/*.css', - '<%= pkg._bc_plugin_path %>assets/**/*.js', - '<%= pkg._bc_plugin_path %>**/*.php', - ], - }, - options: { - watchTask: true, - debugInfo: true, - logConnections: true, - notify: true, - open: 'external', - host: '<%= dev.proxy %>', /* https://192.168.1.199:3000/ will still work for mobile device testing */ - proxy: 'https://<%= dev.proxy %>', - https: { - key: '<%= dev.certs_path %>/<%= dev.proxy %>.key', - cert: '<%= dev.certs_path %>/<%= dev.proxy %>.crt', - }, - ghostMode: { - scroll: true, - links: true, - forms: true, - }, - }, - }, +module.exports = { + dev: { + bsFiles: { src: commonFiles }, + options: { + ...commonOptions, + proxy: '<%= dev.proxy %>', + }, + }, + devDocker: { + bsFiles: { src: commonFiles }, + options: { + ...commonOptions, + open: 'external', + host: '<%= dev.proxy %>', + proxy: 'https://<%= dev.proxy %>', + https: { + key: '<%= dev.certs_path %>/<%= dev.proxy %>.key', + cert: '<%= dev.certs_path %>/<%= dev.proxy %>.crt', + }, + }, + }, }; diff --git a/templates/admin/complete-screen.php b/templates/admin/complete-screen.php index ce0a3432..92d3a04e 100644 --- a/templates/admin/complete-screen.php +++ b/templates/admin/complete-screen.php @@ -1,10 +1,9 @@ -
%s