From 4a45262124cf0035653ae48045287b231ca5fe96 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 27 Mar 2019 14:40:06 +0100 Subject: [PATCH] fix(core): update --- .gitlab-ci.yml | 22 ---------------------- npmextra.json | 12 +++++++++++- package.json | 2 +- readme.md | 26 ++++++++++++++++++++++++++ test/test.ts | 4 ++-- ts/index.ts | 8 ++++---- ts/serviceworker/index.ts | 4 +++- ts/websetup.plugins.ts | 4 +--- 8 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 readme.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 697570f..8321aed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,28 +34,6 @@ snyk: - docker - notpriv -sast: - stage: security - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" - --volume "$PWD:/code" - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code - artifacts: - reports: - sast: gl-sast-report.json - tags: - - docker - - priv - # ==================== # test stage # ==================== diff --git a/npmextra.json b/npmextra.json index 193d59b..6208291 100644 --- a/npmextra.json +++ b/npmextra.json @@ -2,5 +2,15 @@ "npmci": { "npmGlobalTools": [], "npmAccessLevel": "public" + }, + "gitzone": { + "module": { + "githost": "gitlab.com", + "gitscope": "pushrocks", + "gitrepo": "websetup", + "shortDescription": "setup basic page properties", + "npmPackagename": "@pushrocks/websetup", + "license": "MIT" + } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 59696f6..6d5f165 100644 --- a/package.json +++ b/package.json @@ -24,4 +24,4 @@ "tslint-config-prettier": "^1.15.0" }, "dependencies": {} -} +} \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..0b6ce03 --- /dev/null +++ b/readme.md @@ -0,0 +1,26 @@ +# @pushrocks/websetup +setup basic page properties + +## Availabililty and Links +* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/websetup) +* [gitlab.com (source)](https://gitlab.com/pushrocks/websetup) +* [github.com (source mirror)](https://github.com/pushrocks/websetup) +* [docs (typedoc)](https://pushrocks.gitlab.io/websetup/) + +## Status for master +[![build status](https://gitlab.com/pushrocks/websetup/badges/master/build.svg)](https://gitlab.com/pushrocks/websetup/commits/master) +[![coverage report](https://gitlab.com/pushrocks/websetup/badges/master/coverage.svg)](https://gitlab.com/pushrocks/websetup/commits/master) +[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/websetup.svg)](https://www.npmjs.com/package/@pushrocks/websetup) +[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/websetup/badge.svg)](https://snyk.io/test/npm/@pushrocks/websetup) +[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) +[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) +[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/) + +## Usage + +For further information read the linked docs at the top of this readme. + +> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) +| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html) + +[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com) diff --git a/test/test.ts b/test/test.ts index 41ff6df..c880cc7 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,8 +1,8 @@ import { expect, tap } from '@pushrocks/tapbundle'; -import * as websetup from '../ts/index' +import * as websetup from '../ts/index'; tap.test('first test', async () => { console.log('Waiting for proper puppeteer support here'); -}) +}); tap.start(); diff --git a/ts/index.ts b/ts/index.ts index 3fd7ae2..b5c20dd 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -22,8 +22,8 @@ export class WebSetup { } async setup(optionsArg: IWebSetupConstructorOptions) { - if(optionsArg.serviceworker) { - await setupServiceWoker() + if (optionsArg.serviceworker) { + await setupServiceWoker(); } if (optionsArg.googleAnalyticsCode) { @@ -31,7 +31,7 @@ export class WebSetup { } if (optionsArg.fsCode) { - await setupFullStory(optionsArg.fsCode) + await setupFullStory(optionsArg.fsCode); } } -} \ No newline at end of file +} diff --git a/ts/serviceworker/index.ts b/ts/serviceworker/index.ts index 875d02f..0afb585 100644 --- a/ts/serviceworker/index.ts +++ b/ts/serviceworker/index.ts @@ -2,7 +2,9 @@ export const setupServiceWoker = async () => { // serviceworker const script = document.createElement('script'); script.onload = () => { - console.log('Loaded Serviceworker. The serviceworker helps us with notifications and offline capabilities, so you can also read this site when your device is offline.'); + console.log( + 'Loaded Serviceworker. The serviceworker helps us with notifications and offline capabilities, so you can also read this site when your device is offline.' + ); }; script.src = 'serviceworker/mainthread.js'; document.head.appendChild(script); diff --git a/ts/websetup.plugins.ts b/ts/websetup.plugins.ts index d00ae0c..29aa9da 100644 --- a/ts/websetup.plugins.ts +++ b/ts/websetup.plugins.ts @@ -1,4 +1,2 @@ const removeme = {}; -export { - removeme -} +export { removeme };