Skip to content

Commit 20b593a

Browse files
committed
docs: update README for clarity and structure
1 parent 3471675 commit 20b593a

1 file changed

Lines changed: 62 additions & 18 deletions

File tree

README.md

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,74 @@
1-
<p align="center">
2-
<img width="200" src="https://open-wc.org/hero.png"></img>
3-
</p>
1+
# OSCD Template Generator
42

5-
## Open-wc Starter App
3+
OpenSCD plugin for creating new Logical Node Types (LNodeType) for IEC 61850 SCL files.
64

7-
[![Built with open-wc recommendations](https://img.shields.io/badge/built%20with-open--wc-blue.svg)](https://github.com/open-wc)
5+
## Overview
86

9-
## Quickstart
7+
This project provides a web component and supporting dialogs for generating and managing Logical Node Types (`LNodeType`) in SCL files. It uses [OpenSCD Core](https://github.com/openenergytools/open-scd-core), [SCL-lib](https://github.com/openscd/scl-lib), and [Tree Grid](https://github.com/openenergytools/tree-grid) for SCL manipulation and UI.
108

11-
To get started:
9+
## Features
10+
11+
- Create and insert new `LNodeType` elements into SCL documents
12+
- Interactive tree-based selection of Data Objects and attributes for Logical Node Types
13+
- Dialogs for adding Data Objects, editing descriptions, previewing changes, and settings
14+
15+
## Getting Started
16+
17+
### Installation
18+
19+
Clone the repository and install dependencies:
1220

1321
```sh
14-
npm init @open-wc
15-
# requires node 10 & npm 6 or higher
22+
git clone https://github.com/com-pas/oscd-template-generator.git
23+
cd oscd-template-generator
24+
npm install
1625
```
1726

18-
## Scripts
27+
### Development
28+
29+
To start the development server with live reload on http://localhost:8000/:
30+
31+
```sh
32+
npm start
33+
```
34+
35+
To build the project for production:
36+
37+
```sh
38+
npm run build
39+
```
40+
41+
To run tests:
42+
43+
```sh
44+
npm test
45+
```
46+
47+
To lint and format code:
1948

20-
- `start` runs your app for development, reloading on file changes
21-
- `start:build` runs your app after it has been built using the build command
22-
- `build` builds your app and outputs it in your `dist` directory
23-
- `test` runs your test suite with Web Test Runner
24-
- `lint` runs the linter for your project
49+
```sh
50+
npm run lint
51+
npm run format
52+
```
53+
54+
## Usage
55+
56+
The main component is `oscd-template-generator`. It can be integrated into OpenSCD or used standalone in a web application. See `index.html` for a usage example.
57+
58+
## Scripts
2559

26-
## Tooling configs
60+
- `start` - Start development server with live reload
61+
- `build` - Build the app and output to `dist`
62+
- `test` - Run test suite with coverage
63+
- `lint` - Run linter and prettier checks
64+
- `format` - Auto-format code
65+
- `deploy` - Build and deploy to GitHub Pages
2766

28-
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
67+
## Project Structure
2968

30-
If you customize the configuration a lot, you can consider moving them to individual files.
69+
- `oscd-template-generator.ts` - Main web component
70+
- `components/` - Dialogs and UI components
71+
- `foundation.ts` - Utility functions for tree and selection logic
72+
- `constants.ts` - Shared constants
73+
- `utils/` - Utility helpers
74+
- `index.html` - Demo entry point

0 commit comments

Comments
 (0)