This project is a fork of italia/publiccode-editor, customized to align with the Design System of the Swiss Confederation 🇨🇭.
For details about the Swiss Design System, see:
- Design System for the Swiss Confederation (GitHub)
- Design System for the Swiss Confederation (Stoybook)
- Design System Core Library (Figma)
The application is live at: https://swiss.github.io/publiccode-editor/
Below is the original README for the Italian version.
A web editor to generate and validate
publiccode.ymlfiles
This app helps you create and validate a publiccode.yml file for your project.
Simply fill out the form to generate a YAML file that meets the latest standards,
which you can then download or copy to your project's root directory.
You can also use the app to check and correct an existing publiccode.yml file.
Just upload the file to import it, and the app will validate and help fix any issues.
First clone the repository:
git clone https://github.com/italia/publiccode-editor.gitNavigate to the created directory, and run:
npm ci
npm run build:licenses
npm run build:wasmIn order to run the development server locally, you should run:
npm run devThis will expose a webserver listening at http://localhost:8080.
In order to develop in a container, you have to match the following criteria:
- VSCode installed
- Docker installed and running
- VSCode Devcontainer extension installed (doc)
You can clone the repo, run VSCode in that folder and run in a container.
Otherwise, you could simply click on following button.
This repo will be cloned in a Container Volume.
For more details, check Devcontainer documentation out at the following links
Every configuration process, such as dependency installation or wasm configuration, is handled by Devcontainer.
In order to run the development server, you should run:
npm run devThe editor is fully static and can be build with:
npm run buildand then serve the content of dist/ in production.
By running:
docker build -t publiccode-editor .you can build a Docker image. Subsequently, by running:
docker run -p 8080:80 publiccode-editoryou can run the Docker container and see the results at http://localhost:8080.
To access the web-app in a specific language use the lang param like this: https://publiccode-editor-develop.vercel.app/?lang=en.
The languages that can be picked are:
- "it" 🇮🇹
- "en" 🇬🇧
- "fr" 🇫🇷
- "de" 🇩🇪
- "nl" 🇳🇱
We welcome contributions! If you encounter any issues with the app, please file an issue on GitHub.
For guidance on how to contribute effectively, check the CONTRIBUTING.md file in the root of the repository.
This project is covered by a GNU Affero General Public License v3.0 or later license.