Skip to content

Parallelized builds #3629

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

Merged
merged 5 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"description": "The Cloud Firestore component of the Firebase JS SDK.",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"scripts": {
"build": "rollup -c rollup.config.es2017.js && rollup -c rollup.config.es5.js && yarn build:lite && yarn build:exp",
"bundle": "rollup -c",
"build": "run-p 'bundle rollup.config.browser.js' 'bundle rollup.config.browser.memory.js' 'bundle rollup.config.node.js' 'bundle rollup.config.node.memory.js' 'bundle rollup.config.rn.js' 'bundle rollup.config.rn.memory.js' build:lite build:exp",
"build:scripts": "tsc -moduleResolution node --module commonjs scripts/*.ts && ls scripts/*.js | xargs -I % sh -c 'terser % -o %'",
"build:release": "rollup -c rollup.config.es2017.js && rollup -c rollup.config.es5.js",
"build:deps": "lerna run --scope @firebase/'{app,firestore}' --include-dependencies build",
Expand Down
45 changes: 45 additions & 0 deletions packages/firestore/rollup.config.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import pkg from './package.json';

const util = require('./rollup.shared');

export default [
{
input: 'index.ts',
output: {
file: pkg.esm2017,
format: 'es',
sourcemap: true
},
plugins: util.es2017Plugins('browser', /* mangled= */ true),
external: util.resolveBrowserExterns
},
{
input: pkg.esm2017,
output: { file: pkg.module, format: 'es', sourcemap: true },
plugins: util.es2017ToES5Plugins(/* mangled= */ true),
external: util.resolveBrowserExterns
},
{
input: pkg.esm2017,
output: { file: pkg.browser, format: 'cjs', sourcemap: true },
plugins: util.es2017ToES5Plugins(/* mangled= */ true),
external: util.resolveBrowserExterns
}
];
54 changes: 54 additions & 0 deletions packages/firestore/rollup.config.browser.memory.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import * as path from 'path';
import memoryPkg from './memory/package.json';

const util = require('./rollup.shared');

export default [
{
input: 'index.memory.ts',
output: {
file: path.resolve('./memory', memoryPkg['esm2017']),
format: 'es',
sourcemap: true
},
plugins: util.es2017Plugins('browser', /* mangled= */ true),
external: util.resolveBrowserExterns
},
{
input: path.resolve('./memory', memoryPkg['esm2017']),
output: {
file: path.resolve('./memory', memoryPkg.module),
format: 'es',
sourcemap: true
},
plugins: util.es2017ToES5Plugins(/* mangled= */ true),
external: util.resolveBrowserExterns
},
{
input: path.resolve('./memory', memoryPkg['esm2017']),
output: {
file: path.resolve('./memory', memoryPkg.browser),
format: 'cjs',
sourcemap: true
},
plugins: util.es2017ToES5Plugins(/* mangled= */ true),
external: util.resolveBrowserExterns
}
];
177 changes: 0 additions & 177 deletions packages/firestore/rollup.config.es2017.js

This file was deleted.

Loading