summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/postinstall.js8
-rw-r--r--scripts/prepare.js6
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/postinstall.js b/scripts/postinstall.js
new file mode 100644
index 000000000..84e7492ef
--- /dev/null
+++ b/scripts/postinstall.js
@@ -0,0 +1,8 @@
1const { exec } = require('child_process');
2
3// eslint-disable-next-line no-console
4const log = (err, stdout, stderr) => console.log(err || stdout || stderr);
5
6if (!process.env.BUNDLING) {
7 exec('npx lerna run build', log);
8}
diff --git a/scripts/prepare.js b/scripts/prepare.js
new file mode 100644
index 000000000..0b4daa82b
--- /dev/null
+++ b/scripts/prepare.js
@@ -0,0 +1,6 @@
1const isDev = process.env.NODE_ENV === 'development';
2
3if (isDev) {
4 // eslint-disable-next-line global-require
5 require('husky').install();
6}