Skip to content

Commit 729f62f

Browse files
authored
Fix docs deployment. (RedHatInsights#1629)
1 parent 8514f92 commit 729f62f

File tree

7 files changed

+58
-18
lines changed

7 files changed

+58
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ coverage
3030
lerna-debug.log
3131
.DS_Store
3232
packages/**/package-lock.json
33+
packages/**/.cache

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ USER root
33
WORKDIR /docs
44
COPY ./packages /docs/packages
55
COPY ./tsconfig.json /docs/tsconfig.json
6+
# Clear any modules from disk
7+
RUN rm -rf /docs/packages/*/node_modules
68
WORKDIR /docs/packages/docs
79
RUN npm i
810
RUN npm run build

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
build:
55
context: ./
66
dockerfile: Dockerfile.dev
7-
command: sh -c "npm i && npm run generate:components && npm run watch"
7+
command: sh -c "export CYPRESS_CACHE_FOLDER=/docs/packages/docs/.cache && npm i && npm run generate:components && npm run watch"
88
ports:
99
- '3000:3000'
1010
volumes:

package-lock.json

Lines changed: 49 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docs/next.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import glob from 'glob';
55
import withTMConfig from 'next-transpile-modules';
66
import { fileURLToPath } from 'url';
77

8+
89
const __filename = fileURLToPath(import.meta.url);
910
const __dirname = path.dirname(__filename);
1011

@@ -62,8 +63,8 @@ export default withTM({
6263
'@docs/examples': path.resolve(__dirname, './examples'),
6364
'@docs/deprecation-warn': path.resolve(__dirname, './components/deprecation-warn'),
6465
'@docs/extensive-prop': path.resolve(__dirname, './components/extensive-prop'),
65-
react: path.resolve(__dirname, '../../node_modules/react'),
66-
'react-dom': path.resolve(__dirname, '../../node_modules/react-dom'),
66+
// react: path.resolve(__dirname, '../../node_modules/react'),
67+
// 'react-dom': path.resolve(__dirname, '../../node_modules/react-dom'),
6768
};
6869
config.module.rules.push({
6970
test: /\.mdx?$/,

packages/pdf-generator/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Common components for RedHat Cloud Services project to generate PDF from JS.",
55
"browser": "dist/js/index.js",
66
"module": "dist/esm/index.js",
7+
"private": true,
78
"sideEffects": [
89
"./**/*.css",
910
"./**/*.scss"

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
], /* Specify library files to be included in the compilation. */
1212
"allowJs": false, /* Allow javascript files to be compiled. */
1313
// "checkJs": true, /* Report errors in .js files. */
14-
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14+
"jsx": "react-jsx", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
1515
"declaration": true, /* Generates corresponding '.d.ts' file. */
1616
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
1717
"sourceMap": true, /* Generates corresponding '.map' file. */

0 commit comments

Comments
 (0)