This repository is a comprehensive suite of plugins, themes, and components designed to boost the experience of the pillarbox-web player.
These tools provide versatile options for customization and enhancement tailored to meet your needs.
To use the components in this suite, you need the following installed on your system:
- Node.js
To get started with this suite, clone this repository:
git clone https://github.com/SRGSSR/pillarbox-web-suite.gitInstall the dependencies:
npm installStart the server:
npm run startOpen your terminal and execute the following command:
npm run createAfter running the command, you will be prompted to enter the type and name of your element. A new element directory will be generated in the monorepo with the following structure:
/packages/<your-element-name>
|-- src
| |-- lang # Folder containing localization files (only if selected)
| `-- <your-element-name>.js # Main JavaScript file for the element
|-- test
| `-- <your-element-name>.test.js # A default vitest test for your element
|-- .babelrc # Babel configuration specific to this element
|-- index.html # Demo page to showcase the element
|-- package.json # NPM package file, you might need to install additional dependencies
|-- README.md # Documentation file for the element
|-- vite.config.lib.js # Vite configuration for building the element as a library
`-- vite.config.js # Vite configuration for building the element demo page
After the structure is generated, navigate into the element's directory:
cd packages/your-element-nameThe README.md file included in your element's directory provides detailed instructions on building and testing the element.
Contributions are welcome! The Pillarbox web suite is a common effort maintained collaboratively — no single team owns the entire suite. This repository focuses exclusively on components related to video.js and Pillarbox.
If you'd like to contribute, please follow the project's code style and linting rules. Here are some commands to help you get started:
Check your JavaScript code:
npm run eslintCheck your CSS and SCSS code:
npm run stylelintFix your CSS and SCSS code:
npm run stylelint:fixThis project utilizes a pre-commit hook that automatically runs these linting checks before each
commit. Enable this hook by running the prepare script:
npm run prepareEnsure your code builds correctly before submitting a pull request:
npm run build # Build all the packages in the workspace
npm run build -w @srgssr/your-element-name # Build a single page by nameRefer to our Contribution Guide for more detailed information.
This project is licensed under the MIT License. See the LICENSE file for more details.
