Demo repo - Show me what it looks like
$ yarn add @codegouvfr/nextra-theme-dsfr @codegouvfr/react-dsfr @mui/material @emotion/styled @emotion/react @emotion/server
cd ~/github
git clone https://github.com/garronej/nextra-theme-dsfr
cd nextra-theme-dsfr
yarn dev
Then in another terminal.
cd ~/github/nextra-dsfr-demo
yarn start
Now you can do changes both in ~/github/nextra-theme-dsfr
and ~/github/nextra-dsfr/demo
.
You will see the change live in the app.
NOTE: Each time you changes any dependencies you must restart
yarn dev
andyarn start
.
You have made some changes to the code and you want to test them in your app before submitting a pull request?
cd ~/github
git clone https://github.com/garronej/nextra-dsfr-demo
cd nextra-dsfr-demo
yarn
cd ~/github
git clone https://github.com/codegouvfr/nextra-theme-dsfr
cd nextra-theme-dsfr
yarn
yarn build
yarn link-in-app nextra-dsfr-demo
npx tsc -w
# Open another terminal
cd ~/github/nextra-dsfr-demo
rm -rf node_modules/.cache
yarn dev # Or whatever my-app is using for starting the project
You don't have to use ~/github
as a reference path. Just make sure nextra-dsfr-demo
and nextra-theme-dsfr
are in the same directory.
For releasing a new version on GitHub and NPM you don't need to create a tag.
Just update the package.json
version number and push.
For publishing a release candidate update your package.json
with 1.3.4-rc.0
(.1
, .2
, ...).
It also works if you do it from a branch that has an open PR on main
.
Make sure you have defined the
NPM_TOKEN
repository secret or NPM publishing will fail.
- Joseph Garrone
- Dylan DECRULLE - Insee
- Dimitri POSTOLOV - Main Nextra maintainer