aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/dotenv.php20
-rw-r--r--config/webpack/paths.js (renamed from config/paths.js)4
-rw-r--r--config/webpack/webpack.common.js (renamed from config/webpack.common.js)0
-rw-r--r--config/webpack/webpack.dev.js (renamed from config/webpack.dev.js)0
-rw-r--r--config/webpack/webpack.prod.js (renamed from config/webpack.prod.js)0
5 files changed, 22 insertions, 2 deletions
diff --git a/config/dotenv.php b/config/dotenv.php
new file mode 100644
index 0000000..16d31af
--- /dev/null
+++ b/config/dotenv.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Get current environment defined in .env file.
+ *
+ * @since 1.2.0
+ *
+ * @return string Current env or empty string.
+ */
+function dap_get_current_env()
+{
+ if (file_exists(__DIR__ . '/vendor/autoload.php')) {
+ require_once __DIR__ . '/vendor/autoload.php';
+ $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
+ $dotenv->safeLoad();
+ $current_env = $_ENV['CURRENT_ENV'];
+ return $current_env;
+ } else {
+ return '';
+ }
+}
diff --git a/config/paths.js b/config/webpack/paths.js
index 8b67206..fd4c73f 100644
--- a/config/paths.js
+++ b/config/webpack/paths.js
@@ -1,6 +1,6 @@
const path = require('path');
-const devFolder = path.resolve(__dirname, '../src/');
+const devFolder = path.resolve(__dirname, '../../src/');
module.exports = {
src: {
@@ -10,6 +10,6 @@ module.exports = {
style: path.resolve(devFolder, './scss/style.scss'),
},
dist: path.resolve(devFolder, '../assets/'),
- files: [path.resolve(devFolder, '../**/*.html')],
+ files: [path.resolve(devFolder, '../**/*.php')],
sassPaths: [path.resolve(devFolder, '../node_modules/modern-normalize/')],
};
diff --git a/config/webpack.common.js b/config/webpack/webpack.common.js
index 69ecd2f..69ecd2f 100644
--- a/config/webpack.common.js
+++ b/config/webpack/webpack.common.js
diff --git a/config/webpack.dev.js b/config/webpack/webpack.dev.js
index 4ac420c..4ac420c 100644
--- a/config/webpack.dev.js
+++ b/config/webpack/webpack.dev.js
diff --git a/config/webpack.prod.js b/config/webpack/webpack.prod.js
index a2778f5..a2778f5 100644
--- a/config/webpack.prod.js
+++ b/config/webpack/webpack.prod.js