From 587dc419804025d00e5bbcd3554fb1f183a69062 Mon Sep 17 00:00:00 2001 From: garikhg Date: Mon, 22 Jan 2024 02:04:54 +0400 Subject: [PATCH 1/9] Refactor function names in WP Kit Elementor theme The 'setup' and 'scripts' function names in the functions.php file have been renamed to 'wp_kit_elementor_setup' and 'wp_kit_elementor_scripts' respectively, in order to improve code clarity and maintainability. These changes will make future code navigation and bug tracking more efficient. --- assets/sass/style.scss | 4 ++-- functions.php | 8 ++++---- package.json | 6 +++--- readme.txt | 5 ++++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/assets/sass/style.scss b/assets/sass/style.scss index e77e12d..e424ba4 100644 --- a/assets/sass/style.scss +++ b/assets/sass/style.scss @@ -4,8 +4,8 @@ Theme URI: https://wpkit.pro/themes/wpkit-elementor/ Description: WP Kit Elementor is a versatile and streamlined WordPress theme meticulously crafted to integrate seamlessly with the Elementor page builder plugin. This free and open-source theme is tailored for users seeking a nimble, user-friendly, and highly customizable website. Engineered for optimal performance, WP Kit Elementor establishes a robust groundwork, empowering users to fashion distinctive designs effortlessly through the intuitive Elementor drag-and-drop site builder. With its user-centric simplicity and adaptable features, WP Kit Elementor stands out as an excellent choice for both novices and seasoned web creators alike. Author: WP Kit Author URI: https://wpkit.pro -Version: 1.0.4 -Stable tag: 1.0.4 +Version: 1.0.5 +Stable tag: 1.0.5 Requires at least: 6.0 Tested up to: 6.4 Requires PHP: 7.3 diff --git a/functions.php b/functions.php index 85d0a0b..e822585 100644 --- a/functions.php +++ b/functions.php @@ -9,9 +9,9 @@ exit; // Exit if accessed directly. } -define( 'WPKIT_ELEMENTOR_VERSION', '1.0.4' ); +define( 'WPKIT_ELEMENTOR_VERSION', '1.0.5' ); -function setup() { +function wp_kit_elementor_setup() { // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); @@ -80,7 +80,7 @@ function setup() { } } -add_action( 'after_setup_theme', 'setup' ); +add_action( 'after_setup_theme', 'wp_kit_elementor_setup' ); function scripts() { $min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; @@ -106,4 +106,4 @@ function scripts() { ); } -add_action( 'wp_enqueue_scripts', 'scripts' ); +add_action( 'wp_enqueue_scripts', 'wp_kit_elementor_scripts' ); diff --git a/package.json b/package.json index 44fdc1c..26ca9a2 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "wp-kit-elementor-theme", - "slug": "wp-kit-elementor-theme", + "name": "wp-kit-elementor", + "slug": "wp-kit-elementor", "homepage": "https://wpkit.pro", "description": "A sample WordPress theme for Elementor page builder.", - "version": "1.0.4", + "version": "1.0.5", "private": true, "scripts": { "update-version": "node .github/scripts/update-version-in-files.js", diff --git a/readme.txt b/readme.txt index 73f5eb6..edf46c5 100644 --- a/readme.txt +++ b/readme.txt @@ -42,7 +42,10 @@ Source: https://stocksnap.io/photo/BHIL9FV6RK == Changelog == -= 1.0.4-beta1 - 2024-01-13 = += 1.0.5 - 2024-01-21 = +Refactor function names in WpKit Elementor theme + += 1.0.4 - 2024-01-13 = * Tweak: Updated theme metadata in the style.css file * Tweak: Add enqueue theme stylesheet code in functions.php * Tweak: Refactor theme function file for wp-kit-elementor From 899aabb9e968f22852ca9db9dbddaed9f9cafba1 Mon Sep 17 00:00:00 2001 From: garikhg Date: Mon, 22 Jan 2024 02:11:58 +0400 Subject: [PATCH 2/9] Correct function names in wp_kit_elementor theme The previous commit incorrectly stated that both 'setup' and 'scripts' function names were changed. Only the function 'scripts' was renamed to 'wp_kit_elementor_scripts'. Renaming this function makes the code more clear and maintainable, and aids in future code navigation and bug tracking. --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.php b/functions.php index e822585..9d1e7d3 100644 --- a/functions.php +++ b/functions.php @@ -82,7 +82,7 @@ function wp_kit_elementor_setup() { add_action( 'after_setup_theme', 'wp_kit_elementor_setup' ); -function scripts() { +function wp_kit_elementor_scripts() { $min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; // Theme Stylesheet From c5fab5b6bd46b1495134744f111695d76fcae3c6 Mon Sep 17 00:00:00 2001 From: garikhg Date: Mon, 22 Jan 2024 02:15:08 +0400 Subject: [PATCH 3/9] Correct function names in wp_kit_elementor theme The previous commit incorrectly stated that both 'setup' and 'scripts' function names were changed. Only the function 'scripts' was renamed to 'wp_kit_elementor_scripts'. Renaming this function makes the code more clear and maintainable, and aids in future code navigation and bug tracking. --- functions.php | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 9d1e7d3..b91e0fc 100644 --- a/functions.php +++ b/functions.php @@ -9,7 +9,7 @@ exit; // Exit if accessed directly. } -define( 'WPKIT_ELEMENTOR_VERSION', '1.0.5' ); +define( 'WPKIT_ELEMENTOR_VERSION', '1.0.6' ); function wp_kit_elementor_setup() { // Add default posts and comments RSS feed links to head diff --git a/package.json b/package.json index 26ca9a2..cc21da3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "slug": "wp-kit-elementor", "homepage": "https://wpkit.pro", "description": "A sample WordPress theme for Elementor page builder.", - "version": "1.0.5", + "version": "1.0.6", "private": true, "scripts": { "update-version": "node .github/scripts/update-version-in-files.js", From 85e76229837be59700fe975053a3d3f285cf8e3b Mon Sep 17 00:00:00 2001 From: garikhg Date: Mon, 22 Jan 2024 02:16:02 +0400 Subject: [PATCH 4/9] Update readme with corrected function name change in wp_kit_elementor theme The commit updates the readme to accurately reflect that only the 'scripts' function was renamed to 'wp_kit_elementor_scripts' in the wp_kit_elementor theme. This clarification enhances code readability and maintenance, and facilitates future code navigation and bug detection. --- readme.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index edf46c5..8970563 100644 --- a/readme.txt +++ b/readme.txt @@ -42,8 +42,11 @@ Source: https://stocksnap.io/photo/BHIL9FV6RK == Changelog == += 1.0.5 - 2024-01-22 = +Fix: Correct function names in wp_kit_elementor theme + = 1.0.5 - 2024-01-21 = -Refactor function names in WpKit Elementor theme +Fix: Refactor function names in WpKit Elementor theme = 1.0.4 - 2024-01-13 = * Tweak: Updated theme metadata in the style.css file From 3e19237a62d6c5baebd99cbc2ea14c15e1f3c8f6 Mon Sep 17 00:00:00 2001 From: garikhg Date: Tue, 23 Jan 2024 00:11:14 +0400 Subject: [PATCH 5/9] Update path and introduce dotenv in update-version script This commit updates the file paths and introduces dotenv to load environment variables in 'update-version-in-files.js'. These changes provide better control over configuration settings from the environment, improving code maintainability. The file paths are also modified to correct the locations of 'style.scss' and 'functions.php', ensuring accurate file reference for version updates. --- .env | 1 + .github/scripts/update-version-in-files.js | 31 +++++++++++++--------- package.json | 4 ++- 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..ac5834d --- /dev/null +++ b/.env @@ -0,0 +1 @@ +VERSION=1.0.6 diff --git a/.github/scripts/update-version-in-files.js b/.github/scripts/update-version-in-files.js index 671af02..02605e8 100644 --- a/.github/scripts/update-version-in-files.js +++ b/.github/scripts/update-version-in-files.js @@ -1,32 +1,39 @@ 'use strict'; -const replaceInFile = require('replace-in-file'); +const dotenv = require( 'dotenv' ); +const path = require( 'path' ); +dotenv.config( { path: path.resolve( __dirname, '.env' ) } ); +const replaceInFile = require( 'replace-in-file' ); -const {VERSION} = process.env; - -const replaceInFileWithLog = async (options) => { - const results = await replaceInFile(options); - console.log('Replacement results:', results, 'options: ', options); +const { VERSION } = process.env; +const replaceInFileWithLog = async ( options ) => { + const results = await replaceInFile( options ); + console.log( 'Replacement results:', results, 'options: ', options ); }; const run = async () => { try { await replaceInFileWithLog( { - files: './assets/scss/style.scss', + files: '../../assets/sass/style.scss', from: /Version:.*$/m, to: `Version: ${ VERSION }`, } ); await replaceInFileWithLog( { - files: './functions.php', + files: '../../assets/sass/style.scss', + from: /Stable tag:.*$/m, + to: `Stable tag: ${ VERSION }`, + } ); + + await replaceInFileWithLog( { + files: '../../functions.php', from: /WPKIT_ELEMENTOR_VERSION', '(.*?)'/m, to: `WPKIT_ELEMENTOR_VERSION', '${ VERSION }'`, } ); - } catch (err) { - console.error('Error occurred:', err); - process.exit(1); + } catch ( err ) { + console.error( 'Error occurred:', err ); + process.exit( 1 ); } } - run(); diff --git a/package.json b/package.json index cc21da3..70057e3 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "concurrently": "^8.2.2", "copy-webpack-plugin": "^11.0.0", "cssnano": "^6.0.3", + "dotenv": "^16.3.2", "eslint": "^8.56.0", "eslint-config-wordpress": "^2.0.0", "eslint-plugin-babel": "^5.3.1", @@ -48,6 +49,7 @@ "matchdep": "^2.0.0", "npm-build-zip": "^1.0.4", "react": "^18.2.0", + "replace-in-file": "^7.1.0", "rimraf": "^5.0.5", "sass": "^1.69.7", "terser-webpack-plugin": "^5.3.10", @@ -58,7 +60,7 @@ "@babel/plugin-transform-modules-commonjs": "^7.23.3", "@babel/plugin-transform-runtime": "^7.23.7", "@lodder/grunt-postcss": "^3.1.1", - "grunt-autoprefixer": "^3.0.0", + "grunt-autoprefixer": "^3.0.4", "grunt-cssnano": "^3.0.0" } } From aae15e0c2bf856bf664da05d6f6f5d06886d4f5f Mon Sep 17 00:00:00 2001 From: garikhg Date: Tue, 23 Jan 2024 00:11:50 +0400 Subject: [PATCH 6/9] Update WP Kit Elementor theme details This commit revises the author name and the version details in 'style.scss'. Changes in the author name ensure consistency across platforms while updating the version attributes keeps up with the recent advancements made within the WP Kit Elementor theme. --- assets/sass/style.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/sass/style.scss b/assets/sass/style.scss index e424ba4..d0448a3 100644 --- a/assets/sass/style.scss +++ b/assets/sass/style.scss @@ -2,10 +2,10 @@ Theme Name: WP Kit Elementor Theme URI: https://wpkit.pro/themes/wpkit-elementor/ Description: WP Kit Elementor is a versatile and streamlined WordPress theme meticulously crafted to integrate seamlessly with the Elementor page builder plugin. This free and open-source theme is tailored for users seeking a nimble, user-friendly, and highly customizable website. Engineered for optimal performance, WP Kit Elementor establishes a robust groundwork, empowering users to fashion distinctive designs effortlessly through the intuitive Elementor drag-and-drop site builder. With its user-centric simplicity and adaptable features, WP Kit Elementor stands out as an excellent choice for both novices and seasoned web creators alike. -Author: WP Kit +Author: WpKit Author URI: https://wpkit.pro -Version: 1.0.5 -Stable tag: 1.0.5 +Version: 1.0.6 +Stable tag: 1.0.6 Requires at least: 6.0 Tested up to: 6.4 Requires PHP: 7.3 From 6b4c6ac4ba0a069d3b1a37510eca23c158ce8caf Mon Sep 17 00:00:00 2001 From: garikhg Date: Tue, 23 Jan 2024 00:12:07 +0400 Subject: [PATCH 7/9] Update WP Kit Elementor package-lock.json file This commit increases the version number of the wp-kit-elementor theme and the grunt-autoprefixer. It also adds dotenv and replace-in-file as new dependencies. These updates and additions help keep the WP --- package-lock.json | 174 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 164 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 19d8a7f..254878e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { - "name": "wp-kit-elementor-theme", - "version": "1.0.4", + "name": "wp-kit-elementor", + "version": "1.0.6", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "wp-kit-elementor-theme", - "version": "1.0.4", + "name": "wp-kit-elementor", + "version": "1.0.6", "dependencies": { "@babel/plugin-transform-modules-commonjs": "^7.23.3", "@babel/plugin-transform-runtime": "^7.23.7", "@lodder/grunt-postcss": "^3.1.1", - "grunt-autoprefixer": "^3.0.0", + "grunt-autoprefixer": "^3.0.4", "grunt-cssnano": "^3.0.0" }, "devDependencies": { @@ -30,6 +30,7 @@ "concurrently": "^8.2.2", "copy-webpack-plugin": "^11.0.0", "cssnano": "^6.0.3", + "dotenv": "^16.3.2", "eslint": "^8.56.0", "eslint-config-wordpress": "^2.0.0", "eslint-plugin-babel": "^5.3.1", @@ -49,6 +50,7 @@ "matchdep": "^2.0.0", "npm-build-zip": "^1.0.4", "react": "^18.2.0", + "replace-in-file": "^7.1.0", "rimraf": "^5.0.5", "sass": "^1.69.7", "terser-webpack-plugin": "^5.3.10", @@ -10484,6 +10486,18 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "16.3.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.2.tgz", + "integrity": "sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, "node_modules/downshift": { "version": "6.1.12", "resolved": "https://registry.npmjs.org/downshift/-/downshift-6.1.12.tgz", @@ -13574,19 +13588,20 @@ } }, "node_modules/grunt-autoprefixer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-autoprefixer/-/grunt-autoprefixer-3.0.0.tgz", - "integrity": "sha512-X8WNqgXH6e8/qCpbx5pky3JiVY2iTsn+bglwS81B83sxav+XAw7wLAtYS129rAT5CgHT9H3F5dlxDtyyKX1bMw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/grunt-autoprefixer/-/grunt-autoprefixer-3.0.4.tgz", + "integrity": "sha512-WlLnLOGoQFI/IQj6vbx+Kx/KMmJn5g1Fkx6rcp5+9VRIFwN46uSSi3BC8HMteHTZ/KA+zAqST957TkoiSDIujw==", "dependencies": { "autoprefixer-core": "^5.1.7", "chalk": "~1.0.0", - "diff": "~1.3.0" + "diff": "~1.3.0", + "postcss": "^4.1.11" }, "engines": { "node": ">= 0.10.0" }, "peerDependencies": { - "grunt": "~0.4.2" + "grunt": ">=0.4.2" } }, "node_modules/grunt-autoprefixer/node_modules/ansi-regex": { @@ -13636,6 +13651,27 @@ "node": ">=0.8.0" } }, + "node_modules/grunt-autoprefixer/node_modules/postcss": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-4.1.16.tgz", + "integrity": "sha512-aAutxE8MvL1bHylFMYb2c2nniFax8XDztHzZ+x5DVsNJnoW6VHvGSNSqdW3+ip255HCWfPjayVVFzMmyiL7opA==", + "dependencies": { + "es6-promise": "~2.3.0", + "js-base64": "~2.1.8", + "source-map": "~0.4.2" + } + }, + "node_modules/grunt-autoprefixer/node_modules/source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha512-Y8nIfcb1s/7DcobUz1yOO1GSp7gyL+D9zLHDehT7iRESqGSxjJ448Sg7rvfgsRJCnKLdSl11uGf0s9X80cH0/A==", + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/grunt-autoprefixer/node_modules/strip-ansi": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz", @@ -23797,6 +23833,124 @@ "node": ">=0.10" } }, + "node_modules/replace-in-file": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/replace-in-file/-/replace-in-file-7.1.0.tgz", + "integrity": "sha512-1uZmJ78WtqNYCSuPC9IWbweXkGxPOtk2rKuar8diTw7naVIQZiE3Tm8ACx2PCMXDtVH6N+XxwaRY2qZ2xHPqXw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "glob": "^8.1.0", + "yargs": "^17.7.2" + }, + "bin": { + "replace-in-file": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/replace-in-file/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/replace-in-file/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/replace-in-file/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/replace-in-file/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/replace-in-file/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/replace-in-file/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/replace-in-file/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/replace-in-file/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/requestidlecallback": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/requestidlecallback/-/requestidlecallback-0.3.0.tgz", From a50f6c3b084c2c6203c04ed5b10766d17221373c Mon Sep 17 00:00:00 2001 From: garikhg Date: Tue, 23 Jan 2024 00:12:10 +0400 Subject: [PATCH 8/9] Update webpack.config.js in WP Kit Elementor theme This update extends the webpack configuration of the wp-kit-elementor theme by including '**/.env' in the build process. The adjustment is implemented to ensure that dotenv, a newly added dependency, functions as expected. This change, along with updating the version numbers of wp-kit-elementor theme and grunt-autoprefixer --- webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.config.js b/webpack.config.js index 5afebc0..ba0d995 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -29,6 +29,7 @@ const copyPluginConfig = new CopyPlugin( { ...Object.keys( entry ).map( ( key ) => `**/assets/js/${ key }.min.asset.php` ), '**.zip', '**.css', + '**/.env', '**/karma.conf.js', '**/assets/scripts/**', '**/assets/sass/**', From 279c273bee36433280f54060026c1afd705bc789 Mon Sep 17 00:00:00 2001 From: garikhg Date: Tue, 23 Jan 2024 00:35:42 +0400 Subject: [PATCH 9/9] Update dotenv.config path in Elementor script This commit adjusts the path used for 'dotenv.config' in the update-version-in-files.js script. The script is part of the wp-kit-elementor theme, and changing the path ensures the script can access the '.env' configuration file correctly. This change is critical for the proper functioning of the script for version updating tasks. --- .github/scripts/update-version-in-files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/update-version-in-files.js b/.github/scripts/update-version-in-files.js index 02605e8..2f7a4f5 100644 --- a/.github/scripts/update-version-in-files.js +++ b/.github/scripts/update-version-in-files.js @@ -2,7 +2,7 @@ const dotenv = require( 'dotenv' ); const path = require( 'path' ); -dotenv.config( { path: path.resolve( __dirname, '.env' ) } ); +dotenv.config( { path: path.resolve( '../../.env' ) } ); const replaceInFile = require( 'replace-in-file' ); const { VERSION } = process.env;