-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 06a5cbe
Showing
14 changed files
with
5,866 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
parser: "@typescript-eslint/parser", // Specifies the ESLint parser | ||
parserOptions: { | ||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features | ||
sourceType: "module" // Allows for the use of imports | ||
}, | ||
extends: [ | ||
"plugin:@typescript-eslint/recommended" // Uses the recommended rules from the @typescript-eslint/eslint-plugin | ||
], | ||
rules: { | ||
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs | ||
// e.g. "@typescript-eslint/explicit-function-return-type": "off", | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/node_modules/ | ||
/.rpt2_cache/ | ||
package-lock.json | ||
/dist/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
semi: true, | ||
trailingComma: 'all', | ||
singleQuote: true, | ||
printWidth: 160, | ||
tabWidth: 2, | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Custom cards for Home Assistant | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<img src="https://raw.githubusercontent.com/Makin-Things/platinum-weather-card/master/images/pencil-black.svg" width="24"> | ||
|
||
<img src="https://raw.githubusercontent.com/Makin-Things/platinum-weather-card/master/images/pencil-white.svg" width="24"> | ||
|
||
<img src="https://raw.githubusercontent.com/Makin-Things/platinum-weather-card/master/images/pencil-current.svg" width="24"> | ||
|
||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Makin-Things/platinum-weather-card/master/images/pencil-white.svg"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Makin-Things/platinum-weather-card/master/images/pencil-black.svg"> | ||
<img alt="Shows an illustrated sun in light color mode and a moon with stars in dark color mode." width="24"> | ||
</picture> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "Platinum Weather Card ES", | ||
"hacs": "1.26.0", | ||
"render_readme": true, | ||
"hide_default_branch": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"name": "platinum-weather-card-es", | ||
"version": "1.2.1", | ||
"description": "platinum-weather-card-es", | ||
"keywords": [ | ||
"home-assistant", | ||
"homeassistant", | ||
"hass", | ||
"automation", | ||
"lovelace", | ||
"custom-cards" | ||
], | ||
"module": "platinum-weather-card.js", | ||
"repository": "[email protected]: /platinum-weather-card-es.git", | ||
"author": "figorr", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@lit-labs/scoped-registry-mixin": "^1.0.1", | ||
"@material/mwc-formfield": "^0.25.3", | ||
"@material/mwc-list": "^0.25.3", | ||
"@material/mwc-menu": "^0.25.3", | ||
"@material/mwc-notched-outline": "^0.25.3", | ||
"@material/mwc-ripple": "^0.25.3", | ||
"@material/mwc-select": "^0.25.3", | ||
"@material/mwc-switch": "^0.25.3", | ||
"@material/mwc-textfield": "^0.25.3", | ||
"@mdi/js": "^6.7.96", | ||
"custom-card-helpers": "^1.8.0", | ||
"home-assistant-js-websocket": "^5.11.1", | ||
"lit": "^2.4.0", | ||
"resize-observer-polyfill": "^1.5.1", | ||
"ts-transformer-keys": "^0.4.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.19.3", | ||
"@babel/plugin-proposal-class-properties": "^7.17.12", | ||
"@babel/plugin-proposal-decorators": "^7.19.3", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@typescript-eslint/eslint-plugin": "^5.40.1", | ||
"@typescript-eslint/parser": "^5.40.1", | ||
"eslint": "^8.25.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"prettier": "^2.7.1", | ||
"rollup": "^2.79.1", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-serve": "^1.1.0", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"typescript": "^4.8.4" | ||
}, | ||
"resolutions": { | ||
"lit": "^2.1.2", | ||
"lit-html": "2.1.2", | ||
"lit-element": "3.1.2", | ||
"@lit/reactive-element": "1.2.1" | ||
}, | ||
"scripts": { | ||
"start": "rollup -c rollup.config.dev.js --watch", | ||
"build": "npm run lint && npm run rollup", | ||
"lint": "eslint src/*.ts", | ||
"rollup": "rollup -c" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import keysTransformer from 'ts-transformer-keys/transformer'; | ||
import babel from 'rollup-plugin-babel'; | ||
import serve from 'rollup-plugin-serve'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import json from '@rollup/plugin-json'; | ||
import ignore from './rollup-plugins/ignore'; | ||
import { ignoreTextfieldFiles } from './elements/ignore/textfield'; | ||
import { ignoreSelectFiles } from './elements/ignore/select'; | ||
import { ignoreSwitchFiles } from './elements/ignore/switch'; | ||
|
||
export default { | ||
input: ['src/platinum-weather-card.ts'], | ||
output: { | ||
dir: './dist', | ||
format: 'es', | ||
inlineDynamicImports: true, | ||
}, | ||
watch: { | ||
include: './src/**', | ||
clearScreen: false, | ||
}, | ||
plugins: [ | ||
resolve(), | ||
typescript({ transformers: [service => ({ | ||
before: [ keysTransformer(service.getProgram()) ], | ||
after: [] | ||
})] }), | ||
json(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
}), | ||
// terser(), | ||
serve({ | ||
contentBase: './dist', | ||
host: '0.0.0.0', | ||
port: 5000, | ||
allowCrossOrigin: true, | ||
headers: { | ||
'Access-Control-Allow-Origin': '*', | ||
}, | ||
}), | ||
ignore({ | ||
files: [...ignoreTextfieldFiles, ...ignoreSelectFiles, ...ignoreSwitchFiles].map((file) => require.resolve(file)), | ||
}), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import typescript from 'rollup-plugin-typescript2'; | ||
import keysTransformer from 'ts-transformer-keys/transformer'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import nodeResolve from 'rollup-plugin-node-resolve'; | ||
import babel from 'rollup-plugin-babel'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import serve from 'rollup-plugin-serve'; | ||
import json from '@rollup/plugin-json'; | ||
import ignore from './rollup-plugins/ignore'; | ||
import { ignoreTextfieldFiles } from './elements/ignore/textfield'; | ||
import { ignoreSelectFiles } from './elements/ignore/select'; | ||
import { ignoreSwitchFiles } from './elements/ignore/switch'; | ||
|
||
const dev = process.env.ROLLUP_WATCH; | ||
|
||
const serveopts = { | ||
contentBase: ['./dist'], | ||
host: '0.0.0.0', | ||
port: 5000, | ||
allowCrossOrigin: true, | ||
headers: { | ||
'Access-Control-Allow-Origin': '*', | ||
}, | ||
}; | ||
|
||
const plugins = [ | ||
nodeResolve({}), | ||
commonjs(), | ||
typescript({ transformers: [service => ({ | ||
before: [ keysTransformer(service.getProgram()) ], | ||
after: [] | ||
})] }), | ||
json(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
}), | ||
dev && serve(serveopts), | ||
!dev && terser(), | ||
ignore({ | ||
files: [...ignoreTextfieldFiles, ...ignoreSelectFiles, ...ignoreSwitchFiles].map((file) => require.resolve(file)), | ||
}), | ||
]; | ||
|
||
export default [ | ||
{ | ||
input: 'src/platinum-weather-card.ts', | ||
output: { | ||
dir: 'dist', | ||
format: 'es', | ||
}, | ||
plugins: [...plugins], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2017", | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"lib": [ | ||
"es2017", | ||
"dom", | ||
"dom.iterable" | ||
], | ||
"noEmit": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"strict": true, | ||
"noImplicitAny": false, | ||
"skipLibCheck": true, | ||
"resolveJsonModule": true, | ||
"experimentalDecorators": true | ||
} | ||
} |
Oops, something went wrong.