From 841495d4532b27b52e6e2ef011829dcdf6f60b83 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Mon, 4 Oct 2021 11:02:24 -0700 Subject: [PATCH 1/3] Update documentation for lint and format scripts --- ui/desktop/README.md | 7 ++++++- ui/desktop/package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/desktop/README.md b/ui/desktop/README.md index ba9ca6e88..d706155e1 100644 --- a/ui/desktop/README.md +++ b/ui/desktop/README.md @@ -39,14 +39,19 @@ List of available project commands. `yarn run ` | Command | Description | | ------- | ----------- | -| build:development | Builds the UI in development mode. | | build | Builds the UI for production. | +| build:development | Builds the UI in development mode. | | build:desktop:debianOnMacOS | Builds debian based linux artifacts on MacOS. | | lint | Runs all lint commands. | +| lint:fix | Runs all automatic linting fixes. | | lint:hbs | Lints `hbs` template files. | +| lint:hbs:fix | Runs the automatic linting fix for `hbs` template files. | | lint:js | Lints `js` files. | +| lint:js:fix | Runs the automatic linting fix for `js` files. | | lint:sass | Lints `scss` files. | +| lint:electron | Runs a linter tool to identify misconfigurations and security anti-patterns in Electron. | | format | Runs all auto-formatters. | +| format:hbs | Auto-formats `hbs` files using Prettier. | | format:js | Auto-formats `js` files using Prettier. | | format:sass | Auto-formats `scss` files using Prettier. | | start | Runs the dummy app local server. | diff --git a/ui/desktop/package.json b/ui/desktop/package.json index 2c30fa816..4f0dfb6ca 100755 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -23,13 +23,13 @@ "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint .", + "lint:js:fix": "eslint . --fix", "lint:sass": "stylelint '**/*.scss'", "lint:electron": "electronegativity -r -i ./electron-app", "format": "npm-run-all format:*", "format:hbs": "prettier --write 'app/**/*.hbs'", "format:js": "prettier --write '{app,config,stories,tests,electron-app/src}/**/*.js' *.js", "format:sass": "prettier --write app/**/*.scss", - "lint:js:fix": "eslint . --fix", "start": "ember serve", "prestart:desktop": "cd electron-app && yarn premake", "start:desktop": "ember electron", From d8d22cd787c98377d4241be908c0df763214fab9 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Mon, 4 Oct 2021 12:54:44 -0700 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20Enhance=20desk?= =?UTF-8?q?top=20UI=20yarn=20commands=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhance desktop UI yarn commands documentation --- ui/desktop/README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/desktop/README.md b/ui/desktop/README.md index d706155e1..e4e3af04d 100644 --- a/ui/desktop/README.md +++ b/ui/desktop/README.md @@ -1,6 +1,6 @@ -# Client Connect UI +# Desktop client UI -The client UI for Boundary. +The desktop client UI for Boundary. @@ -31,7 +31,7 @@ You will need the following things properly installed on your computer. ## Installation -See boundary-ui README for installation instructions. +See [boundary-ui README](https://github.com/hashicorp/boundary-ui#installation) for installation instructions. ## Yarn Commands @@ -54,14 +54,19 @@ List of available project commands. `yarn run ` | format:hbs | Auto-formats `hbs` files using Prettier. | | format:js | Auto-formats `js` files using Prettier. | | format:sass | Auto-formats `scss` files using Prettier. | -| start | Runs the dummy app local server. | +| prestart:desktop | Generate forge config file based on platform. | +| start | Runs the dummy app local server as web app. | | start:desktop | Runs the dummy app as an electron app. | +| clean:coverage | Cleans coverage reporting directory. | +| pretest | Runs `clean:coverage`. | | test | Runs all tests in random order, with coverage reporting. | +| test:ember | Runs ember tests in random order, with coverage reporting. | | doc:toc | Automatically generates a table of contents for this README file. | ## Running / Development +To run as web app: * `yarn start` * Visit your app at [http://localhost:4200](http://localhost:4200). * Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). @@ -95,11 +100,12 @@ These environment variables may be used to customized the build. | `BYPASS_CLI_SETUP` | Disable download and extraction of cli. For development use only. | | `BYPASS_APP_UPDATER` | Disable app updater feature. For development use only. | | `DISABLE_WINDOW_CHROME` | Disable window chrome. For internal use only. | +| `ENABLE_MIRAGE` | Enable (`true`) or disable (`false`) mirage. Default value is `true`. | ### Building for Production Before executing a build, be sure to set any environment variables necessary -for your target [environment](#environment-variables). To build this UI for +for your target [environment](#environment-variables). To build this UI for production, run the following commands from this folder: ```bash From 23341da9795151bc8b34c558e43ef180660e86b7 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 5 Oct 2021 13:29:28 -0700 Subject: [PATCH 3/3] Apply PR suggestions --- ui/desktop/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/desktop/README.md b/ui/desktop/README.md index e4e3af04d..f80ab75d2 100644 --- a/ui/desktop/README.md +++ b/ui/desktop/README.md @@ -54,11 +54,9 @@ List of available project commands. `yarn run ` | format:hbs | Auto-formats `hbs` files using Prettier. | | format:js | Auto-formats `js` files using Prettier. | | format:sass | Auto-formats `scss` files using Prettier. | -| prestart:desktop | Generate forge config file based on platform. | | start | Runs the dummy app local server as web app. | | start:desktop | Runs the dummy app as an electron app. | | clean:coverage | Cleans coverage reporting directory. | -| pretest | Runs `clean:coverage`. | | test | Runs all tests in random order, with coverage reporting. | | test:ember | Runs ember tests in random order, with coverage reporting. | | doc:toc | Automatically generates a table of contents for this README file. |