-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed yarn: updated START.md, Dockerfile, dev-branch-pr-build-and-t…
…est-pipeline.yaml, lint-staged.config.js
- Loading branch information
1 parent
1b65abb
commit 42ced90
Showing
7 changed files
with
35 additions
and
5,324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
FROM node:alpine | ||
ENV NEXT_PUBLIC_API_HOST_REMOTE=https://dev.api.it-sl.ru/api/v1 | ||
ENV NODE_ENV production | ||
ENV NEXT_PUBLIC_API_HOST_REMOTE=https://iced-latte.uk/backend/api/v1 | ||
WORKDIR /usr/app | ||
COPY ./package*.json ./ | ||
RUN chown -R node /usr/app | ||
COPY --chown=node ./package*.json ./ | ||
RUN npm install --global pm2 | ||
USER node | ||
RUN npm install --development | ||
COPY ./ ./ | ||
RUN npm ci --only=production | ||
COPY --chown=node ./ ./ | ||
RUN npm run build | ||
EXPOSE 3000 | ||
CMD [ "pm2-runtime", "start", "npm", "--", "run", "dev" ] | ||
CMD [ "pm2-runtime", "start", "npm", "--", "run", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,30 @@ | ||
## Quick start | ||
# Getting Started | ||
|
||
- navigate to the root of the project | ||
- `yarn install` | ||
- `yarn husky install` - setup precommit eslint typescript checks | ||
- `yarn dev` - runs project on `localhost:3000` (if on the main page u do not see list of products due to CORS error, run dev server with `yarn next dev --hostname 127.0.0.1`) | ||
## Requirements | ||
|
||
- `npm 10.2.4` | ||
- `node 20.11.0 LTS` | ||
|
||
## Basic Steps | ||
|
||
- `npm install` - install dependencies into the node_modules/ directory | ||
- `npx husky install` - setup precommit eslint typescript checks | ||
- `echo 'NEXT_PUBLIC_API_HOST_REMOTE=https://iced-latte.uk/backend/api/v1' > .env` - create `.env` | ||
- `npm run build` | ||
- `npm run dev` - runs project on `localhost:3000` (if on the main page u do not see list of products due to CORS error, run dev server with `yarn next dev --hostname 127.0.0.1`) | ||
|
||
## Run Tests | ||
|
||
```bash | ||
yarn test | ||
npm run test | ||
``` | ||
|
||
## Fix Linter Issues | ||
|
||
```bash | ||
npm run lint -- --fix | ||
``` | ||
``` | ||
|
||
## Misc | ||
|
||
Backend API reference: https://iced-latte.uk/backend/api/docs/swagger-ui/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
module.exports = { | ||
// Type check TypeScript files | ||
'**/*.(ts|tsx)': () => 'yarn tsc --noEmit', | ||
'**/*.(ts|tsx)': () => 'npm run tsc --noEmit', | ||
|
||
// Lint then format TypeScript and JavaScript files | ||
'src/**/*.(ts|tsx|js)': (filenames) => [ | ||
`yarn eslint --fix ${filenames.join(' ')}`, | ||
`yarn prettier --write ${filenames.join(' ')}`, | ||
`npm run eslint --fix ${filenames.join(' ')}`, | ||
`npx prettier --write ${filenames.join(' ')}`, | ||
], | ||
|
||
// Format MarkDown and JSON | ||
'**/*.(md|json)': (filenames) => | ||
`yarn prettier --write ${filenames.join(' ')}`, | ||
`npx prettier --write ${filenames.join(' ')}`, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.