From 2d332654fefd4ee7657cc6ade432e7a6aeec3c23 Mon Sep 17 00:00:00 2001 From: Koldo Picaza <1093654+kpicaza@users.noreply.github.com> Date: Sat, 17 Dec 2022 17:55:27 +0100 Subject: [PATCH] drinksco/console-ui-bundle recipe (#1439) --- drinksco/console-ui-bundle/0.2/manifest.json | 14 ++++++++ .../console-ui-bundle/0.2/post-install.txt | 36 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 drinksco/console-ui-bundle/0.2/manifest.json create mode 100644 drinksco/console-ui-bundle/0.2/post-install.txt diff --git a/drinksco/console-ui-bundle/0.2/manifest.json b/drinksco/console-ui-bundle/0.2/manifest.json new file mode 100644 index 00000000..8c2c09ad --- /dev/null +++ b/drinksco/console-ui-bundle/0.2/manifest.json @@ -0,0 +1,14 @@ +{ + "bundles": { + "Drinksco\\ConsoleUiBundle\\ConsoleUiBundle": ["dev"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "env": { + "CONSOLE_UI_MERCURE_URL": "http://localhost:3001/.well-known/mercure", + "CONSOLE_UI_MERCURE_PUBLIC_URL": "http://localhost:3001/.well-known/mercure", + "CONSOLE_UI_JWT_SECRET": "!ChangeThisMercureHubJWTSecretKey!", + "CONSOLE_API_URL": "http://localhost:3000" + } +} diff --git a/drinksco/console-ui-bundle/0.2/post-install.txt b/drinksco/console-ui-bundle/0.2/post-install.txt new file mode 100644 index 00000000..429a3a83 --- /dev/null +++ b/drinksco/console-ui-bundle/0.2/post-install.txt @@ -0,0 +1,36 @@ + * Configure Webpack + + // webpack.config.js + const Dotenv = require('dotenv-webpack'); + ... + .addEntry('component-loader', './node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js') + .addEntry('console-ui', './vendor/drinksco/console-ui-bundle/assets/app.js') + ... + // uncomment if you use TypeScript + .enableTypeScriptLoader() + ... + .addPlugin(new Dotenv()) + ... + + + * To run electron App update file + + ... + "main": "./vendor/drinksco/console-ui-bundle/main.js", + "scripts": { + ... + "console-ui-start": "electron ." + } + + + * Install yarn dependencies + yarn add --dev @hotwired/stimulus @symfony/stimulus-bridge @symfony/webpack-encore core-js dotenv dotenv-webpack electron regenerator-runtime ts-loader typescript webpack-notifier @material/card @material/mwc-button @material/mwc-checkbox @material/mwc-circular-progress @material/mwc-dialog @material/mwc-formfield @material/mwc-icon @material/mwc-list @material/mwc-textfield @material/mwc-top-app-bar-fixed @webcomponents/webcomponentsjs lit material-components-web + + * Build console-ui app + yarn encore production + + * Not using Docker install Mercure Hub + Download the legacy binary from Mercure releases page https://github.com/dunglas/mercure/releases, + and extract binary in the project root folder + + * Check environment variables in your .env