com-pas / compas-open-scd

A substation configuration description editor for projects using SCL IEC 61850-6 Edition 2 or greater
https://openscd.github.io
Apache License 2.0
13 stars 3 forks source link

Update CoMPAS OpenSCD build process. #284

Closed pascalwilbrink closed 11 months ago

pascalwilbrink commented 1 year ago

Since we have a lot of Code duplication as a result of #283 + no explicit imports, we need to make sure that building CoMPAS OpenSCD works with in combination with OpenSCD.

Acceptance criteria

Waiting for #283 to be merged back to main.

Sander3003 commented 1 year ago

Possible solution:

Make sure that CoMPAS-Open-SCD and OpenSCD are build correctly. For CoMPAS-Open-SCD, we can easily check if it's build correctly (npm start). Since CoMPAS-Open-SCD will make use of plugins that are maintained by OpenSCD, we need to either Copy those (built) plugins over, or adjust the build process of CoMPAS-Open-SCD.

Copy plugins over: 5A) Create a build script in the root package.json 'build': 'cd packages/open-scd && npm run build && cd packages/compas-openscd && npm run build' 'postbuild': 'cp packages/open-scd/build'

Adjust build process: 5B) Update the snowpack.config.mjs inside packages/compas-openscd. Add the packageOptions.knownEntrypoints inside snowpack configuration to add @openscd/open-scd as a known dependency.

Step 5B will be easiest and cleanest, just some playing around with Snowpack.

Sander3003 commented 1 year ago

Risks/uncertainties: