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

Upgrade rollup to v0.50.0 #1034

Merged
merged 1 commit into from
Sep 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@
"react-dom": "^15.5.4",
"react-test-renderer": "^15.5.4",
"rimraf": "^2.4.2",
"rollup": "^0.41.4",
"rollup-plugin-babel": "^2.3.9",
"rollup-plugin-commonjs": "^7.0.0",
"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.1",
"rollup-plugin-memory": "^2.0.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^1.1.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.0",
"serialize-javascript": "^1.1.1",
"superagent": "^3.0.0",
Expand Down
14 changes: 8 additions & 6 deletions rollup.config.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ const reactCheck = `if (typeof React === 'undefined') {
`;

export default {
entry: p.resolve('src/react-intl.js'),
dest: p.resolve(`dist/react-intl.${isProduction ? 'min.js' : 'js'}`),
format: 'umd',
moduleName: 'ReactIntl',
input: p.resolve('src/react-intl.js'),
output: {
file: p.resolve(`dist/react-intl.${isProduction ? 'min.js' : 'js'}`),
format: 'umd',
},
name: 'ReactIntl',
banner: copyright,
intro: reactCheck,
sourceMap: true,
sourcemap: true,
globals: {
react: 'React',
'prop-types': 'PropTypes',
Expand All @@ -38,7 +40,7 @@ export default {
jsnext: true,
}),
commonjs({
sourceMap: true,
sourcemap: true,
}),
replace({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
Expand Down
8 changes: 4 additions & 4 deletions rollup.config.lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const copyright = `/*
`;

export default {
entry: p.resolve('src/index.js'),
targets: [
{dest: 'lib/index.js', format: 'cjs'},
{dest: 'lib/index.es.js', format: 'es'},
input: p.resolve('src/index.js'),
output: [
{file: 'lib/index.js', format: 'cjs'},
{file: 'lib/index.es.js', format: 'es'},
],
banner: copyright,
external: [
Expand Down
17 changes: 10 additions & 7 deletions scripts/build-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ function writeUMDFile(filename, module) {
const lang = p.basename(filename, '.js');

return rollup({
entry: {
path: filename,
contents: module,
},
plugins: [memory(), uglify()],
input: filename,
plugins: [
memory({
path: filename,
contents: module,
}),
uglify(),
],
})
.then(bundle => {
return bundle.write({
dest: filename,
file: filename,
format: 'umd',
moduleName: `ReactIntlLocaleData.${lang}`,
name: `ReactIntlLocaleData.${lang}`,
});
})
.then(() => filename);
Expand Down