fixup install

This commit is contained in:
Joel Einbinder 2019-11-21 16:32:55 -08:00
parent a5fa417d04
commit 6bad71c588
2 changed files with 12 additions and 7 deletions

View file

@ -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

View file

@ -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() {