Skip to content

Commit

Permalink
chore: prep for npm pack
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkenos committed Dec 6, 2023
1 parent f1bb312 commit a18a751
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
*.*
!build/**/*
!src/**/*
!tsconfig**
!package-lock.json
!.babelrc
4 changes: 4 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"cwd": "${workspaceFolder}",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "test:demo"],
"outFiles": [
"${workspaceFolder}/**/*.ts",
"${workspaceFolder}/build/**/*.js"
],
"env": {
"HEADLESS": "false",
"PARALLEL": "${input:parallel}",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cucumberautocomplete.steps": ["./{demo,src}/**/*.def.ts"],
"cucumberautocomplete.steps": ["./{demo,src}/**/*.def.{js,ts}"],
"cucumberautocomplete.formatConfOverride": { "And": 3, "But": 3 },
"cucumberautocomplete.onTypeFormat": true,
"cucumberautocomplete.stepsInvariants": true,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- ga tracking???
- browser storage
- check locales support
- full UTs
- fix html reports
- test with npm pack
- full docs
Expand Down
54 changes: 54 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,60 @@
"keywords": [],
"author": "iamkenos <alexis.matunog@gmail.com>",
"license": "ISC",
"exports": {
"./commands/fixture": {
"import": "./build/commands/fixture.js",
"require": "./build/commands/fixture.js"
},
"./commands/types": {
"import": "./build/commands/types.js",
"require": "./build/commands/types.js"
},
"./common/utils/files": {
"import": "./build/common/utils/files.js",
"require": "./build/common/utils/files.js"
},
"./common/utils/string": {
"import": "./build/common/utils/string.js",
"require": "./build/common/utils/string.js"
},
"./common/utils/types": {
"import": "./build/common/utils/types.js",
"require": "./build/common/utils/types.js"
},
"./conditions/locator": {
"import": "./build/conditions/locator/locator-condition.js",
"require": "./build/conditions/locator/locator-condition.js"
},
"./conditions/page": {
"import": "./build/conditions/page/page-condition.js",
"require": "./build/conditions/page/page-condition.js"
},
"./conditions/types": {
"import": "./build/conditions/types.js",
"require": "./build/conditions/types.js"
},
"./config": {
"import": "./build/config/index.js",
"require": "./build/config/index.js"
},
"./config/types": {
"import": "./build/config/types.js",
"require": "./build/config/types.js"
},
"./core": {
"import": "./build/core/index.js",
"require": "./build/core/index.js"
},
"./core/gherkin": {
"import": "./build/core/gherkin/enums.js",
"require": "./build/core/gherkin/enums.js"
},
"./core/utils/xpath": {
"import": "./build/core/utils/xpath-builder.js",
"require": "./build/core/utils/xpath-builder.js"
}
},
"dependencies": {
"@babel/preset-env": "^7.23.5",
"@babel/register": "^7.22.15",
Expand Down
2 changes: 1 addition & 1 deletion src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function configure(overrides) {
format: [ "summary", `html:${resultsDir}report.html`, `json:${resultsDir}report.json`, ...overrides?.format || [] ],
formatOptions: { snippetInterface: "async-await", printAttachments: false },
parallel: debug ? 0 : +process.env.PARALLEL || overrides?.parallel || 0,
paths: [process.env.PATHS].filter(Boolean) || (overrides?.paths || ["features/"]).map(i => path.join(baseDir, i)),
paths: process.env.PATHS ? [process.env.PATHS].filter(Boolean) : (overrides?.paths || ["features/"]).map(i => path.join(baseDir, i)),
require: [ path.join(__dirname, "../core/gherkin/*.def.js")].concat((overrides?.require || ["fixtures/pages/**/*.def.ts"]).map(i => path.join(baseDir, i))),
requireModule: ["@babel/register", "ts-node/register/transpile-only", "tsconfig-paths/register"],
strict: false,
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"forceConsistentCasingInFileNames": true,
"removeComments": false,
"skipLibCheck": true,
"sourceMap": true,
"target": "ESNext"
},
"include": ["./**/**.ts"],
Expand Down

0 comments on commit a18a751

Please sign in to comment.