Skip to content

Commit

Permalink
Bunch of features (#231)
Browse files Browse the repository at this point in the history
* Add support for any card in custom_fields

* Fix version script

* Drop support for custom_updater

* confirmation template support and per action confirmation

* Confirmation supports templates and exemptions

* Support for Safari 10

* Using createThing from cch

* Proper events handling for embedded cards

* Lock with exemptions and delay

* Fix locking documentation

* Fix default color documentation

* Updating templates documentation

* Support for different unlock clicks

* Update embedded card documentation
  • Loading branch information
RomRider committed Oct 21, 2019
1 parent 5ef600a commit b1fa112
Show file tree
Hide file tree
Showing 15 changed files with 746 additions and 2,819 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/node_modules/
yarn.lock
.rpt2_cache/
/dist/*.map
/dist/**
305 changes: 196 additions & 109 deletions README.md

Large diffs are not rendered by default.

2,227 changes: 0 additions & 2,227 deletions dist/button-card.js

This file was deleted.

Binary file added examples/custom_fields_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions hooks/bump-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -euo pipefail

VERSION=$(jq -r .version package.json)

cat <<EOF >src/version-const.ts
export const BUTTON_CARD_VERSION = '${VERSION}';
EOF
3 changes: 2 additions & 1 deletion hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ set -euo pipefail
echo "Pre-Commit hooks running..."

npm run build
git add dist/button-card.js
npm run update-version
git add src/version-const.ts
782 changes: 382 additions & 400 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"rollup": "rollup -c",
"babel": "babel dist/button-card.js --out-file dist/button-card.js",
"lint": "eslint src/button-card.ts",
"watch": "rollup -c rollup.debug.config.js --watch"
"watch": "rollup -c rollup.debug.config.js --watch",
"update-version": "./hooks/bump-version.sh"
},
"repository": {
"type": "git",
Expand All @@ -32,35 +33,35 @@
},
"homepage": "https://github.com/custom-cards/button-card#readme",
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/core": "^7.6.4",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-decorators": "^7.4.4",
"@typescript-eslint/eslint-plugin": "^1.12.0",
"@typescript-eslint/parser": "^1.12.0",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"babel-cli": "^6.26.0",
"eslint": "^5.16.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-import": "^2.18.2",
"npm": "^6.10.1",
"npm": "^6.12.0",
"pre-commit": "^1.2.2",
"prettier": "^1.18.2",
"rollup": "^1.17.0",
"rollup": "^1.25.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^4.2.4",
"rollup-plugin-terser": "^4.0.4",
"rollup-plugin-typescript2": "^0.20.1",
"ts-lit-plugin": "^1.0.6",
"typescript": "^3.5.3",
"ts-lit-plugin": "^1.1.9",
"typescript": "^3.6.4",
"typescript-styled-plugin": "^0.14.0"
},
"dependencies": {
"@ctrl/tinycolor": "^2.5.3",
"bowser": "^2.5.2",
"custom-card-helpers": "^1.2.2",
"@ctrl/tinycolor": "^2.5.4",
"bowser": "^2.7.0",
"custom-card-helpers": "^1.2.7",
"home-assistant-js-websocket": "^3.4.0",
"lit-element": "^2.2.0",
"lit-html": "^1.1.1"
"lit-element": "^2.2.1",
"lit-html": "^1.1.2"
}
}
3 changes: 3 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export default {
exclude: 'node_modules/**',
}),
terser({
mangle: {
safari10: true,
},
output: {
comments: function (node, comment) {
var text = comment.value;
Expand Down
Loading

0 comments on commit b1fa112

Please sign in to comment.