fix(testing): add playwright secondary entrypoint for preset (#18202)
This commit is contained in:
parent
4ef66f4afd
commit
b7fb3ea8ad
7
packages/playwright/index.ts
Normal file
7
packages/playwright/index.ts
Normal file
@ -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';
|
||||
@ -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": {
|
||||
|
||||
1
packages/playwright/preset.ts
Normal file
1
packages/playwright/preset.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './src/utils/preset';
|
||||
@ -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": {
|
||||
@ -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",
|
||||
"input": "packages/playwright",
|
||||
"glob": "**/files/**/.gitkeep",
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/playwright",
|
||||
"glob": "**/*.json",
|
||||
"ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/playwright",
|
||||
"glob": "**/*.js",
|
||||
"ignore": ["**/jest.config.js"],
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/playwright",
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "./src"
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "./packages/playwright",
|
||||
"glob": "generators.json",
|
||||
"output": "."
|
||||
},
|
||||
{
|
||||
"input": "./packages/playwright",
|
||||
"glob": "executors.json",
|
||||
"output": "."
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -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';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
export {
|
||||
playwrightExecutor,
|
||||
PlaywrightExecutorSchema,
|
||||
} from './executors/playwright/playwright';
|
||||
export { initGenerator } from './generators/init/init';
|
||||
export { configurationGenerator } from './generators/configuration/configuration';
|
||||
export { nxE2EPreset, NxPlaywrightOptions } from './utils/preset';
|
||||
@ -5,6 +5,6 @@
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user