@lexibase/create-rdx 1.0.0-beta.1 → 1.0.0-beta.3

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/bin/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { spawn } from 'node:child_process'
4
3
  import path from 'node:path'
5
4
  import { fileURLToPath } from 'node:url'
6
5
 
6
+ import spawn from 'cross-spawn'
7
7
  import fs from 'fs-extra'
8
8
  import prompts from 'prompts'
9
9
 
@@ -37,8 +37,8 @@ function validateProjectName(projectName) {
37
37
 
38
38
  function run(command, args, cwd) {
39
39
  return new Promise((resolve, reject) => {
40
- // Reuse the package manager's Node entry point, including on Windows,
41
- // where a .cmd shim cannot be launched directly with spawn().
40
+ // Reuse the Node entry point when available. Otherwise cross-spawn
41
+ // resolves Windows command shims and escapes their arguments.
42
42
  const packageManagerEntry = process.env.npm_execpath
43
43
  const useNodeEntry =
44
44
  command === getPackageManager() &&
@@ -49,7 +49,6 @@ function run(command, args, cwd) {
49
49
  const child = spawn(executable, commandArgs, {
50
50
  cwd,
51
51
  stdio: 'inherit',
52
- shell: !useNodeEntry && process.platform === 'win32',
53
52
  })
54
53
 
55
54
  child.on('error', reject)
@@ -125,4 +124,4 @@ if (!skipInstall) {
125
124
 
126
125
  console.log(`\nRDX project "${projectName}" created successfully.\n`)
127
126
  console.log(` cd ${projectName}`)
128
- console.log(` ${packageManager} dev\n`)
127
+ console.log(` ${packageManager === 'npm' ? 'npm run' : packageManager} dev\n`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexibase/create-rdx",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "Create a new RDX documentation project.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -28,6 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/lexibase/rdx#readme",
30
30
  "dependencies": {
31
+ "cross-spawn": "^7.0.6",
31
32
  "fs-extra": "^11.1.1",
32
33
  "prompts": "^2.4.2"
33
34
  }
@@ -9,7 +9,7 @@
9
9
  "start": "rdx start"
10
10
  },
11
11
  "dependencies": {
12
- "@lexibase/rdx-next": "^1.0.0-beta.0",
12
+ "@lexibase/rdx-next": "^1.0.0-beta.4",
13
13
  "next": "^15.5.0",
14
14
  "react": "19.1.0",
15
15
  "react-dom": "19.1.0"
@@ -1,11 +1,9 @@
1
- import type { RdxRuntimeConfig } from '@lexibase/rdx-next'
1
+ import { defineConfig } from '@lexibase/rdx-next'
2
2
 
3
- const config: RdxRuntimeConfig = {
3
+ export default defineConfig({
4
4
  title: 'My documentation',
5
5
  description: 'Documentation built with RDX.',
6
6
  theme: {
7
7
  defaultTheme: 'system',
8
8
  },
9
- }
10
-
11
- export default config
9
+ })