Skip to content

Commit

Permalink
Add unminified builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferbaxter committed Oct 12, 2018
1 parent 184e425 commit fa4d365
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 3 deletions.
62 changes: 61 additions & 1 deletion config/rollup.main-thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ const ESModules = [
MINIFY_BUNDLE_VALUE ? compiler() : null,
].filter(Boolean)
},
{
input: 'output/main-thread/index.js',
output: {
file: 'dist/unminified.index.mjs',
format: 'es',
sourcemap: true,
},
plugins: [
babelPlugin({
transpileToES5: false,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
{
input: 'output/main-thread/index.safe.js',
output: {
Expand All @@ -50,7 +64,22 @@ const ESModules = [
}),
MINIFY_BUNDLE_VALUE ? compiler() : null,
].filter(Boolean)
}
},
{
input: 'output/main-thread/index.safe.js',
output: {
file: 'dist/unminified.index.safe.mjs',
format: 'es',
sourcemap: true,
},
plugins: [
resolve(),
babelPlugin({
transpileToES5: false,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
];

const IIFEModules = [
Expand All @@ -70,6 +99,21 @@ const IIFEModules = [
MINIFY_BUNDLE_VALUE ? compiler() : null,
].filter(Boolean)
},
{
input: 'output/main-thread/index.js',
output: {
file: 'dist/unminified.index.js',
format: 'iife',
name: 'MainThread',
sourcemap: true,
},
plugins: [
babelPlugin({
transpileToES5: true,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
{
input: 'output/main-thread/index.safe.js',
output: {
Expand All @@ -86,6 +130,22 @@ const IIFEModules = [
}),
MINIFY_BUNDLE_VALUE ? compiler() : null,
].filter(Boolean)
},
{
input: 'output/main-thread/index.safe.js',
output: {
file: 'dist/unminified.index.safe.js',
format: 'iife',
name: 'MainThread',
sourcemap: true,
},
plugins: [
resolve(),
babelPlugin({
transpileToES5: true,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
}
];

Expand Down
66 changes: 65 additions & 1 deletion config/rollup.worker-thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ const ESModules = [
}) : null,
].filter(Boolean)
},
{
input: 'output/worker-thread/index.js',
output: {
file: 'dist/unminified.worker.mjs',
format: 'iife',
name: 'WorkerThread',
sourcemap: true,
},
plugins: [
removeTestingDocument(),
babelPlugin({
transpileToES5: false,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
{
input: 'output/worker-thread/index.safe.js',
output: {
Expand All @@ -60,6 +76,22 @@ const ESModules = [
}) : null,
].filter(Boolean)
},
{
input: 'output/worker-thread/index.safe.js',
output: {
file: 'dist/unminified.worker.safe.mjs',
format: 'iife',
name: 'WorkerThread',
sourcemap: true,
},
plugins: [
removeTestingDocument(),
babelPlugin({
transpileToES5: false,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
];

const IIFEModules = [
Expand All @@ -82,6 +114,22 @@ const IIFEModules = [
}) : null,
].filter(Boolean)
},
{
input: 'output/worker-thread/index.js',
output: {
file: 'dist/unminified.worker.js',
format: 'iife',
name: 'WorkerThread',
sourcemap: true,
},
plugins: [
removeTestingDocument(),
babelPlugin({
transpileToES5: true,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
{
input: 'output/worker-thread/index.safe.js',
output: {
Expand All @@ -100,7 +148,23 @@ const IIFEModules = [
env: 'CUSTOM'
}) : null,
].filter(Boolean)
}
},
{
input: 'output/worker-thread/index.safe.js',
output: {
file: 'dist/unminified.worker.safe.js',
format: 'iife',
name: 'WorkerThread',
sourcemap: true,
},
plugins: [
removeTestingDocument(),
babelPlugin({
transpileToES5: true,
allowConsole: DEBUG_BUNDLE_VALUE,
}),
].filter(Boolean)
},
];

const debugModules = DEBUG_BUNDLE_VALUE ? [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ampproject/worker-dom",
"version": "0.1.2",
"version": "0.1.3",
"description": "A facsimile of a modern DOM implementation intended to run in a Web Worker.",
"main": "dist/index",
"module": "dist/index.mjs",
Expand Down

0 comments on commit fa4d365

Please sign in to comment.