diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a4467e..a70f7eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,9 @@ stages: - release - metadata +before_script: + - npm install -g @shipzone/npmci + # ==================== # security stage # ==================== @@ -36,6 +39,7 @@ auditProductionDependencies: - npmci command npm audit --audit-level=high --only=prod --production tags: - docker + allow_failure: true auditDevDependencies: image: registry.gitlab.com/hosttoday/ht-docker-node:npmci diff --git a/.vscode/launch.json b/.vscode/launch.json index 112db52..26e9f92 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,28 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": "current file", - "type": "node", + "command": "npm test", + "name": "Run npm test", "request": "launch", - "args": [ - "${relativeFile}" - ], - "runtimeArgs": ["-r", "@gitzone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": "test.ts", - "type": "node", - "request": "launch", - "args": [ - "test/test.ts" - ], - "runtimeArgs": ["-r", "@gitzone/tsrun"], - "cwd": "${workspaceRoot}", - "protocol": "inspector", - "internalConsoleOptions": "openOnSessionStart" + "type": "node-terminal" } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 3648eaa..2868e45 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,5 +22,6 @@ } } } - ] + ], + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/npmextra.json b/npmextra.json index 6fae2fb..cfe91d3 100644 --- a/npmextra.json +++ b/npmextra.json @@ -5,7 +5,7 @@ "githost": "gitlab.com", "gitscope": "designestate", "gitrepo": "dees-element", - "shortDescription": "a custom element class extending lit element class", + "description": "a custom element class extending lit element class", "npmPackagename": "@designestate/dees-element", "license": "MIT", "projectDomain": "design.estate" diff --git a/package.json b/package.json index ea8a3c3..5bac620 100644 --- a/package.json +++ b/package.json @@ -42,4 +42,4 @@ "npmextra.json", "readme.md" ] -} +} \ No newline at end of file diff --git a/test/test.browser.ts b/test/test.browser.ts index 15aae12..2b5d92d 100644 --- a/test/test.browser.ts +++ b/test/test.browser.ts @@ -11,12 +11,12 @@ tap.test('should create a static element', async () => { .buttonClass { background: ${deesElement.cssManager.bdTheme('blue', 'black')}; } - ` + `, ]; // INSTANCE render() { - return deesElement.html`
My Button
` + return deesElement.html`
My Button
`; } } }); diff --git a/ts/dees-element.classes.cssmanager.ts b/ts/dees-element.classes.cssmanager.ts index 8b77fe7..17bf527 100644 --- a/ts/dees-element.classes.cssmanager.ts +++ b/ts/dees-element.classes.cssmanager.ts @@ -28,21 +28,21 @@ export class CssManager { }); } - public get defaultStyles () { + public get defaultStyles() { return domtools.elementBasic.staticStyles; } public cssForTablet(contentArg: CSSResult) { return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg)); - }; - + } + public cssForPhablet(contentArg: CSSResult) { return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg)); } - + public cssForPhone(contentArg: CSSResult) { return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg)); - }; + } public bdTheme(brightValueArg: string, darkValueArg: string): CSSResult { let returnCssVar: string; @@ -61,7 +61,10 @@ export class CssManager { this.bdVarTripletStore.push(newTriplet); this.domtoolsPromise.then(async (domtoolsArg) => { await domtoolsArg.domReady.promise; - document.body.style.setProperty(newTriplet.cssVarName, this.goBright ? newTriplet.brightValue : newTriplet.darkValue); + document.body.style.setProperty( + newTriplet.cssVarName, + this.goBright ? newTriplet.brightValue : newTriplet.darkValue + ); }); returnCssVar = newTriplet.cssVarName; } diff --git a/ts/dees-element.classes.dees-element.ts b/ts/dees-element.classes.dees-element.ts index e75c8fa..4a1ac4b 100644 --- a/ts/dees-element.classes.dees-element.ts +++ b/ts/dees-element.classes.dees-element.ts @@ -28,7 +28,7 @@ export class DeesElement extends plugins.lit.LitElement { const domtools = await this.domtoolsPromise; this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => { this.goBright = goBrightArg; - }); + }); this.dispatchEvent(new CustomEvent('deesElementConnected')); } diff --git a/ts/dees-element.plugins.ts b/ts/dees-element.plugins.ts index 1328cd6..873d225 100644 --- a/ts/dees-element.plugins.ts +++ b/ts/dees-element.plugins.ts @@ -2,10 +2,7 @@ import * as isounique from '@pushrocks/isounique'; import * as smartrx from '@pushrocks/smartrx'; -export { - isounique, - smartrx -}; +export { isounique, smartrx }; // third party scope import { css, unsafeCSS, LitElement } from 'lit'; @@ -19,7 +16,4 @@ const lit = { import * as domtools from '@designestate/dees-domtools'; -export { - lit, - domtools -}; \ No newline at end of file +export { lit, domtools };