diff --git a/.gitignore b/.gitignore index 0e75fe557..6761199fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist coverage +.DS_Store diff --git a/jest.config.js b/jest.config.js index e950ec5e1..792bd45cb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -27,9 +27,7 @@ module.exports = { // coverageDirectory: undefined, // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], + coveragePathIgnorePatterns: ['vendor'], // Indicates which provider should be used to instrument code for coverage // coverageProvider: "babel", diff --git a/src/index.ts b/src/index.ts index 7adcfebd9..c11ffec0d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,5 @@ export { ias } from './third-party-tags/ias'; export { permutive } from './third-party-tags/permutive'; export { fbPixel } from './third-party-tags/facebook-pixel'; +export { twitter } from './third-party-tags/twitter-uwt'; +export { lotame } from './third-party-tags/lotame'; diff --git a/src/third-party-tags/lotame.ts b/src/third-party-tags/lotame.ts index 5dc5d65fb..461f9e131 100644 --- a/src/third-party-tags/lotame.ts +++ b/src/third-party-tags/lotame.ts @@ -1,5 +1,5 @@ +import { lotameScript } from '../../vendor/lotame-script'; import { GetThirdPartyTag } from '../types'; -import { lotameScript } from './external-scripts/lotame-script'; export type LotameData = { ozoneLotameData: Array; diff --git a/src/third-party-tags/twitter-uwt.spec.ts b/src/third-party-tags/twitter-uwt.spec.ts index 5d799ff11..0be286ea5 100644 --- a/src/third-party-tags/twitter-uwt.spec.ts +++ b/src/third-party-tags/twitter-uwt.spec.ts @@ -1,4 +1,4 @@ -import { twitterScript } from './external-scripts/twitter-script'; +import { twitterScript } from '../../vendor/twitter-script'; import { twitter } from './twitter-uwt'; describe('twitter', () => { diff --git a/src/third-party-tags/twitter-uwt.ts b/src/third-party-tags/twitter-uwt.ts index 84653866e..ee0a27319 100644 --- a/src/third-party-tags/twitter-uwt.ts +++ b/src/third-party-tags/twitter-uwt.ts @@ -1,5 +1,5 @@ +import { twitterScript as insertSnippet } from '../../vendor/twitter-script'; import { GetThirdPartyTag } from '../types'; -import { twitterScript as insertSnippet } from './external-scripts/twitter-script'; export const twitter: GetThirdPartyTag = ({ shouldRun }) => ({ shouldRun, diff --git a/tsconfig.build.json b/tsconfig.build.json index 9a17522b7..2951d8f3f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -3,7 +3,10 @@ "declaration": true, "noEmit": false, "outDir": "dist", - "rootDir": "src" + "rootDirs": [ + "../../vendor", + "src", + ] }, "extends": "./tsconfig.json", "include": ["src"], diff --git a/src/third-party-tags/external-scripts/lotame-script.ts b/vendor/lotame-script.ts similarity index 100% rename from src/third-party-tags/external-scripts/lotame-script.ts rename to vendor/lotame-script.ts diff --git a/src/third-party-tags/external-scripts/twitter-script.ts b/vendor/twitter-script.ts similarity index 100% rename from src/third-party-tags/external-scripts/twitter-script.ts rename to vendor/twitter-script.ts