Skip to content

Commit

Permalink
Merge pull request #29 from iantrich/fix-build
Browse files Browse the repository at this point in the history
Fix build errors
  • Loading branch information
iantrich authored Nov 8, 2019
2 parents 0d8118a + 46461dc commit 8f96343
Show file tree
Hide file tree
Showing 16 changed files with 2,212 additions and 3,300 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
experimentalDecorators: true,
},
rules: {
"@typescript-eslint/camelcase": 0
}
};
18 changes: 0 additions & 18 deletions .eslintrc.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/node_modules/
yarn.lock
.rpt2_cache/
/.rpt2_cache/
package-lock.json
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
};
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"recommendations": [
"github.vscode-pull-request-github",
"eamodio.gitlens",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bierner.lit-html",
"runem.lit-plugin",
"auchenberg.vscode-browser-preview",
"davidanson.vscode-markdownlint",
"redhat.vscode-yaml"
]
}
6 changes: 0 additions & 6 deletions babel.config.js

This file was deleted.

3,099 changes: 63 additions & 3,036 deletions dist/roku-card.js

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "roku-card",
"version": "1.3.2",
"version": "1.0.7",
"description": "Lovelace Roku Ccard",
"keywords": [
"home-assistant",
Expand All @@ -16,32 +16,36 @@
"author": "Ian Richardson <[email protected]>",
"license": "MIT",
"dependencies": {
"custom-card-helpers": "^1.3.8",
"custom-card-helpers": "^1.3.9",
"home-assistant-js-websocket": "^4.4.0",
"lit-element": "^2.2.1"
},
"devDependencies": {
"lit-element": "^2.2.1",
"lit-html": "^1.1.2"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.4.0",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-prettier": "^3.1.1",
"prettier": "^1.18.2",
"rollup": "^1.26.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-serve": "^1.0.1",
"rollup-plugin-terser": "^5.1.2",
"rollup-plugin-typescript2": "^0.24.3",
"rollup-plugin-uglify": "^6.0.3",
"typescript": "^3.6.4"
},
"scripts": {
"start": "rollup -c --watch",
},
"scripts": {
"start": "rollup -c rollup.config.dev.js --watch",
"build": "npm run lint && npm run rollup",
"lint": "eslint src/*.ts",
"rollup": "rollup -c"
}
}
}
30 changes: 30 additions & 0 deletions rollup.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import babel from 'rollup-plugin-babel';
import serve from 'rollup-plugin-serve';
import { terser } from 'rollup-plugin-terser';

export default {
input: ['src/roku-card.ts'],
output: {
dir: './dist',
format: 'es',
},
plugins: [
resolve(),
typescript(),
babel({
exclude: 'node_modules/**',
}),
terser(),
serve({
contentBase: './dist',
host: '0.0.0.0',
port: 5000,
allowCrossOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
}),
],
};
19 changes: 11 additions & 8 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import resolve from 'rollup-plugin-node-resolve';
import typescript from 'rollup-plugin-typescript2';
import babel from 'rollup-plugin-babel';
import resolve from "rollup-plugin-node-resolve";
import typescript from "rollup-plugin-typescript2";
import babel from "rollup-plugin-babel";
import { terser } from "rollup-plugin-terser";

export default {
input: ['src/roku-card.ts'],
input: ["src/roku-card.ts"],
output: {
dir: './dist',
format: 'es',
dir: "./dist",
format: "es"
},
plugins: [
resolve(),
typescript(),
babel({
exclude: 'node_modules/**',
})],
exclude: "node_modules/**"
}),
terser(),
]
};
Loading

0 comments on commit 8f96343

Please sign in to comment.