Skip to content

Commit

Permalink
add scripts for testing locally consul-ui-toolkit (#16794)
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriia-ruban authored Mar 28, 2023
1 parent e5d58c5 commit 12be12f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
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

0 comments on commit 12be12f

Please sign in to comment.