Skip to content

Commit

Permalink
FIX: Separate playwrite templates for js vs ts (#4479)
Browse files Browse the repository at this point in the history
* FIX: Separate playwrite templates for js vs ts

Playwrite file when building with typescript
requires the playwrite.config file to have extension .ts

* package.json shoudnt be duplicated

* install @playwright/test as dev dep to remove the red squigglies

* make the .ts file actually use typescript

* oops, typo

* bump version

* fix merging

* use next version of @playwright/test for TS users

Co-authored-by: Rich Harris <[email protected]>
  • Loading branch information
JackDra and Rich-Harris authored Apr 1, 2022
1 parent aa2e2c4 commit 143d17f
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 29 deletions.
6 changes: 5 additions & 1 deletion packages/create-svelte/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ function merge(target, source) {
throw new Error('Mismatched values');
}

merge(target_value, source_value);
if (typeof source_value === 'object') {
merge(target_value, source_value);
} else {
target[key] = source_value;
}
} else {
target[key] = source[key];
}
Expand Down
1 change: 1 addition & 0 deletions packages/create-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"prompts": "^2.4.2"
},
"devDependencies": {
"@playwright/test": "^1.20.1",
"@sveltejs/kit": "workspace:*",
"@types/gitignore-parser": "^0.0.0",
"@types/prettier": "^2.4.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"@playwright/test": "next"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
webServer: {
command: 'npm run build && npm run preview',
port: 3000
}
};

export default config;
120 changes: 92 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 143d17f

Please sign in to comment.