Skip to content

Commit 7f55460

Browse files
committed
feat: updating module naming to openscd
1 parent 45d49b5 commit 7f55460

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
This repository hold the XML editing engine inspired by the [OpenSCD core](https://github.com/openscd/open-scd-core) and is following the newest agreed [OpenSCD Core API](https://github.com/OpenEnergyTools/open-scd-core/blob/main/API.md)
2-
1+
This repository hold the XML editing engine, following the newest agreed [OpenSCD Plugin API](https://github.com/openscd/oscd-api/blob/main/docs/plugin-api.md)
32

43
## Usage
54

65
You can either load and use the `handleEdit` function through npm or other content delivery networks. This function does manipulate a XMLDocument as per user intent through the edit as its input:
76

87
```ts
9-
const removeNode: Remove = {node: toBeRemovedNode}
10-
handleEdit(removeNode)
8+
const removeNode: Remove = { node: toBeRemovedNode };
9+
handleEdit(removeNode);
1110
```
1211

1312
You can also use the exported `EditV2Editor` class which keeps track of an undo/redo
1413
history. This class is a wrapper around the `handleEdit` function and provides
1514
a more user-friendly API. The `EditV2Editor` class can be used as follows:
1615

1716
```ts
18-
import { EditV2Editor } from '@omicronenergy/oscd-editor';
17+
import { EditV2Editor } from '@openscd/oscd-editor';
1918

2019
const editor = new EditV2Editor();
2120

22-
const removeNode: Remove = {node: toBeRemovedNode}
21+
const removeNode: Remove = { node: toBeRemovedNode };
2322
editor.handleEdit(removeNode);
2423

2524
expect(toBeRemovedNode.parentNode).to.not.exist;
@@ -37,24 +36,23 @@ expect(toBeRemovedNode.parentNode).to.not.exist;
3736

3837
To scan the project for linting and formatting errors, run
3938

40-
>npm run lint
39+
> npm run lint
4140
4241
To automatically fix linting and formatting errors, run
4342

44-
>npm run format
43+
> npm run format
4544
4645
We use ESLint and Prettier for linting and formatting. Plugins for automatic formatting and linting during editing are available for vim, emacs, VSCode, and all popular IDEs.
4746

4847
## Testing with Web Test Runner
4948

5049
To execute a single test run:
5150

52-
>npm test
51+
> npm test
5352
5453
To run the tests in interactive watch mode run:
5554

56-
>npm run test:watch
57-
55+
> npm run test:watch
5856
5957
# License
6058

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@omicronenergy/oscd-editor",
2+
"name": "@openscd/oscd-editor",
33
"description": "Function library for basic XML manipulations",
44
"license": "Apache-2.0",
55
"author": "OMICRON electronics GmbH",
@@ -12,7 +12,7 @@
1212
],
1313
"repository": {
1414
"type": "git",
15-
"url": "https://github.com/OMICRONEnergyOSS/oscd-editor.git"
15+
"url": "https://github.com/openscd/oscd-editor.git"
1616
},
1717
"publishConfig": {
1818
"access": "public"

0 commit comments

Comments
 (0)