From 744e35f4dbc640a841ecbbfbf852d3296a312f73 Mon Sep 17 00:00:00 2001 From: Emmanuel Pelletier Date: Tue, 7 May 2024 19:17:57 +0200 Subject: [PATCH] integration/chore: use a dev-specific folder: - allows us to easily differentiate the exposed components of the npm package vs the dev-only ones - allows the postcss config to purgecss correctly for production build, we do not include the classes seen in the dev components --- packages/integration/README.md | 2 +- packages/integration/index.html | 2 +- packages/integration/postcss.config.mjs | 5 +- .../src/components/StylesStandalone.tsx | 21 ----- packages/integration/src/dev/DsfrHeader.tsx | 52 +++++++++++ .../src/{components => dev}/StylesFull.tsx | 7 +- .../integration/src/dev/StylesStandalone.tsx | 36 ++++++++ .../integration/src/{styles => dev}/dev.css | 0 packages/integration/src/{ => dev}/dev.tsx | 91 +++++++++---------- 9 files changed, 142 insertions(+), 74 deletions(-) delete mode 100644 packages/integration/src/components/StylesStandalone.tsx create mode 100644 packages/integration/src/dev/DsfrHeader.tsx rename packages/integration/src/{components => dev}/StylesFull.tsx (73%) create mode 100644 packages/integration/src/dev/StylesStandalone.tsx rename packages/integration/src/{styles => dev}/dev.css (100%) rename packages/integration/src/{ => dev}/dev.tsx (56%) diff --git a/packages/integration/README.md b/packages/integration/README.md index e34957d..79cded3 100644 --- a/packages/integration/README.md +++ b/packages/integration/README.md @@ -31,7 +31,7 @@ To start, `npm install` a first time and copy the example env file: `cp .env.exa Then, run the local dev server with `npm run dev`. -The main dev file is `src/dev.tsx` where a small testing React router is used to render the different React components while developing. +The main dev file is `src/dev/dev.tsx` where a small testing React router is used to render the different React components while developing. ### Building diff --git a/packages/integration/index.html b/packages/integration/index.html index efff5c8..8063978 100644 --- a/packages/integration/index.html +++ b/packages/integration/index.html @@ -7,7 +7,7 @@
- +