Chain Settings is a simple project designed to dynamically generate and display JSON configurations for various blockchain chains. This project uses Node.js and GitHub Pages to automate deployments and provide a user-friendly interface to interact with the chain settings.
https://the-poolz.github.io/chain-settings/
- Dynamic JSON File Generation: Generates JSON files for each available blockchain chain.
- Interactive Dropdown: Provides a dropdown menu to select and view chain-specific JSON data.
- JSON Viewer: Displays the JSON data in a visually structured format using the
JSONEditor
library. - Automated Deployment: Deploys the generated files to GitHub Pages using GitHub Actions.
deploy.yml
: GitHub Actions workflow file for automated deployment and issue-triggered builds.generate.js
: Script to generate JSON files and updateindex.html
with chain options.index.html
: Frontend to interact with and display JSON data for selected chains..gitignore
: Specifies files and directories to exclude from version control.LICENSE
: Licensing information.package.json
: Node.js project metadata and script definitions.
- Node.js and npm installed.
- Clone the repository:
git clone https://github.com/The-Poolz/chain-settings.git cd chain-settings
-
Generate the JSON files and update
index.html
:npm run generate
This will create a
dist
folder containing the generated files. -
Serve the
dist
directory to view the application locally.
This project uses GitHub Actions to deploy to GitHub Pages:
- Push changes to the
master
branch (or your default branch). - Open an issue with the body
Update
to trigger a manual deployment.
The workflow will build the project, generate the dist
folder, and deploy the files to GitHub Pages.
Defines a GitHub Actions workflow with the following jobs:
- Build: Generates JSON files and prepares the
dist
folder. - Deploy: Publish the content to GitHub Pages.
This script:
- Uses
@poolzfinance/reacthelper
to fetch chain data. - Creates JSON files for each chain in the
dist
directory. - Dynamically updates
index.html
to include options for each chain.
Provides a simple UI with:
- A dropdown to select chains.
- Integration with
JSONEditor
for JSON data display.
Excludes build artifacts, dependencies, and temporary files from version control.
Specifies the project details and includes the generate
script.
This project is licensed under the MIT License.
Feel free to open issues or submit pull requests to enhance the project.