Skip to content

Commit

Permalink
Merge pull request #23 from voxmedia/jd-ie-fix
Browse files Browse the repository at this point in the history
Update Babel for IE11
  • Loading branch information
jeninedrew authored Jun 11, 2019
2 parents f8ff58b + 2f07014 commit ecdbd02
Show file tree
Hide file tree
Showing 11 changed files with 4,027 additions and 20 deletions.
22 changes: 7 additions & 15 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 2 versions",
"> 1%",
"IE 11",
"not IE 10"
]
}
}
]
],
"env": {
"test": {
"presets": [
"@babel/preset-env"
]
}
},
"plugins": [
[
"@babel/plugin-transform-runtime",
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## v1.3.0 (April 1st, 2019)
## v1.3.1 (April 16, 2019)

- Update Babel configs for IE11 and Jest

## v1.3.0 (April 1, 2019)

- Open Sourced

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,14 @@ player.src([{ type: bestVastVideo.mimeType(), src: bestVastVideo.url() }]);

- Make a branch
- Add failing tests
- Write code to statisy test
- Write code to satisfy test
- Make a Pull Request

## Versioning and Publishing

1. Update version number in `package.json` using semantic versioning conventions.
2. Update CHANGELOG.md to describe the changes.

### Important details:

- es6
Expand Down
3,782 changes: 3,782 additions & 0 deletions dist/concert-vast.js

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions dist/test/video-js-preroll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<html>
<head>
<link href="https://vjs.zencdn.net/7.4.1/video-js.css" rel="stylesheet" />
<title>Test for ConcertVast on Video JS</title>
<script type="text/javascript" src="../concert-vast.js"></script>
</head>
<body>
<video controls class="video-js">
<source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" />
<source src="http://clips.vorwaerts-gmbh.de/VfE.webm" type="video/webm" />
</video>
</body>
<script src="https://vjs.zencdn.net/7.4.1/video.js"></script>
<script>
var vjs = videojs(document.querySelector('video'), {
controls: true,
autoplay: true,
preload: 'auto',
});
var v = new ConcertVast();
var url =
'https://ad.doubleclick.net/ddm/pfadx/N3493.3018656VOX-CONCERT/B22204404.238409492;sz=0x0;ord=%5Btimestamp%5D;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dcmt=text/xml;dc_vast=3';
v.loadRemoteVast(url).then(e => {
v.applyToVideoJsAsPreroll(vjs, {
autoplay: true,
});
});
</script>
</html>
35 changes: 35 additions & 0 deletions dist/test/video-js-primary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<html>
<head>
<link href="https://vjs.zencdn.net/7.4.1/video-js.css" rel="stylesheet" />
<title>Test for ConcertVast on Video JS</title>
<style>
video {
width: 100%;
}
</style>
<script type="text/javascript" src="../concert-vast.js"></script>
</head>
<body>
<video controls class="video-js">
<source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" />
<source src="http://clips.vorwaerts-gmbh.de/VfE.webm" type="video/webm" />
</video>
</body>
<script src="https://vjs.zencdn.net/7.4.1/video.js"></script>
<script>
var vjs = videojs(document.querySelector('video'), {
controls: true,
autoplay: true,
preload: 'auto',
});
var v = new ConcertVast();
var url =
'https://ad.doubleclick.net/ddm/pfadx/N3493.3018656VOX-CONCERT/B22204404.238409492;sz=0x0;ord=%5Btimestamp%5D;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dcmt=text/xml;dc_vast=3';
v.loadRemoteVast(url).then(e => {
v.applyToVideoJs(vjs, {
autoplay: true,
muted: true,
});
});
</script>
</html>
28 changes: 28 additions & 0 deletions dist/test/video-preroll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<html>
<head>
<title>Test for ConcertVast</title>
<style>
video {
width: 100%;
}
</style>
<script type="text/javascript" src="../concert-vast.js"></script>
</head>
<body>
<video controls>
<source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" />
<source src="http://clips.vorwaerts-gmbh.de/VfE.webm" type="video/webm" />
</video>
</body>
<script>
var videoElement = document.querySelector('video');
var v = new ConcertVast();
var url =
'https://ad.doubleclick.net/ddm/pfadx/N3493.3018656VOX-CONCERT/B22204404.238409492;sz=0x0;ord=%5Btimestamp%5D;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dcmt=text/xml;dc_vast=3';
v.loadRemoteVast(url).then(e => {
v.applyToVideoElementAsPreroll(videoElement, {
autoplay: true,
});
});
</script>
</html>
28 changes: 28 additions & 0 deletions dist/test/video-primary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<html>
<head>
<title>Test for ConcertVast</title>
<style>
video {
width: 100%;
}
</style>
<script type="text/javascript" src="../concert-vast.js"></script>
</head>
<body>
<video controls>
<source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" />
<source src="http://clips.vorwaerts-gmbh.de/VfE.webm" type="video/webm" />
</video>
</body>
<script>
var videoElement = document.querySelector('video');
var v = new ConcertVast();
var url =
'https://ad.doubleclick.net/ddm/pfadx/N3493.3018656VOX-CONCERT/B22204404.238409492;sz=0x0;ord=%5Btimestamp%5D;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dcmt=text/xml;dc_vast=3';
v.loadRemoteVast(url).then(e => {
v.applyToVideoElement(videoElement, {
autoplay: true,
});
});
</script>
</html>
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "concert-vast",
"version": "1.3.0",
"version": "1.3.1",
"description": "Simple Vast Parsing for Concert Video Ads",
"main": "src/index.js",
"main": "dist/concert-vast.js",
"author": "Vox Media",
"license": "Apache-2.0",
"private": false,
Expand All @@ -14,6 +14,7 @@
"dev": "webpack-dev-server"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.2.0",
"@babel/preset-env": "^7.3.1",
"@babel/runtime-corejs2": "^7.3.1",
Expand Down
20 changes: 19 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,25 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
use: [
{
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
targets: {
browsers: ['defaults', 'not ie 10'],
},
modules: false,
useBuiltIns: 'usage',
},
],
],
},
},
],
},
],
},
Expand Down
85 changes: 85 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@
dependencies:
"@babel/highlight" "^7.0.0"

"@babel/core@^7.0.0":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.5.tgz#081f97e8ffca65a9b4b0fdc7e274e703f000c06a"
integrity sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.4.4"
"@babel/helpers" "^7.4.4"
"@babel/parser" "^7.4.5"
"@babel/template" "^7.4.4"
"@babel/traverse" "^7.4.5"
"@babel/types" "^7.4.4"
convert-source-map "^1.1.0"
debug "^4.1.0"
json5 "^2.1.0"
lodash "^4.17.11"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"

"@babel/core@^7.1.0":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687"
Expand Down Expand Up @@ -40,6 +60,17 @@
source-map "^0.5.0"
trim-right "^1.0.1"

"@babel/generator@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.4.4.tgz#174a215eb843fc392c7edcaabeaa873de6e8f041"
integrity sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==
dependencies:
"@babel/types" "^7.4.4"
jsesc "^2.5.1"
lodash "^4.17.11"
source-map "^0.5.0"
trim-right "^1.0.1"

"@babel/helper-annotate-as-pure@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
Expand Down Expand Up @@ -185,6 +216,13 @@
dependencies:
"@babel/types" "^7.0.0"

"@babel/helper-split-export-declaration@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677"
integrity sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==
dependencies:
"@babel/types" "^7.4.4"

"@babel/helper-wrap-function@^7.1.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa"
Expand All @@ -204,6 +242,15 @@
"@babel/traverse" "^7.1.5"
"@babel/types" "^7.3.0"

"@babel/helpers@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.4.tgz#868b0ef59c1dd4e78744562d5ce1b59c89f2f2a5"
integrity sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==
dependencies:
"@babel/template" "^7.4.4"
"@babel/traverse" "^7.4.4"
"@babel/types" "^7.4.4"

"@babel/highlight@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
Expand All @@ -218,6 +265,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.3.2.tgz#95cdeddfc3992a6ca2a1315191c1679ca32c55cd"
integrity sha512-QzNUC2RO1gadg+fs21fi0Uu0OuGNzRKEmgCxoLNzbCdoprLwjfmZwzUrpUNfJPaVRwBpDY47A17yYEGWyRelnQ==

"@babel/parser@^7.4.4", "@babel/parser@^7.4.5":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.4.5.tgz#04af8d5d5a2b044a2a1bffacc1e5e6673544e872"
integrity sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==

"@babel/plugin-proposal-async-generator-functions@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e"
Expand Down Expand Up @@ -586,6 +638,15 @@
"@babel/parser" "^7.2.2"
"@babel/types" "^7.2.2"

"@babel/template@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237"
integrity sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.4.4"
"@babel/types" "^7.4.4"

"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3":
version "7.2.3"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8"
Expand All @@ -601,6 +662,21 @@
globals "^11.1.0"
lodash "^4.17.10"

"@babel/traverse@^7.4.4", "@babel/traverse@^7.4.5":
version "7.4.5"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.4.5.tgz#4e92d1728fd2f1897dafdd321efbff92156c3216"
integrity sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/generator" "^7.4.4"
"@babel/helper-function-name" "^7.1.0"
"@babel/helper-split-export-declaration" "^7.4.4"
"@babel/parser" "^7.4.5"
"@babel/types" "^7.4.4"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.11"

"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2", "@babel/types@^7.3.0", "@babel/types@^7.3.2":
version "7.3.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.3.2.tgz#424f5be4be633fff33fb83ab8d67e4a8290f5a2f"
Expand All @@ -610,6 +686,15 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"

"@babel/types@^7.4.4":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0"
integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==
dependencies:
esutils "^2.0.2"
lodash "^4.17.11"
to-fast-properties "^2.0.0"

"@cypress/[email protected]":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@cypress/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#a77492f4b11dcc7c446a34b3e28721afd33c642a"
Expand Down

0 comments on commit ecdbd02

Please sign in to comment.