diff --git a/.eslintrc.js b/.eslintrc.js index 0cb6f7e..98bb6b7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,5 +12,10 @@ module.exports = { ], globals: { StroeerVideoplayer: 'readonly' + }, + rules: { + 'comma-dangle': ['error', { + 'objects': 'only-multiline' + }] } } diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..6d972fa --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "trailingCommas": "es5" +} diff --git a/dist/.npmignore b/dist/.npmignore index d12bdbf..29f502a 100644 --- a/dist/.npmignore +++ b/dist/.npmignore @@ -1,2 +1,3 @@ !/stroeerVideoplayer-endcard-plugin.esm.js !/stroeerVideoplayer-endcard-plugin.min.css +!/stroeerVideoplayer-endcard-plugin.umd.js diff --git a/package.json b/package.json index 31ef813..34b43b0 100644 --- a/package.json +++ b/package.json @@ -1,66 +1,66 @@ { - "version": "1.0.5", - "name": "@stroeer/stroeer-videoplayer-plugin-endcard", - "description": "Ströer Videoplayer Endcard Plugin", - "main": "dist/stroeerVideoplayer-endcard-plugin.umd.js", - "module": "dist/stroeerVideoplayer-endcard-plugin.esm.js", - "files": [ - "dist" - ], - "scripts": { - "dev": "rollup -c rollup.config.dev.js -w", - "start": "lite-server", - "build": "npm-run-all build:*", - "build:js": "rollup -c", - "watch": "npm-run-all watch:*", - "watch:js": "rollup -c -w", - "lint": "eslint src/*.ts src/**/*.ts", - "test": "jest tests", - "test:coverage": "jest tests --coverage", - "test-update": "jest --updateSnapshot" - }, - "repository": { - "type": "git", - "url": "git@github.com:stroeer/stroeer-videoplayer-plugin-endcard.git" - }, - "author": "Marco Kellershoff ", - "license": "MIT", - "devDependencies": { - "@babel/cli": "7.17.6", - "@babel/core": "7.17.8", - "@babel/preset-typescript": "7.16.7", - "@rollup/plugin-json": "4.1.0", - "@rollup/plugin-node-resolve": "13.1.3", - "@rollup/plugin-typescript": "8.3.1", - "@stroeer/stroeer-videoplayer": "0.0.24", - "@stroeer/stroeer-videoplayer-default-ui": "0.0.43", - "@stroeer/stroeer-videoplayer-ivad-ui": "0.0.16", - "@superevilmegaco/jest-evil-svg-transformer": "0.0.4", - "@types/jest": "27.4.1", - "@types/node": "17.0.23", - "@types/node-fetch": "2.6.1", - "@typescript-eslint/eslint-plugin": "4.0.1", - "@typescript-eslint/parser": "4.0.0", - "cypress": "9.5.2", - "eslint": "7.12.1", - "eslint-config-standard-with-typescript": "21.0.1", - "eslint-plugin-cypress": "2.12.1", - "eslint-plugin-import": "2", - "eslint-plugin-node": "11", - "eslint-plugin-promise": "5.0.0", - "jest": "27.5.1", - "lite-server": "2.6.1", - "node-sass": "7.0.1", - "npm-run-all": "4.1.5", - "rollup": "2.70.1", - "rollup-plugin-scss": "3.0.0", - "rollup-plugin-svg": "2.0.0", - "rollup-plugin-visualizer": "5.6.0", - "sass": "1.49.9", - "ts-jest": "27.1.4", - "ts-node": "10.7.0", - "ts-standard": "11.0.0", - "tslib": "2.3.1", - "typescript": "4.0.8" - } + "version": "1.0.6", + "name": "@stroeer/stroeer-videoplayer-plugin-endcard", + "description": "Ströer Videoplayer Endcard Plugin", + "main": "dist/stroeerVideoplayer-endcard-plugin.umd.js", + "module": "dist/stroeerVideoplayer-endcard-plugin.esm.js", + "files": [ + "dist" + ], + "scripts": { + "dev": "rollup -c rollup.config.dev.js -w", + "start": "lite-server", + "build": "npm-run-all build:*", + "build:js": "rollup -c", + "watch": "npm-run-all watch:*", + "watch:js": "rollup -c -w", + "lint": "eslint src/*.ts src/**/*.ts", + "test": "jest tests", + "test:coverage": "jest tests --coverage", + "test-update": "jest --updateSnapshot" + }, + "repository": { + "type": "git", + "url": "git@github.com:stroeer/stroeer-videoplayer-plugin-endcard.git" + }, + "author": "Marco Kellershoff ", + "license": "MIT", + "devDependencies": { + "@babel/cli": "7.17.6", + "@babel/core": "7.17.8", + "@babel/preset-typescript": "7.16.7", + "@rollup/plugin-json": "4.1.0", + "@rollup/plugin-node-resolve": "13.1.3", + "@rollup/plugin-typescript": "8.3.1", + "@stroeer/stroeer-videoplayer": "0.0.24", + "@stroeer/stroeer-videoplayer-default-ui": "0.0.43", + "@stroeer/stroeer-videoplayer-ivad-ui": "0.0.16", + "@superevilmegaco/jest-evil-svg-transformer": "0.0.4", + "@types/jest": "27.4.1", + "@types/node": "17.0.23", + "@types/node-fetch": "2.6.1", + "@typescript-eslint/eslint-plugin": "4.0.1", + "@typescript-eslint/parser": "4.0.0", + "cypress": "9.5.2", + "eslint": "7.12.1", + "eslint-config-standard-with-typescript": "21.0.1", + "eslint-plugin-cypress": "2.12.1", + "eslint-plugin-import": "2", + "eslint-plugin-node": "11", + "eslint-plugin-promise": "5.0.0", + "jest": "27.5.1", + "lite-server": "2.6.1", + "node-sass": "7.0.1", + "npm-run-all": "4.1.5", + "rollup": "2.70.1", + "rollup-plugin-scss": "3.0.0", + "rollup-plugin-svg": "2.0.0", + "rollup-plugin-visualizer": "5.6.0", + "sass": "1.49.9", + "ts-jest": "27.1.4", + "ts-node": "10.7.0", + "ts-standard": "11.0.0", + "tslib": "2.3.1", + "typescript": "4.0.8" + } } diff --git a/rollup.config.js b/rollup.config.js index 22134fa..fdad9dd 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,14 +10,18 @@ console.log('is dev mode', isDevMode) export default [{ input: 'src/index.ts', - output: [ - { - file: pkg.module, - format: 'es', - exports: 'named', - sourcemap: isDevMode - } - ], + output: [{ + file: pkg.module, + format: 'es', + exports: 'named', + sourcemap: isDevMode + }, { + file: pkg.main, + format: 'umd', + exports: 'named', + name: 'StroeerVideoPlayerEndcardPlugin', + sourcemap: isDevMode + }], plugins: [ nodeResolve(), typescript({