Skip to content

Commit

Permalink
build(docker): stop the build step from knowing about code formatting
Browse files Browse the repository at this point in the history
Prettier is run on generated code, which means the build step has to be aware of the Prettier configuration. This tells Prettier to ignore the file since there's no need to format it.

Refs #390
  • Loading branch information
thewilkybarkid committed Aug 16, 2021
1 parent 0817485 commit 1884707
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
dist
node_modules
coverage
build
build
/src/frontend/hooks/api-hooks.tsx
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ RUN \

COPY \
.parcelrc \
.prettierignore \
.prettierrc \
.sassrc \
.terserrc \
tsconfig.json \
Expand All @@ -51,6 +49,8 @@ ENV NODE_ENV=development

COPY \
.gitignore \
.prettierignore \
.prettierrc \
.proxyrc \
docker-entrypoint.sh \
./
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
"build:scripts": "rimraf dist/scripts && npm run build:scripts:migrations && npm run build:scripts:init",
"build:hooks:spec": "node dist/scripts/genSpec.js",
"build:hooks:import": "restful-react import --file ./dist/openapi.json --output ./src/frontend/hooks/api-hooks.tsx",
"build:hooks:prettify": "prettier ./src/frontend/hooks/api-hooks.tsx --write",
"build:hooks": "npm run build:scripts:spec && npm run build:hooks:spec && npm run build:hooks:import && rimraf dist/openapi.json && npm run build:hooks:prettify",
"build:hooks": "npm run build:scripts:spec && npm run build:hooks:spec && npm run build:hooks:import && rimraf dist/openapi.json",
"build:templates": "copyfiles -u 2 src/backend/templates/email/**/*.hbs dist/backend",
"db": "mikro-orm",
"db:migrations": "node dist/scripts/dbMigrations.js",
Expand Down

0 comments on commit 1884707

Please sign in to comment.