Skip to content

Commit

Permalink
chore: transpile everything for browsers (#7204)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Oct 18, 2018
1 parent 0ac3a0e commit 7d5de68
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 47 deletions.
2 changes: 1 addition & 1 deletion packages/jest-message-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"license": "MIT",
"main": "build/index.js",
"dependencies": {
"@babel/code-frame": "7.0.0-beta.44",
"@babel/code-frame": "^7.0.0",
"chalk": "^2.0.1",
"micromatch": "^2.3.11",
"slash": "^2.0.0",
Expand Down
44 changes: 19 additions & 25 deletions scripts/browserBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,26 @@ const rollupJson = require('rollup-plugin-json');
const rollupBabel = require('rollup-plugin-babel');
const rollupFlow = require('rollup-plugin-flow');

const babelEs5Options = Object.assign(
{},
{
babelrc: false,
exclude: 'node_modules/!(ansi-styles|chalk|ansi-regex|slash)/**',
plugins: [
'syntax-trailing-function-commas',
'transform-flow-strip-types',
'transform-es2015-destructuring',
'transform-es2015-parameters',
'transform-async-to-generator',
'transform-strict-mode',
'external-helpers',
'transform-runtime',
],
presets: [
[
'env',
{
modules: false,
},
],
const babelEs5Options = {
babelrc: false,
plugins: [
'transform-flow-strip-types',
'transform-strict-mode',
'external-helpers',
],
presets: [
[
'env',
{
// Required for Rollup
modules: false,
// Target ES5
targets: 'IE 11',
},
],
runtimeHelpers: true,
}
);
],
runtimeHelpers: true,
};

function browserBuild(pkgName, entryPath, destination) {
return rollup({
Expand Down
26 changes: 5 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
# yarn lockfile v1


"@babel/[email protected]":
version "7.0.0-beta.44"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9"
integrity sha512-cuAuTTIQ9RqcFRJ/Y8PvTh+paepNcaGxwQwjIDRWPXmzzyAeCO4KqS9ikMvq0MCbRk6GlYKwfzStrcP3/jSL8g==
dependencies:
"@babel/highlight" "7.0.0-beta.44"

"@babel/code-frame@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
Expand Down Expand Up @@ -259,15 +252,6 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.1.2"

"@babel/[email protected]":
version "7.0.0-beta.44"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5"
integrity sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==
dependencies:
chalk "^2.0.0"
esutils "^2.0.2"
js-tokens "^3.0.0"

"@babel/highlight@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
Expand Down Expand Up @@ -8059,16 +8043,16 @@ js-string-escape@^1.0.0:
resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef"
integrity sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8=

js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=

"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=

js-yaml@^3.12.0, js-yaml@^3.7.0, js-yaml@^3.8.1, js-yaml@^3.9.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
Expand Down

0 comments on commit 7d5de68

Please sign in to comment.