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

Removed hardcoded locations for test-app #81

Merged
merged 3 commits into from
Apr 26, 2024
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ In most cases, I recommend running the codemod without any arguments (i.e. allow
By default, the package name decides where the addon package lives. Pass `--addon-location` to override the logic. This may be useful if you have a workspace with many addons.

```sh
npx ember-codemod-v1-to-v2 --addon-location packages/ui/buttons
npx ember-codemod-v1-to-v2 --addon-location packages/ui/button
```

</details>
Expand Down Expand Up @@ -94,7 +94,7 @@ npx ember-codemod-v1-to-v2 --test-app-location docs-app
By default, the test-app package is named `test-app`. Pass `--test-app-name` to override the logic. This may be useful if you have a workspace with many addons.

```sh
npx ember-codemod-v1-to-v2 --test-app-name test-app-for-ui-buttons
npx ember-codemod-v1-to-v2 --test-app-name test-app-for-ui-button
```

</details>
Expand Down
6 changes: 3 additions & 3 deletions src/steps/update-addon-package-json/update-scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function updateScripts(
packageJson: PackageJson,
options: Options,
): void {
const { packages } = options;
const { locations, packages } = options;

const scripts = convertToMap(packageJson['scripts']);

Expand Down Expand Up @@ -40,15 +40,15 @@ export function updateScripts(

scripts.set(
'test',
"echo 'A v2 addon does not have tests, run tests in test-app'",
`echo 'A v2 addon does not have tests, run tests in ${locations.testApp}'`,
);
} else {
scripts.set('build', 'rollup --config');
scripts.set('prepack', 'rollup --config');
scripts.set('start', 'rollup --config --watch');
scripts.set(
'test',
"echo 'A v2 addon does not have tests, run tests in test-app'",
`echo 'A v2 addon does not have tests, run tests in ${locations.testApp}'`,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"start": "concurrently \"npm:start:*\" --names \"start:\"",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "glint --declaration --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"test": "echo 'A v2 addon does not have tests, run tests in demo-app'",
"test:ember": "ember test",
"test:ember-compatibility": "./node_modules/.bin/ember try:one"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"start": "concurrently \"npm:start:*\" --names \"start:\"",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "tsc --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"test": "echo 'A v2 addon does not have tests, run tests in demo-app'",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"start": "concurrently \"npm:start:*\" --names \"start:\"",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "glint --declaration --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"test": "echo 'A v2 addon does not have tests, run tests in demo-app'",
"test:ember": "ember test",
"test:ember-compatibility": "./node_modules/.bin/ember try:one"
},
Expand Down