From 965c7420083facb78b69d876be1cf0cec9545c42 Mon Sep 17 00:00:00 2001 From: Christian Dinkel Date: Mon, 26 Sep 2022 14:16:31 +0200 Subject: [PATCH] WIP: add npm publishing information --- .npmignore | 9 +++++++++ open-scd.ts | 12 ++++++++++++ package-lock.json | 8 ++++---- package.json | 34 +++++++++++++++++++++++++++++----- 4 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..b2e5250 --- /dev/null +++ b/.npmignore @@ -0,0 +1,9 @@ +## npm +/node_modules/ +/npm-debug.log + +## testing +/coverage/ + +# build +/.tsbuildinfo diff --git a/open-scd.ts b/open-scd.ts index b056c09..a0de966 100644 --- a/open-scd.ts +++ b/open-scd.ts @@ -320,6 +320,18 @@ export class OpenSCD extends Plugging(Editing(LitElement)) { mwc-top-app-bar-fixed { --mdc-theme-text-disabled-on-light: rgba(255, 255, 255, 0.38); } /* hack to fix disabled icon buttons rendering black */ + + aside { + position: absolute; + top: 0; + left: 0; + width: 0; + height: 0; + overflow: hidden; + opacity: 0; + margin: 0; + padding: 0; + } `; } diff --git a/package-lock.json b/package-lock.json index 27b921c..12751cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "open-scd-core", - "version": "0.0.0", + "name": "@openscd/open-scd-core", + "version": "0.0.1-rc2.8", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "open-scd-core", - "version": "0.0.0", + "name": "@openscd/open-scd-core", + "version": "0.0.1-rc2.8", "license": "Apache-2.0", "dependencies": { "@lit/localize": "^0.11.4", diff --git a/package.json b/package.json index 259ce93..b184eae 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,36 @@ { - "name": "open-scd-core", - "version": "0.0.0", + "name": "@openscd/open-scd-core", + "version": "0.0.1-rc2.8", + "description": "The core editor component of open-scd, without any extensions pre-installed.", + "repository": { + "type": "git", + "url": "git+https://github.com/openscd/open-scd-core.git" + }, + "keywords": [ + "scl", + "xml", + "iec", + "61850", + "iec61850", + "scd", + "openscd" + ], + "author": "OMICRON Electronics GmbH", + "contributors": [ + "Christian Dinkel " + ], "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/openscd/open-scd-core/issues" + }, + "homepage": "https://github.com/openscd/open-scd-core#readme", "packageManager": "npm@8.12.2", "type": "module", + "browser": "./foundation.js", + "main": "./foundation.js", "exports": { - ".": "dist/foundation.js", - "/open-scd.js": "dist/open-scd.js" + ".": "./foundation.js", + "./open-scd.js": "./open-scd.js" }, "scripts": { "start": "npm run build && concurrently -k -r \"tsc -b --watch --preserveWatchOutput\" \"wds\"", @@ -16,7 +40,7 @@ "analyze": "cem analyze --litelement", "build": "npm run extract && npm run localize && npm run compile", "compile": "tsc -b && tsc foundation.ts --declaration --emitDeclarationOnly --outDir dist", - "doc": "npm run analyze -- --exclude dist && typedoc --out dist/doc foundation.ts", + "doc": "npm run analyze -- --exclude dist && typedoc --out doc foundation.ts", "prepublish": "npm run lint && npm run build && npm run doc", "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore", "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",