wp-blank-scripts 2.6.11 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/deployProject.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wp-blank-scripts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "Personal Wordpress Scripts",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"lint-staged": "^9.2.5",
|
|
67
67
|
"mini-css-extract-plugin": "^0.9.0",
|
|
68
68
|
"mysql": "^2.13.0",
|
|
69
|
+
"node-fetch": "2",
|
|
69
70
|
"node-sass": "^4.14.1",
|
|
70
71
|
"normalize.css": "^8.0.1",
|
|
71
72
|
"opn": "^6.0.0",
|
package/utils/deploySQLFromCI.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const fetch = require('node-fetch');
|
|
2
3
|
|
|
3
4
|
const getMostRecentSqlFile = require('./getMostRecentSqlFile');
|
|
4
5
|
const getSettings = require('./projectSettings');
|
|
6
|
+
const replaceSQL = require('../utils/replaceSQL');
|
|
5
7
|
|
|
6
|
-
const DEPLOY_URL = 'https://
|
|
8
|
+
const DEPLOY_URL = 'https://a64vpm7gjh4nzgmrys6vmltsva0dydvc.lambda-url.ap-southeast-2.on.aws/';
|
|
7
9
|
|
|
8
10
|
async function deploySQLFromCI(options) {
|
|
9
|
-
const { default: fetch } = await import('node-fetch');
|
|
10
11
|
const file = getMostRecentSqlFile(true);
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
console.log({ file });
|
|
12
14
|
|
|
13
15
|
await replaceSQL({
|
|
14
16
|
environmentIn: 'local',
|
|
@@ -27,8 +29,6 @@ async function deploySQLFromCI(options) {
|
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
console.log(response.status);
|
|
30
|
-
const body = await response.json();
|
|
31
|
-
console.log(body);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
module.exports = deploySQLFromCI;
|
package/webpack.base.config.js
CHANGED
|
@@ -127,10 +127,16 @@ function makeBaseConfig(options) {
|
|
|
127
127
|
|
|
128
128
|
const mainStyleVariables = path.join(sourcePath, 'assets', 'css', 'utils', 'variables.scss');
|
|
129
129
|
|
|
130
|
-
let sassVariables
|
|
130
|
+
let sassVariables = `$env: ${process.env.NODE_ENV};`;
|
|
131
|
+
|
|
132
|
+
for (const key of Object.keys(process.env)) {
|
|
133
|
+
if (key.startsWith('VIVO_')) {
|
|
134
|
+
sassVariables += `$${key.replace('VIVO_', '').toLowerCase()}: ${process.env[key]};`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
131
137
|
|
|
132
138
|
if (fs.existsSync(mainStyleVariables)) {
|
|
133
|
-
sassVariables
|
|
139
|
+
sassVariables += fs.readFileSync(mainStyleVariables, 'utf8');
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
let loaderOverrides = {};
|