Remove postinstall
This commit is contained in:
parent
9d4a5b900c
commit
a859638b72
@ -3,8 +3,7 @@ FROM node:12-alpine
|
||||
WORKDIR /excalidraw-room
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY scripts ./scripts
|
||||
RUN SKIP_YARN_POSTINSTALL=true yarn
|
||||
RUN yarn
|
||||
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
|
@ -7,7 +7,6 @@
|
||||
"build": "tsc",
|
||||
"fix": "yarn prettier --write",
|
||||
"lint": "yarn prettier --list-different",
|
||||
"postinstall": "node scripts/postinstall.js",
|
||||
"prettier": "prettier \"**/*.{ts,md,json,yaml,yml}\"",
|
||||
"start": "node dist/index.js",
|
||||
"test": "yarn lint"
|
||||
@ -40,9 +39,6 @@
|
||||
"typescript": "3.9.5"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
"es6": true
|
||||
},
|
||||
"extends": [
|
||||
"prettier"
|
||||
],
|
||||
|
@ -1,16 +0,0 @@
|
||||
// This allows `postinstall` to be skipped via `SKIP_YARN_POSTINSTALL=true`.
|
||||
// This is useful when building a Docker image because it lets you
|
||||
// take advantage of cached Docker layers and run Yarn
|
||||
// only if `package.json` or `yarn.lock` changed,
|
||||
// and not every time source code is updated:
|
||||
// https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
|
||||
//
|
||||
// However, there doesn't appear to be a way to skip `postinstall`,
|
||||
// and doing `yarn --ignore-scripts` could prevent native packages from building:
|
||||
// https://github.com/yarnpkg/yarn/issues/4100
|
||||
|
||||
const { execSync } = require("child_process");
|
||||
|
||||
if (process.env.SKIP_YARN_POSTINSTALL !== "true") {
|
||||
execSync("yarnpkg build", { stdio: "inherit" });
|
||||
}
|
@ -12,6 +12,5 @@
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user