Skip to content

Commit

Permalink
Create index.js & index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Jan 18, 2024
1 parent b6ea7e9 commit 6013272
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 3 deletions.
47 changes: 47 additions & 0 deletions file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
diff --git a/package.json b/package.json
index d94b439..39caa6a 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,8 @@
"name": "@prestashop-core/ui-testing",
"version": "0.0.2",
"description": "",
- "files": ["/dist"],
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"// ESLint": "To run ESLint commands",
diff --git a/src/types/globals.d.ts b/src/types/globals.d.ts
index 1213872..6fe60c5 100644
--- a/src/types/globals.d.ts
+++ b/src/types/globals.d.ts
@@ -1,6 +1,6 @@
/* eslint-disable vars-on-top, no-var */

-type GlobalInstall = {
+ type GlobalInstall = {
URL: string
ENABLE_SSL: boolean
LANGUAGE: string
diff --git a/tsconfig.json b/tsconfig.json
index f4e7215..bc48ef9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -20,6 +20,7 @@
"esnext"
],
"baseUrl": "./",
+ "rootDir": "src",
"outDir": "./dist",
"paths": {
"@interfaces/*": [
@@ -47,7 +48,7 @@
],
},
"include": [
- "src/**/*"
+ "src/index.ts"
],
"exclude": [
"node_modules"
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "@prestashop-core/ui-testing",
"version": "0.0.2",
"description": "",
"files": ["/dist"],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"// ESLint": "To run ESLint commands",
Expand Down
15 changes: 15 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Export data
export type {PageWaitForSelectorOptionsState, WaitForNavigationWaitUntil} from '@data/types/playwright';

// Export interfaces
export type {DashboardPageInterface} from '@interfaces/BO/dashboard';
export type {LoginPageInterface} from '@interfaces/BO/login';

// Export Pages
export * as CommonPage from '@pages/commonPage';
export * as BOBasePage from '@pages/BO/BOBasePage';
export * as loginPage from '@pages/BO/login';
export * as dashboardPage from '@pages/BO/dashboard';

// Export utils
export * as testContext from '@utils/testContext';

Check failure on line 15 in src/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

Newline required at end of file but not found
2 changes: 1 addition & 1 deletion src/types/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable vars-on-top, no-var */

type GlobalInstall = {
type GlobalInstall = {
URL: string
ENABLE_SSL: boolean
LANGUAGE: string
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"esnext"
],
"baseUrl": "./",
"rootDir": "src",
"outDir": "./dist",
"paths": {
"@interfaces/*": [
Expand Down Expand Up @@ -47,7 +48,7 @@
],
},
"include": [
"src/**/*"
"src/index.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit 6013272

Please sign in to comment.