Skip to content

Commit 1877169

Browse files
committed
chore: prepare directory structure for more examples
Signed-off-by: Jakub Freisler <[email protected]>
1 parent 43da4ef commit 1877169

29 files changed

+28
-423
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
parser: "@typescript-eslint/parser",
1919
parserOptions: {
2020
sourceType: "module",
21-
project: ["./packages/cypress-plugin-visual-regression-diff/tsconfig.json", "./example/tsconfig.json"],
21+
project: ["./packages/cypress-plugin-visual-regression-diff/tsconfig.json", "./examples/webpack/tsconfig.json"],
2222
tsconfigRootDir: __dirname,
2323
warnOnUnsupportedTypeScriptVersion: false,
2424
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
with:
4747
node-version: "18.x"
4848
cache: 'pnpm'
49-
- run: pnpm install && cd ./example && pnpm cypress install
50-
- run: pnpm build --filter cypress-plugin-visual-regression-diff
49+
- run: pnpm install && cd ./examples/webpack && pnpm cypress install
50+
- run: pnpm -r build --filter cypress-plugin-visual-regression-diff
5151
- name: Test e2e
5252
run: pnpm test:e2e:ci
5353
- name: Test component-testing

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ After cloning the repository, run:
5050

5151
```bash
5252
pnpm i # installs the project dependencies
53-
cd example && pnpm i # install dependencies for example project (useful for testing)
53+
cd examples/webpack && pnpm i # install dependencies for example project (useful for testing)
5454
```
5555

5656
### Committing Changes

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ cy.matchImage();
153153

154154
## Example
155155

156-
Still got troubles with installation? Have a look at [example directory of this repo](./example) to see how this plugin can be used in e2e or component-testing Cypress environment within your project.
156+
Still got troubles with installation? Have a look at [examples directory of this repo](./examples) to see how this plugin can be used in e2e or component-testing Cypress environment within your project.
157157

158158
## Automatic clean up of unused images
159159

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

example/cypress/support/component.ts renamed to examples/webpack/cypress/support/component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// ***********************************************************
1515

1616
// Import commands.js using ES2015 syntax:
17-
import "./commands.ts";
17+
import "./commands.js";
1818

1919
// Alternatively you can use CommonJS syntax:
2020
// require('./commands')
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
"release": "pnpm publish",
1414
"release:ci": "pnpm release --yes",
1515
"release:test": "pnpm release --no-git-tag-version --no-push --skip-npm",
16-
"test": "cd example && pnpm test:ct:ci && pnpm test:e2e:ci && pnpm test:integration:ci",
16+
"test": "cd examples/webpack && pnpm test:ct:ci && pnpm test:e2e:ci && pnpm test:integration:ci",
1717
"test:integration": "pnpm -r test:integration",
1818
"test:integration:watch": "pnpm -r test:integration:watch",
1919
"test:integration:coverage": "pnpm -r test:integration:coverage",
2020
"test:integration:ci": "pnpm -r test:integration:ci",
21-
"test:ct": "cd example && pnpm test:ct",
22-
"test:ct:ci": "cd example && pnpm test:ct:ci",
23-
"test:e2e": "cd example && pnpm test:e2e",
24-
"test:e2e:ci": "cd example && pnpm test:e2e:ci"
21+
"test:ct": "cd examples/webpack && pnpm test:ct",
22+
"test:ct:ci": "cd examples/webpack && pnpm test:ct:ci",
23+
"test:e2e": "cd examples/webpack && pnpm test:e2e",
24+
"test:e2e:ci": "cd examples/webpack && pnpm test:e2e:ci"
2525
},
2626
"engines": {
2727
"node": ">=10"

packages/cypress-plugin-visual-regression-diff/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555
"release": "semantic-release",
5656
"release:ci": "pnpm release --yes",
5757
"release:test": "pnpm release --no-git-tag-version --no-push --skip-npm",
58-
"test": "cd example && pnpm test:ct:ci && pnpm test:e2e:ci && pnpm test:integration:ci",
58+
"test": "cd examples/webpack && pnpm test:ct:ci && pnpm test:e2e:ci && pnpm test:integration:ci",
5959
"test:integration": "vitest run",
6060
"test:integration:watch": "vitest",
6161
"test:integration:coverage": "vitest run --coverage",
6262
"test:integration:ci": "CI=true vitest run --coverage",
63-
"test:ct": "cd example && pnpm test:ct",
64-
"test:ct:ci": "cd example && pnpm test:ct:ci",
65-
"test:e2e": "cd example && pnpm test:e2e",
66-
"test:e2e:ci": "cd example && pnpm test:e2e:ci"
63+
"test:ct": "cd examples/webpack && pnpm test:ct",
64+
"test:ct:ci": "cd examples/webpack && pnpm test:ct:ci",
65+
"test:e2e": "cd examples/webpack && pnpm test:e2e",
66+
"test:e2e:ci": "cd examples/webpack && pnpm test:e2e:ci"
6767
},
6868
"engines": {
6969
"node": ">=10"

0 commit comments

Comments
 (0)