|
@@ -1,16 +0,0 @@
|
1
|
|
-// This allows `postinstall` to be skipped via `SKIP_YARN_POSTINSTALL=true`.
|
2
|
|
-// This is useful when building a Docker image because it lets you
|
3
|
|
-// take advantage of cached Docker layers and run Yarn
|
4
|
|
-// only if `package.json` or `yarn.lock` changed,
|
5
|
|
-// and not every time source code is updated:
|
6
|
|
-// https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
|
7
|
|
-//
|
8
|
|
-// However, there doesn't appear to be a way to skip `postinstall`,
|
9
|
|
-// and doing `yarn --ignore-scripts` could prevent native packages from building:
|
10
|
|
-// https://github.com/yarnpkg/yarn/issues/4100
|
11
|
|
-
|
12
|
|
-const { execSync } = require("child_process");
|
13
|
|
-
|
14
|
|
-if (process.env.SKIP_YARN_POSTINSTALL !== "true") {
|
15
|
|
- execSync("yarnpkg build", { stdio: "inherit" });
|
16
|
|
-}
|