@lexibase/rdx-next 1.2.0 → 1.2.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.
- package/bin/cli.mjs +15 -1
- package/package.json +3 -3
- package/src/runtime/styles.css +2 -1
- package/templates/runtime/app/globals.css +2 -0
package/bin/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process'
|
|
2
2
|
import { createRequire } from 'node:module'
|
|
3
|
-
import { access, cp, mkdir } from 'node:fs/promises'
|
|
3
|
+
import { access, cp, mkdir, writeFile } from 'node:fs/promises'
|
|
4
4
|
import path from 'node:path'
|
|
5
5
|
import { fileURLToPath } from 'node:url'
|
|
6
6
|
import process from 'node:process'
|
|
@@ -8,6 +8,7 @@ import process from 'node:process'
|
|
|
8
8
|
import { createRdxProject } from '@lexibase/rdx-core/config'
|
|
9
9
|
import { createJiti } from 'jiti'
|
|
10
10
|
|
|
11
|
+
import postcssConfig from '../postcss.config.mjs'
|
|
11
12
|
import { preparePublicAssets } from './public-assets.mjs'
|
|
12
13
|
|
|
13
14
|
export async function runRdxCli({ templateDir } = {}) {
|
|
@@ -30,6 +31,19 @@ export async function runRdxCli({ templateDir } = {}) {
|
|
|
30
31
|
force: true,
|
|
31
32
|
recursive: true,
|
|
32
33
|
})
|
|
34
|
+
// Resolve in Node before Next processes this file: UI may be transitive,
|
|
35
|
+
// and native Tailwind plugins must stay outside the Turbopack module graph.
|
|
36
|
+
const resolvePlugin = createRequire(import.meta.url)
|
|
37
|
+
const plugins = Object.fromEntries(
|
|
38
|
+
Object.entries(postcssConfig.plugins).map(([name, options]) => [
|
|
39
|
+
resolvePlugin.resolve(name),
|
|
40
|
+
options,
|
|
41
|
+
])
|
|
42
|
+
)
|
|
43
|
+
await writeFile(
|
|
44
|
+
path.join(runtimeDirectory, 'postcss.config.mjs'),
|
|
45
|
+
`export default ${JSON.stringify({ ...postcssConfig, plugins }, null, 2)}\n`
|
|
46
|
+
)
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
async function main() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lexibase/rdx-next",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "The Next.js runtime for RDX documentation projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"next": "^16.4.2",
|
|
81
81
|
"react": "19.3.1",
|
|
82
82
|
"react-dom": "19.3.1",
|
|
83
|
+
"@rdx/typescript-config": "1.0.0",
|
|
83
84
|
"@rdx/eslint-config": "1.0.0",
|
|
84
|
-
"@lexibase/rdx-ui": "1.1.0"
|
|
85
|
-
"@rdx/typescript-config": "1.0.0"
|
|
85
|
+
"@lexibase/rdx-ui": "1.1.0"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"dev": "tsup src/index.ts src/runtime/index.tsx --format esm --dts --watch --external @lexibase/rdx-core --external @lexibase/rdx-types --external @lexibase/rdx-ui --external next --external react --external react-dom --external next-mdx-remote",
|
package/src/runtime/styles.css
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import '@lexibase/rdx-ui/globals.css';
|
|
2
|
-
|
|
2
|
+
/* Register the entry file directly: consumer ignore rules can hide nested dist folders. */
|
|
3
|
+
@source '../../dist/runtime/index.js';
|
|
3
4
|
|
|
4
5
|
/* Colors, buttons, dropdowns and typography come from the shared UI theme. */
|
|
5
6
|
.rdx-skip-link {
|