sdc-build-wp 4.3.1 → 4.3.2

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.
Files changed (2) hide show
  1. package/index.js +10 -4
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import parseArgs from 'minimist';
3
3
  const argv = parseArgs(process.argv.slice(2));
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
4
6
  import { promises as fs } from 'fs';
5
7
  import { Tail } from 'tail';
6
8
  import project from './lib/project.js';
@@ -14,9 +16,10 @@ console.log(`
14
16
  Usage: sdc-build-wp [options] [arguments]
15
17
 
16
18
  Options:
17
- -h, --help Show help message and exit
18
- -w, --watch Build and watch
19
- -b, --build BUILDS Build with specific components
19
+ -h, --help Show help message and exit
20
+ -v, --version Version
21
+ -w, --watch Build and watch
22
+ -b, --build BUILDS Build with specific components
20
23
 
21
24
  Components:
22
25
 
@@ -30,6 +33,9 @@ sdc-build-wp --watch
30
33
  sdc-build-wp --watch --builds=style,scripts
31
34
  `);
32
35
 
36
+ process.exit(0);
37
+ } else if (argv.version || argv.v) {
38
+ console.log(JSON.parse(await fs.readFile(path.join(path.dirname(fileURLToPath(import.meta.url)), 'package.json'))).version);
33
39
  process.exit(0);
34
40
  }
35
41
 
@@ -44,7 +50,7 @@ project.builds = argv.builds ? argv.builds.split(',') : Object.keys(project.comp
44
50
  }
45
51
  log('info', `Finished initial build in ${Math.round((Date.now() - initialBuildTimerStart) / 1000)} seconds`);
46
52
 
47
- if (argv.watch || argv.w) {
53
+ if (argv.watch) {
48
54
  for (let build of project.builds) {
49
55
  await project.components[build].watch();
50
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdc-build-wp",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "description": "Custom WordPress build process.",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@stylistic/stylelint-plugin": "^3.1.2",
26
- "@wordpress/scripts": "^30.11.0",
26
+ "@wordpress/scripts": "^30.12.0",
27
27
  "autoprefixer": "^10.4.20",
28
28
  "browser-sync": "^3.0.3",
29
29
  "chalk": "^5.4.1",
@@ -39,8 +39,8 @@
39
39
  "postcss": "^8.5.3",
40
40
  "postcss-scss": "^4.0.9",
41
41
  "postcss-sort-media-queries": "^5.2.0",
42
- "sass": "^1.85.0",
43
- "stylelint": "^16.14.1",
42
+ "sass": "^1.85.1",
43
+ "stylelint": "^16.15.0",
44
44
  "tail": "^2.2.6"
45
45
  }
46
46
  }