You need to have NodeJS (at least v14) and NPM installed on your computer. We recommend you to use NVM as it will allow you to easily switch your Node version.
- Open a terminal where you want to create the project on your computer
- Clone the Git project running
git clone https://github.com/Orange-OpenSource/a11y-guidelines.git
(assuming you want to use HTTPS and not SSH)
- In your terminal, navigate to the project folder which has just been created (or open a new terminal in it, as you like). Then, run the
npm install
command which will install all dependencies needed to build the website - If everything went well, you can run the
npm run serve:dev
command which will launch the build of the website and provide a local server with hot reload feature (you won't need to manually refresh your browser, it will do so everrytime you save a file)
We provide 2 sets of commands to build the website and each command has a flag that sets the environment :
build
will only build the website. This command is used for building Netlify et GitHub Pages environmentsserve
will build the website but also launch a local webserver providing hot reloading thanks to Browsersync
:dev
for local development and Netlify builds:prod
for the GitHub Pages environment
So, depending on what you need, you can run:
npm run build:dev
npm run build:prod
npm run serve:dev
npm run serve:prod