Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 4.82 KB

CONTRIBUTING.md

File metadata and controls

81 lines (58 loc) · 4.82 KB

`Hello friends 👋,

Would you help us implement the components?
Thank you so much to anyone that would!

To get you started you can check out the <Alert /> component.

Here are the few commands you need to run to set up your dev environment.

If you want to link your development version into your own project it's possible, just ask me how.

A few things:

PR Reviews

Here is a video to show you how I review PRs. Please have a look at it, it's full of valuable information that will save you and I time.

Getting TypeScript error in VSCode but the console says everything's right?

Because of how this project is setup TypeScript unaware that files have changed.
You don't need to restart VSCode, just restart the TypeScript server.

Screen.Recording.2022-12-12.at.02.25.10.mov

Assets imports error in Storybook can be solved by opening the stories/global.d.ts file:

Screen.Recording.2022-12-12.at.02.07.08.mov

Thank You Very Much ❤️

PS: If you want to contribute to the Doc website. You can edit the source Markdown or ask me for access to our GitBook. (We'll migrate to Docusaurus once we have the DSFR theme for it ready.)

Linking your local copy of @codegouvfr/react-dsfr in your project

This will enable you to see your react-dsfr changes in your main project.

cd ~/github
git clone https://github.com/ORG/YOUR-PROJECT-USING-REACT-DSFR
cd YOUR-PROJECT-USING-REACT-DSFR
yarn # or npm install or pnpm install depending of what you are using...

cd ~/github
git clone https://github.com/codegouvfr/react-dsfr
cd react-dsfr
yarn
yarn build
yarn link-external YOUR-PROJECT-USING-REACT-DSFR
npx tsc -w -p src # Leave this running if you want hot reload.

Linking a working version of @gouvfr/dsfr (For the SIG)

cd ~/github
git clone http://github.com/gouvernementfr/dsfr
cd dsfr
# git checkout my-working-branch
yarn
yarn build --clean
yarn link
cd ~/github/react-dsfr
yarn
yarn link @gouvfr/dsfr
yarn build

Now ~/github/react-dsfr/node_modules/@gouvfr/dsfr links to ~/github/@gouvfr/dsfr.