Skip to content

Commit

Permalink
fix: wrong lib exports, Dockerfile not in root dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Loxeris committed Jun 27, 2024
1 parent 060b57d commit 67160ae
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 24 deletions.
3 changes: 2 additions & 1 deletion packages/diracx-web/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# syntax=docker/dockerfile:1.7-labs
# Minimize the size and complexity of the final Docker image by separating the
# build stage and the runtime stage into two different steps

# Stage 1: Build the Next.js application
FROM node:alpine AS build
WORKDIR /app
# Install the project dependencies
COPY package*.json ./
COPY --parents package*.json ./
RUN npm ci
# Copy the rest of the application to the working directory
COPY . .
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build": "lerna run build",
"build-lib": "lerna run build --scope diracx-web-components",
"lint": "lerna run lint",
"ts-lint": "lerna run ts-lint"
"ts-lint": "lerna run ts-lint",
"pack": "npm pack -w diracx-web-components"
}
}
4 changes: 2 additions & 2 deletions packages/diracx-web-components/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"main": "../dist/components/index.js",
"module": "../dist/components/index.mjs",
"main": "../dist/components/index.cjs",
"module": "../dist/components/index.js",
"types": "../dist/components/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/diracx-web-components/contexts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"main": "../dist/contexts/index.js",
"module": "../dist/contexts/index.mjs",
"main": "../dist/contexts/index.cjs",
"module": "../dist/contexts/index.js",
"types": "../dist/contexts/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/diracx-web-components/hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"main": "../dist/hooks/index.js",
"module": "../dist/hooks/index.mjs",
"main": "../dist/hooks/index.cjs",
"module": "../dist/hooks/index.js",
"types": "../dist/hooks/index.d.ts"
}
12 changes: 6 additions & 6 deletions packages/diracx-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"description": "Useful components for diracx-web",
"scripts": {
"build": "tsup --minify",
"dev": "tsup --watch --sourcemap",
"dev": "tsup --watch",
"test": "jest --ci",
"lint": "eslint src",
"ts-lint": "tsc -noEmit -incremental",
"prepack": "npm run build"
"prepack": "rm -rf dist && npm run build"
},
"author": "",
"license": "GPL-3.0",
Expand Down Expand Up @@ -55,25 +55,25 @@
"./package.json": "./package.json",
"./components": {
"module": "./dist/components/index.js",
"require": "./dist/components/index.js",
"require": "./dist/components/index.cjs",
"types": "./dist/components/index.d.ts",
"default": "./dist/components/index.js"
},
"./contexts": {
"module": "./dist/contexts/index.js",
"require": "./dist/contexts/index.js",
"require": "./dist/contexts/index.cjs",
"types": "./dist/contexts/index.d.ts",
"default": "./dist/contexts/index.js"
},
"./hooks": {
"module": "./dist/hooks/index.js",
"require": "./dist/hooks/index.js",
"require": "./dist/hooks/index.cjs",
"types": "./dist/hooks/index.d.ts",
"default": "./dist/hooks/index.js"
},
"./types": {
"module": "./dist/types/index.js",
"require": "./dist/types/index.js",
"require": "./dist/types/index.cjs",
"types": "./dist/types/index.d.ts",
"default": "./dist/types/index.js"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import * as React from "react";
import React from "react";
import { JobDataTable } from "../ui/JobDataTable";
import ApplicationHeader from "@/components/ui/ApplicationHeader";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Autocomplete from "@mui/material/Autocomplete";
import TextField from "@mui/material/TextField";
import { CssBaseline, Stack } from "@mui/material";
import { ThemeProvider as MUIThemeProvider } from "@mui/material/styles";
import * as React from "react";
import React from "react";
import { useOidc } from "@axa-fr/react-oidc";
import { useOIDCContext } from "@/hooks/oidcConfiguration";
import { useMUITheme } from "@/hooks/theme";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import * as React from "react";
import React from "react";
import { useOidcAccessToken } from "@axa-fr/react-oidc";
import { useOIDCContext } from "@/hooks/oidcConfiguration";
import ApplicationHeader from "@/components/ui/ApplicationHeader";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import * as React from "react";
import React from "react";
import AppBar from "@mui/material/AppBar";
import Box from "@mui/material/Box";
import CssBaseline from "@mui/material/CssBaseline";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import * as React from "react";
import React from "react";
import { alpha } from "@mui/material/styles";
import Box from "@mui/material/Box";
import Table from "@mui/material/Table";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from "react";
import React from "react";
import Box from "@mui/material/Box";
import {
blue,
Expand Down
3 changes: 2 additions & 1 deletion packages/diracx-web-components/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig([
experimentalDts: true, // Seems to work fine, lower memory usage and faster than dts
target: "es5",
bundle: true,
sourcemap: true,
async onSuccess() {
// recursively go through each js file in dist and add "use client" to the top
const distDir = path.join(__dirname, "dist");
Expand Down Expand Up @@ -52,8 +53,8 @@ export default defineConfig([
],
format: ["esm", "cjs"],
experimentalDts: true, // Seems to work fine, lower memory usage and faster than dts
clean: true,
target: "es5",
bundle: false,
sourcemap: true
},
]);
4 changes: 2 additions & 2 deletions packages/diracx-web-components/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"main": "../dist/types/index.js",
"module": "../dist/types/index.mjs",
"main": "../dist/types/index.cjs",
"module": "../dist/types/index.js",
"types": "../dist/types/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/diracx-web/src/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import * as React from "react";
import React from "react";
import CssBaseline from "@mui/material/CssBaseline";
import { Box } from "@mui/material";
import { ThemeProvider as MUIThemeProvider } from "@mui/material/styles";
Expand Down

0 comments on commit 67160ae

Please sign in to comment.