Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add scripts for testing locally consul-ui-toolkit #16794

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/packages/consul-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/npm-debug.log*
/testem.log
/yarn-error.log
/yalc.lock

# ember-try
/.node_modules.ember-try/
Expand Down
7 changes: 7 additions & 0 deletions ui/packages/consul-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ OSS only tests can also be run using:

See `.eslintrc.js` and `.eslintignore` for specific configuration.

### Testing local changes to `@hashicorp/consul-ui-toolkit`

| Command | Description |
|------------------------|----------------------------------------------------------------------|
| `yarn toolkit:link` | Similar to `npm link` it adds the dependency locally from yalc store |
| `yarn toolkit:remove"` | It will remove package info from package.json and yarn.lock file |

### Building

* `make build` builds the UI for production usage (env=production)
Expand Down
2 changes: 2 additions & 0 deletions ui/packages/consul-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"test:coverage": "COVERAGE=true ember test --environment test --filter=Unit --test-port=${EMBER_TEST_PORT:-7357}",
"test:coverage:ci": "COVERAGE=true ember test --environment test --filter=Unit --path dist --test-port=${EMBER_TEST_PORT:-7357}",
"test:coverage:view": "COVERAGE=true ember test --server --environment test --filter=Unit --test-port=${EMBER_TEST_PORT:-7357}",
"toolkit:link": "yalc link @hashicorp/consul-ui-toolkit",
"toolkit:remove": "yalc remove @hashicorp/consul-ui-toolkit",
"steps:list": "node ./lib/commands/bin/list.js",
"storybook": "start-storybook -p 6006 -s dist",
"build-storybook": "build-storybook -s dist"
Expand Down