@compas-oscd/scl-template-update 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export declare const debounce: (fn: Function, delay: number) => (...args: any[]) => void;
@@ -0,0 +1,10 @@
1
+ export const debounce = (fn, delay) => {
2
+ let timeoutId;
3
+ return (...args) => {
4
+ clearTimeout(timeoutId);
5
+ timeoutId = window.setTimeout(() => {
6
+ fn(...args);
7
+ }, delay);
8
+ };
9
+ };
10
+ //# sourceMappingURL=debounce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../utils/debounce.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAY,EAAE,KAAa,EAAE,EAAE;IACtD,IAAI,SAA6B,CAAC;IAElC,OAAO,CAAC,GAAG,IAAW,EAAE,EAAE;QACxB,YAAY,CAAC,SAAS,CAAC,CAAC;QAExB,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YACjC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QACd,CAAC,EAAE,KAAK,CAAC,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["export const debounce = (fn: Function, delay: number) => {\n let timeoutId: number | undefined;\n\n return (...args: any[]) => {\n clearTimeout(timeoutId);\n\n timeoutId = window.setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n"]}
package/package.json ADDED
@@ -0,0 +1,129 @@
1
+ {
2
+ "name": "@compas-oscd/scl-template-update",
3
+ "description": "OpenSCD plugin for updating LNodeType elements",
4
+ "license": "Apache-2.0",
5
+ "author": "CoMPAS",
6
+ "version": "0.0.1",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/com-pas/scl-template-update.git"
10
+ },
11
+ "type": "module",
12
+ "exports": {
13
+ ".": "./dist/scl-template-update.js"
14
+ },
15
+ "files": [
16
+ "dist/",
17
+ "!dist/**/*.spec.*",
18
+ "!dist/**/*.testfiles.*",
19
+ "!dist/__snapshots__"
20
+ ],
21
+ "scripts": {
22
+ "prepare": "npm run build",
23
+ "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
24
+ "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
25
+ "test": "npm run compile && wtr --coverage",
26
+ "test:watch": "npm run compile && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch --coverage\"",
27
+ "compile": "tsc",
28
+ "build": "rimraf dist && npm run compile && rollup -c rollup.config.js",
29
+ "start:build": "web-dev-server --root-dir dist --app-index index.html --open",
30
+ "analyze": "cem analyze --litelement",
31
+ "start": "npm run compile && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
32
+ "deploy": "npm run build && gh-pages --dist dist --branch deploy"
33
+ },
34
+ "dependencies": {
35
+ "@omicronenergy/oscd-ui": "^0.0.11",
36
+ "@open-wc/scoped-elements": "^3.0.5",
37
+ "@openenergytools/tree-grid": "1.0.1",
38
+ "@openscd/oscd-api": "^0.1.6",
39
+ "@openscd/scl-lib": "2.0.0",
40
+ "lit": "^3.0.0"
41
+ },
42
+ "devDependencies": {
43
+ "@babel/preset-env": "^7.16.4",
44
+ "@custom-elements-manifest/analyzer": "^0.4.17",
45
+ "@omicronenergy/oscd-shell": "^0.0.13",
46
+ "@open-wc/building-rollup": "^2.0.2",
47
+ "@open-wc/eslint-config": "^8.0.2",
48
+ "@open-wc/testing": "^4.0.0",
49
+ "@rollup/plugin-babel": "^5.3.0",
50
+ "@rollup/plugin-node-resolve": "^13.0.6",
51
+ "@rollup/plugin-typescript": "^11.1.2",
52
+ "@types/mocha": "^10.0.10",
53
+ "@typescript-eslint/eslint-plugin": "^4.33.0",
54
+ "@typescript-eslint/parser": "^4.33.0",
55
+ "@web/dev-server": "^0.4.6",
56
+ "@web/dev-server-polyfill": "^1.0.4",
57
+ "@web/rollup-plugin-import-meta-assets": "^1.0.7",
58
+ "@web/test-runner": "^0.19.0",
59
+ "babel-plugin-template-html-minifier": "^4.1.0",
60
+ "concurrently": "^5.3.0",
61
+ "cpy-cli": "^5.0.0",
62
+ "deepmerge": "^4.2.2",
63
+ "eslint": "^7.32.0",
64
+ "eslint-config-prettier": "^8.3.0",
65
+ "gh-pages": "^5.0.0",
66
+ "gunzip": "^1.2.2",
67
+ "husky": "^4.3.8",
68
+ "lint-staged": "^10.5.4",
69
+ "prettier": "^2.4.1",
70
+ "rimraf": "^3.0.2",
71
+ "rollup": "^2.60.0",
72
+ "rollup-plugin-terser": "^7.0.2",
73
+ "rollup-plugin-workbox": "^6.2.0",
74
+ "sinon": "^19.0.2",
75
+ "tslib": "^2.3.1",
76
+ "typescript": "5.5.4"
77
+ },
78
+ "eslintConfig": {
79
+ "parser": "@typescript-eslint/parser",
80
+ "extends": [
81
+ "@open-wc",
82
+ "prettier"
83
+ ],
84
+ "plugins": [
85
+ "@typescript-eslint"
86
+ ],
87
+ "rules": {
88
+ "no-unused-vars": "off",
89
+ "@typescript-eslint/no-unused-vars": [
90
+ "error",
91
+ {
92
+ "argsIgnorePattern": "_.*"
93
+ }
94
+ ],
95
+ "import/no-unresolved": "off",
96
+ "import/no-extraneous-dependencies": [
97
+ "error",
98
+ {
99
+ "devDependencies": [
100
+ "**/*.spec.ts"
101
+ ]
102
+ }
103
+ ],
104
+ "import/extensions": [
105
+ "error",
106
+ "always",
107
+ {
108
+ "ignorePackages": true
109
+ }
110
+ ]
111
+ }
112
+ },
113
+ "prettier": {
114
+ "singleQuote": true,
115
+ "arrowParens": "avoid"
116
+ },
117
+ "husky": {
118
+ "hooks": {
119
+ "pre-commit": "lint-staged"
120
+ }
121
+ },
122
+ "lint-staged": {
123
+ "*.ts": [
124
+ "eslint --fix",
125
+ "prettier --write"
126
+ ]
127
+ },
128
+ "customElements": "custom-elements.json"
129
+ }