Skip to content

Commit

Permalink
wip: intl stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
scurker committed Sep 3, 2019
1 parent de678a1 commit 82998fb
Show file tree
Hide file tree
Showing 16 changed files with 887 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Expand Up @@ -9,7 +9,7 @@
}]
],
"plugins": [
"./config/rename-internal"

],
"env": {
"test": {
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
@@ -1,3 +1,4 @@
dist/
intl/
coverage/
*.flow.js
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@ node_modules/
bower_components/
reports/
dist/
intl/
coverage/
docs/build/*
.nyc_output
Expand Down
6 changes: 6 additions & 0 deletions bundlesize.config.json
@@ -0,0 +1,6 @@
{
"files": [
{ "path": "./dist/currency.min.js" },
{ "path": "./intl/currency.min.js" }
]
}
6 changes: 6 additions & 0 deletions config/bundlesize.json
@@ -0,0 +1,6 @@
{
"files": [
{ "path": "./dist/currency.min.js" },
{ "path": "./intl/currency.min.js" }
]
}
58 changes: 38 additions & 20 deletions config/rollup.config.js
Expand Up @@ -2,23 +2,41 @@ import pkg from '../package.json';
import babel from 'rollup-plugin-babel';
import banner from './banner';

export default {
input: 'src/currency.js',
plugins: [
babel({
exclude: 'node_modules/**'
})
],
output: [
{
format: 'es',
file: pkg.module,
banner
},
{
format: 'cjs',
file: pkg.main,
banner
}
]
};
const plugins = [
babel({
exclude: 'node_modules/**'
})
];

export default [
{
input: 'src/currency.js',
plugins,
output: [
{
format: 'es',
file: pkg.module,
banner
},
{
format: 'cjs',
file: pkg.main,
banner
}
]
},
{
input: 'src/currency.intl.js',
plugins,
output: [
{
format: 'es',
file: 'intl/currency.es.js'
},
{
format: 'cjs',
file: 'intl/currency.js'
}
]
}
];
104 changes: 68 additions & 36 deletions config/rollup.umd.js
Expand Up @@ -5,39 +5,71 @@ import closure from './closure';

const input = 'src/currency.js';

export default [{
input,
plugins: [
babel({
exclude: 'node_modules/**'
})
],
output: [
{
format: 'umd',
file: 'dist/currency.umd.js',
name: 'currency',
banner
}
]
},
{
input,
plugins: [
babel({
exclude: 'node_modules/**'
}),
closure({
compilationLevel: 'SIMPLE',
rewritePolyfills: false
})
],
output: [
{
format: 'umd',
file: pkg.browser,
name: 'currency',
banner
}
]
}];
const plugins = [
babel({
exclude: 'node_modules/**'
})
];

export default [
{
input,
plugins,
output: [
{
format: 'umd',
file: 'dist/currency.umd.js',
name: 'currency',
banner
}
]
},
{
input: 'src/currency.intl.js',
plugins,
output: [
{
format: 'umd',
file: 'intl/currency.umd.js',
name: 'currency',
banner
}
]
},
{
input,
plugins: [
...plugins,
closure({
compilationLevel: 'SIMPLE',
rewritePolyfills: false
})
],
output: [
{
format: 'umd',
file: pkg.browser,
name: 'currency',
banner
}
]
},
{
input: 'src/currency.intl.js',
plugins: [
...plugins,
closure({
compilationLevel: 'SIMPLE',
rewritePolyfills: false
})
],
output: [
{
format: 'umd',
file: 'intl/currency.min.js',
name: 'currency',
banner
}
]
}
];

0 comments on commit 82998fb

Please sign in to comment.