Skip to content

Commit

Permalink
Switch to npm and fix docker build (#355)
Browse files Browse the repository at this point in the history
* Switch to npm and fix docker build

* Add dependi as devcontainer dependency

* Upgrade some dependencies

* Update lint workflow
  • Loading branch information
ChristophB authored Jul 19, 2024
1 parent 403f321 commit d6be749
Show file tree
Hide file tree
Showing 10 changed files with 21,715 additions and 8,570 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn install",
"postCreateCommand": "npm install",

// Configure tool-specific properties.
"customizations": {
Expand All @@ -48,7 +48,6 @@
"extensions": [
"dbaeumer.vscode-eslint",
"Vue.volar",
"gamunu.vscode-yarn",
"hollowtree.vue-snippets",
"dariofuzinato.vue-peek",
"mhutchie.git-graph",
Expand All @@ -60,7 +59,8 @@
"sdras.vue-vscode-snippets",
"mutantdino.resourcemonitor",
"Gruntfuggly.todo-tree",
"waderyan.gitblame"
"waderyan.gitblame",
"fill-labs.dependi"
]
}
}
Expand Down
13 changes: 7 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.devcontainer
.quasar
.vscode
.env
.git
node_modules
.devcontainer/
.quasar/
.vscode/
.git/
.github/
dist/
node_modules/
Dockerfile
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
cache: "npm"
- name: Install dependencies
run: yarn
run: npm install
- name: Run ESLint
run: yarn run eslint . --ext .js,.jsx,.ts,.tsx,.vue
run: npm run lint
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ node_modules

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:alpine as build-stage
WORKDIR /app
RUN yarn global add @quasar/cli
RUN npm i -g @quasar/cli
ARG NPM_AUTH_TOKEN
ENV NPM_AUTH_TOKEN=$NPM_AUTH_TOKEN
COPY package.json yarn.lock .npmrc ./
RUN yarn
COPY package.json package-lock.json .npmrc ./
RUN npm install
COPY . .
RUN quasar build

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A Quasar Framework app

### Install the dependencies

1. Install [npm](https://www.npmjs.com/package/npm), [Yarn](https://classic.yarnpkg.com/lang/en/docs/install) and [Quasar CLI](https://quasar.dev/start/quasar-cli/),
1. Install [npm](https://www.npmjs.com/package/npm) and [Quasar CLI](https://quasar.dev/start/quasar-cli/),
or use the `.devcontainer/devcontainer.json` configuration to build a [Development Container](https://containers.dev/).

2. The npm package `@onto-med/top-api` is hosted in the GitHub Packages registry, thus requires authentication.
Expand All @@ -20,7 +20,7 @@ or use the `.devcontainer/devcontainer.json` configuration to build a [Developme
You will now be prompted for your username and "password" (enter your personal access token, *not* your GitHub account password).
4. For the devcontainer setup, you need to create a `.devcontainer/.env` file containing your GitHub personal access token (see `.devcontainer/.env.dist`)

3. Run `yarn` (skip this step in the devcontainer setup)
3. Run `npm install` (skip this step in the devcontainer setup)

### Start the app in development mode (hot-code reloading, error reporting, etc.)
```bash
Expand All @@ -44,7 +44,7 @@ You can specify the following environment variables via `.env` file or command l

### Lint the files
```bash
yarn run lint
npm run lint
```

### Build the app for production
Expand Down
Loading

0 comments on commit d6be749

Please sign in to comment.