Skip to content

Commit

Permalink
Update dependencies, replace builds and translation handling to be mo…
Browse files Browse the repository at this point in the history
…re in sync with core (#647)

* Replace builds to be more in sync with core

* updates
  • Loading branch information
ludeeus authored Jun 3, 2023
1 parent b5a1fdf commit 826790d
Show file tree
Hide file tree
Showing 42 changed files with 19,369 additions and 12,876 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "HACS Frontend",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:16-bullseye",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:18",
"remoteUser": "node",
"postCreateCommand": "make init",
"forwardPorts": [
Expand Down
7 changes: 7 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"prettier",
],
"parser": "@typescript-eslint/parser",
"settings": {
"import/resolver": {
"webpack": {
"config": "./webpack.config.cjs"
}
}
},
"parserOptions":
{
"ecmaVersion": 2020,
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ReleaseActions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: ["published"]

env:
NODE_VERSION: 16
NODE_VERSION: 18
PYTHON_VERSION: "3.x"

jobs:
Expand Down Expand Up @@ -54,21 +54,21 @@ jobs:
run: |
export version=${{ github.ref }}
sed -i "s|main|${version##*/}|" ./setup.py
sed -i "s|main|${version##*/}|" ./hacs_frontend/version.py
sed -i "s|main|${version##*/}|" ./public/version.py
sed -i "s|main|${version##*/}|" ./src/version.ts
cat ./setup.py
cat ./hacs_frontend/version.py
cat ./public/version.py
cat ./src/version.ts
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
make bootstrap
script/bootstrap
- name: Build
run: make build
run: script/build

- name: Publish to PyPi
env:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/TestBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
NODE_VERSION: 16
NODE_VERSION: 18

jobs:
build_frontend:
Expand All @@ -31,3 +31,5 @@ jobs:
run: script/bootstrap
- name: Build
run: script/build
env:
IS_TEST: "true"
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
node_modules
package-lock.json
build
src/localize/generated.ts
dist
src/localize/languages/translationMetadata.json
!script/build
hacs_frontend/*.js
hacs_frontend/*.json
hacs_frontend/*.js.gz
!hacs_frontend/*.py
hacs_frontend

yarn-error.log
.yarn
.yarn/*
!.yarn/releases
!.yarn/releases/yarn-*.cjs
873 changes: 873 additions & 0 deletions .yarn/releases/yarn-3.5.1.cjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

defaultSemverRangePrefix: ""

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.5.1.cjs
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ start: ## Start the frontend
yarn start;

bootstrap: ## Run yarn
git submodule update --init;
yarn;
git submodule update --init

build: ## Build the frontend
yarn build;
Expand All @@ -21,8 +21,7 @@ update: ## Pull main from hacs/frontend
git pull upstream main;

update-submodule: ## Udpate submodules
rm -R homeassistant-frontend;
git submodule update --init --recursive --remote;
git submodule update --recursive --remote;
script/bootstrap

tag-name: ## Create a tag name
Expand Down
13 changes: 11 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
var requireDir = require("require-dir");
requireDir("./script/gulp/");
import { globIterate } from "glob";

const gulpImports = [];

for await (const gulpModule of globIterate(["./script/gulp/*.?(c|m)js"], {
dotRelative: true,
})) {
gulpImports.push(import(gulpModule));
}

await Promise.all(gulpImports);
2 changes: 1 addition & 1 deletion homeassistant-frontend
Loading

0 comments on commit 826790d

Please sign in to comment.