wp-blank-scripts 3.1.8 → 3.1.10

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/cli/pull.js CHANGED
@@ -9,9 +9,8 @@ const exitWithError = require('../utils/exitWithError');
9
9
  const logger = require('../logger');
10
10
  const { DEPLOY_OPTIONS } = require('../constants');
11
11
 
12
- function handleError(err, spinner) {
12
+ function handleError(err) {
13
13
  // Show error
14
- spinner.stop();
15
14
  logger.error('Dang! Something went wrong');
16
15
  exitWithError(err);
17
16
  }
@@ -24,6 +23,7 @@ function handleFinish(sqlFilePath, spinner) {
24
23
 
25
24
  module.exports = async () => {
26
25
  const settings = getSettings();
26
+ let spinner = ora('Starting pull...');
27
27
 
28
28
  try {
29
29
  const options = await getCliOptions([
@@ -57,12 +57,13 @@ module.exports = async () => {
57
57
  },
58
58
  ]);
59
59
 
60
- const spinner = ora('Starting pull...').start();
60
+ spinner.start();
61
61
 
62
62
  const sqlFilePath = await pullSQL(options);
63
63
 
64
64
  handleFinish(sqlFilePath, spinner);
65
65
  } catch (err) {
66
+ spinner.stop();
66
67
  handleError(err);
67
68
  }
68
69
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-blank-scripts",
3
- "version": "3.1.8",
3
+ "version": "3.1.10",
4
4
  "description": "Personal Wordpress Scripts",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -50,7 +50,6 @@
50
50
  "eslint-plugin-jsx-a11y": "^6.7.1",
51
51
  "eslint-plugin-prettier": "^4.2.1",
52
52
  "eslint-plugin-react": "^7.32.2",
53
- "file-loader": "^6.2.0",
54
53
  "get-port": "5.1.1",
55
54
  "glob": "^10.2.7",
56
55
  "html-webpack-plugin": "^5.5.3",
@@ -238,15 +238,11 @@ function makeBaseConfig(options) {
238
238
  ...loaderOverrides.css,
239
239
  },
240
240
  {
241
- test: /\.(eot|ttf|woff|woff2)$/,
242
- include: [sourcePath],
243
- use: [
244
- {
245
- loader: 'file-loader',
246
- options: { name: 'fonts/[name].[ext]' },
247
- },
248
- ],
249
- ...loaderOverrides.fonts,
241
+ test: /\.(woff|woff2|eot|ttf|otf)$/i,
242
+ type: 'asset/resource',
243
+ generator: {
244
+ filename: `${path.join(themeDir, 'assets', 'fonts')}/[name].[ext]`,
245
+ },
250
246
  },
251
247
  {
252
248
  test: /\.(jpe?g|png|gif|svg)$/i,
@@ -144,17 +144,11 @@ function makeReactWebpackConfig(options) {
144
144
  ],
145
145
  },
146
146
  {
147
- test: /.*\.(gif|png|svg|jpe?g)$/i,
148
- include: [sourcePath],
149
- use: [
150
- {
151
- loader: 'file-loader',
152
- options: {
153
- name: '[contenthash].[ext]',
154
- outputPath: path.join(themeDir, 'assets', 'img'),
155
- },
156
- },
157
- ],
147
+ test: /\.(gif|png|svg|jpe?g)$/i,
148
+ type: 'asset/resource',
149
+ generator: {
150
+ filename: `${path.join(themeDir, 'assets', 'img')}/[contenthash][ext][query]`,
151
+ },
158
152
  },
159
153
  {
160
154
  test: /\.(woff|woff2|eot|ttf|otf)$/i,