diff --git a/Dockerfile b/Dockerfile index 2002154..06c09cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/package.json b/package.json index 12292e4..a6195e2 100644 --- a/package.json +++ b/package.json @@ -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" ], diff --git a/scripts/postinstall.js b/scripts/postinstall.js deleted file mode 100644 index 0ca5207..0000000 --- a/scripts/postinstall.js +++ /dev/null @@ -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" }); -} diff --git a/tsconfig.json b/tsconfig.json index 54b76ae..a239fb1 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,6 +12,5 @@ "resolveJsonModule": true, "isolatedModules": true, "outDir": "dist" - }, - "include": ["src/**/*"] + } }