From 4d174d23ae5386822a9335f537fe56774ec54e39 Mon Sep 17 00:00:00 2001 From: Mark Skelton Date: Mon, 21 Mar 2022 10:35:25 -0500 Subject: [PATCH] Fix package outputs --- .changeset/shiny-toes-search.md | 5 +++++ .changeset/tiny-boats-type.md | 5 +++++ .npmignore | 2 -- package.json | 3 ++- src/index.ts | 2 +- src/template.ejs => template.ejs | 0 tsconfig.build.json | 2 ++ 7 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 .changeset/shiny-toes-search.md create mode 100644 .changeset/tiny-boats-type.md delete mode 100644 .npmignore rename src/template.ejs => template.ejs (100%) diff --git a/.changeset/shiny-toes-search.md b/.changeset/shiny-toes-search.md new file mode 100644 index 0000000..1d5dd0b --- /dev/null +++ b/.changeset/shiny-toes-search.md @@ -0,0 +1,5 @@ +--- +'axe-reporter-html': patch +--- + +Add missing type declarations. diff --git a/.changeset/tiny-boats-type.md b/.changeset/tiny-boats-type.md new file mode 100644 index 0000000..b64352f --- /dev/null +++ b/.changeset/tiny-boats-type.md @@ -0,0 +1,5 @@ +--- +'axe-reporter-html': patch +--- + +Add missing template to output directory. diff --git a/.npmignore b/.npmignore deleted file mode 100644 index d26b256..0000000 --- a/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -lib/config/ -test/ diff --git a/package.json b/package.json index a4e1105..ac4ed34 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "types": "lib/index.d.ts", "files": [ "src", - "lib" + "lib", + "template.ejs" ], "scripts": { "lint": "eslint .", diff --git a/src/index.ts b/src/index.ts index 2e7e7bb..f3b3f99 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,7 +25,7 @@ function prepareResults({ inapplicable, passes, violations }: AxeResults) { } export default async function createHTMLReport(results: AxeResults) { - const templatePath = path.join(__dirname, './template.ejs') + const templatePath = path.join(__dirname, '../template.ejs') const template = await fs.readFile(templatePath, 'utf8') return ejs.render(template, prepareResults(results)) diff --git a/src/template.ejs b/template.ejs similarity index 100% rename from src/template.ejs rename to template.ejs diff --git a/tsconfig.build.json b/tsconfig.build.json index bc66a25..4e20b45 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,6 +1,8 @@ { "extends": "./tsconfig.json", "compilerOptions": { + "declaration": true, + "declarationMap": true, "noEmit": false }, "include": ["src"]