Skip to content

Commit

Permalink
Remove watch mode scripts (facebook#2361)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegreatercurve authored Jun 7, 2022
1 parent 8a05c4f commit 1bbb94c
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const license = ` * Copyright (c) Meta Platforms, Inc. and affiliates.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.`;

const isWatchMode = argv.watch;
const isProduction = argv.prod;
const isRelease = argv.release;
const isWWW = argv.www;
Expand Down Expand Up @@ -250,29 +249,8 @@ ${source}`;
freeze: false,
interop: false,
};
if (isWatchMode) {
const watcher = rollup.watch({
...inputOptions,
output: outputOptions,
});
watcher.on('event', async (event) => {
switch (event.code) {
case 'BUNDLE_START':
console.log(`Building ${name}...`);
break;
case 'BUNDLE_END':
console.log(`Built ${name}`);
break;
case 'ERROR':
case 'FATAL':
console.error(`Build failed for ${name}:\n\n${event.error}`);
break;
}
});
} else {
const result = await rollup.rollup(inputOptions);
await result.write(outputOptions);
}
const result = await rollup.rollup(inputOptions);
await result.write(outputOptions);
}

function getComment() {
Expand Down

0 comments on commit 1bbb94c

Please sign in to comment.