Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Create vendor dir and exclude it from coverage #55

Merged
merged 6 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
coverage
.DS_Store
4 changes: 1 addition & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Comment on lines +4 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely a feat!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though fix is ok for 2 reasons

  • feat was the previous PR here: feat: added twitter pixel & lotame #41 and this is a fix for that
  • had to conclude to 1 prefix and fix sounded Ok for the 2 things and didn't want to raise 2 separate PRs. at the end the new release is made

2 changes: 1 addition & 1 deletion src/third-party-tags/lotame.ts
Original file line number Diff line number Diff line change
@@ -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<string>;
Expand Down
2 changes: 1 addition & 1 deletion src/third-party-tags/twitter-uwt.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { twitterScript } from './external-scripts/twitter-script';
import { twitterScript } from '../../vendor/twitter-script';
import { twitter } from './twitter-uwt';

describe('twitter', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/third-party-tags/twitter-uwt.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"declaration": true,
"noEmit": false,
"outDir": "dist",
"rootDir": "src"
"rootDirs": [
"../../vendor",
"src",
]
},
"extends": "./tsconfig.json",
"include": ["src"],
sndrs marked this conversation as resolved.
Show resolved Hide resolved
Expand Down