From 6bad71c58872d9cacb160d1a5fdef313a1a5a331 Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Thu, 21 Nov 2019 16:32:55 -0800 Subject: [PATCH] fixup install --- .npmignore | 3 +++ install.js | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.npmignore b/.npmignore index 71a68fec8e..39b253454b 100644 --- a/.npmignore +++ b/.npmignore @@ -42,3 +42,6 @@ tsconfig.json # exclude types, see https://github.com/GoogleChrome/puppeteer/issues/3878 /index.d.ts + +# install.js only does stuff for development +/install.js \ No newline at end of file diff --git a/install.js b/install.js index 21e230ed0b..12ec4b26d9 100644 --- a/install.js +++ b/install.js @@ -1,5 +1,6 @@ /** * Copyright 2017 Google Inc. All rights reserved. + * Modifications copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +15,14 @@ * limitations under the License. */ -if (require('fs').existsSync(require('path').join(__dirname, 'src'))) { - try { - require('child_process').execSync('npm run build', { - stdio: 'ignore' - }); - } catch (e) { - } + // This file is only run when someone clones the github repo for development + +try { + require('child_process').execSync('npm run build', { + stdio: 'ignore' + }); +} catch (e) { + console.warn('Build failed'); } (async function() {