@rpcbase/cli 0.71.0 → 0.72.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/stylelint.js +6 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.71.0",
3
+ "version": "0.72.0",
4
4
  "license": "SSPL-1.0",
5
5
  "bin": {
6
6
  "rb": "./bin.js"
package/src/stylelint.js CHANGED
@@ -4,20 +4,23 @@ const {spawn} = require("child_process")
4
4
 
5
5
  const {hideBin} = require("yargs/helpers")
6
6
 
7
+
7
8
  module.exports = () => {
8
- const args = hideBin(process.argv).slice(1) //remove first arg
9
+ const args = hideBin(process.argv).slice(1) // remove first arg
9
10
 
10
11
  const config_path = path.join(process.cwd(), "./.stylelintrc.js")
11
12
  const has_config = fs.existsSync(config_path)
12
13
 
13
14
  if (!has_config) {
14
- throw new Error("cannot find .stylelintrc.js config file")
15
+ console.error("cannot find .stylelintrc.js config file, will exit without failure")
16
+ process.exit(0)
17
+ return
15
18
  }
16
19
 
17
20
  const stylelint_path = path.dirname(require.resolve("stylelint/package.json"))
18
21
  const bin_path = path.join(stylelint_path, "./bin/stylelint.mjs")
19
22
 
20
- const ps = spawn(bin_path, ["--config", config_path, ...args], { stdio: "inherit" })
23
+ const ps = spawn(bin_path, ["--config", config_path, ...args], {stdio: "inherit"})
21
24
 
22
25
  ps.on("close", (code) => {
23
26
  process.exit(code)