Skip to content

Commit

Permalink
fix(testing): add playwright secondary entrypoint for preset (#18202)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbados-clemens authored Jul 20, 2023
1 parent 4ef66f4 commit b7fb3ea
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 28 deletions.
7 changes: 7 additions & 0 deletions packages/playwright/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export {
playwrightExecutor,
PlaywrightExecutorSchema,
} from './src/executors/playwright/playwright';
export { initGenerator } from './src/generators/init/init';
export { configurationGenerator } from './src/generators/configuration/configuration';
export { nxE2EPreset, NxPlaywrightOptions } from './src/utils/preset';
4 changes: 2 additions & 2 deletions packages/playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"Playwright",
"CLI"
],
"main": "./src/index",
"typings": "./src/index.d.ts",
"main": "./index.js",
"typings": "./index.d.ts",
"author": "Victor Savkin",
"license": "MIT",
"bugs": {
Expand Down
1 change: 1 addition & 0 deletions packages/playwright/preset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/utils/preset';
42 changes: 25 additions & 17 deletions packages/playwright/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "playwright",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/playwright/src",
"sourceRoot": "packages/playwright",
"projectType": "library",
"targets": {
"build": {
Expand All @@ -15,30 +15,38 @@
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "build/packages/playwright",
"main": "packages/playwright/src/index.ts",
"tsConfig": "packages/playwright/tsconfig.lib.json",
"assets": [
"packages/playwright/*.md",
{
"input": "./packages/playwright/src",
"glob": "**/!(*.ts)",
"output": "./src"
"input": "packages/playwright",
"glob": "**/files/**",
"output": "/"
},
{
"input": "./packages/playwright/src",
"glob": "**/*.d.ts",
"output": "./src"
"input": "packages/playwright",
"glob": "**/files/**/.gitkeep",
"output": "/"
},
{
"input": "packages/playwright",
"glob": "**/*.json",
"ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
"output": "/"
},
{
"input": "./packages/playwright",
"glob": "generators.json",
"output": "."
"input": "packages/playwright",
"glob": "**/*.js",
"ignore": ["**/jest.config.js"],
"output": "/"
},
{
"input": "packages/playwright",
"glob": "**/*.d.ts",
"output": "/"
},
{
"input": "./packages/playwright",
"glob": "executors.json",
"output": "."
"input": "",
"glob": "LICENSE",
"output": "/"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from '@playwright/test';
import { nxE2EPreset } from '@nx/playwright'
import { nxE2EPreset } from '@nx/playwright/preset';
import { workspaceRoot } from '@nx/devkit';

/**
Expand Down
7 changes: 0 additions & 7 deletions packages/playwright/src/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/playwright/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"declaration": true,
"types": ["node"]
},
"include": ["src/**/*.ts"],
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
}

1 comment on commit b7fb3ea

@vercel
Copy link

@vercel vercel bot commented on b7fb3ea Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-five.vercel.app

Please sign in to comment.