Verified Commit 4e24fc49 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Switch to yarn as package manager

* yarn.lock replaces package-lock.json
* Apply prettier formatting to source files
parent 3b456ed9
Pipeline #89544 passed with stages
in 11 minutes and 18 seconds
......@@ -46,7 +46,7 @@ module.exports = {
['~store', './src/store'],
['~utils', './src/utils'],
['~images', './src/images'],
['~context', './src/context']
['~context', './src/context'],
['~components', './src/components'],
],
},
......
......@@ -7,9 +7,9 @@ eslint:
stage: test
image: node:13.8
before_script:
- npm install
- yarn install
script:
- npm run eslint
- yarn run eslint
build_master:
stage: build
......@@ -37,7 +37,7 @@ build_dev:
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --cache-from "$CI_REGISTRY_IMAGE:dev" --build-arg NPM_BUILD_COMMAND=build-dev --pull -t "$CI_REGISTRY_IMAGE:dev" ./
- docker build --cache-from "$CI_REGISTRY_IMAGE:dev" --build-arg BUILD_COMMAND=build-dev --pull -t "$CI_REGISTRY_IMAGE:dev" ./
- docker push "$CI_REGISTRY_IMAGE:dev"
except:
- schedules
......
......@@ -4,26 +4,25 @@
# First stage: Build project
FROM node:14 as build
ARG NPM_BUILD_COMMAND=build
# Copy files and install dependencies
COPY ./ /gatsby/
WORKDIR /gatsby
# Install needed libraries
RUN apt-get update && apt-get install -y libgl1-mesa-glx
# Install dependencies
RUN npm install && \
npm audit fix
RUN npm install -g gatsby-cli
# Copy package.json and install dependencies
RUN yarn global add gatsby-cli
COPY package.json yarn.lock /gatsby/
RUN yarn install --cache-folder .yarn
# Build project
RUN npm run $NPM_BUILD_COMMAND
ARG BUILD_COMMAND=build
# Copy source files and build project
COPY ./ /gatsby/
ARG BUILD_COMMAND=build
RUN yarn run $BUILD_COMMAND
# Prepare nginx configuration
RUN /bin/bash -c 'if [[ "${NPM_BUILD_COMMAND}" == "build" ]]; \
RUN /bin/bash -c 'if [[ "${BUILD_COMMAND}" == "build" ]]; \
then export AMIVAPI_URL="https://api.amiv.ethz.ch"; \
else export AMIVAPI_URL="https://api-dev.amiv.ethz.ch"; \
fi && \
......
......@@ -8,11 +8,9 @@ This is the home of the amiv website.
Navigate into the project directory, install all dependencies and run the development server using the following commands:
_Please note that the parameter `-g` is optional. It is being used to install the package `gatsby-cli` globally on the system._
```shell
npm install -g gatsby-cli
npm install
yarn global add gatsby-cli
yarn install
gatsby develop
```
......@@ -42,8 +40,8 @@ This is the home of the amiv website.
We use `eslint` and `prettier` for linting and formatting of the javascript code. You can use the following commands:
```shell
npm run eslint
npm run format
yarn run eslint
yarn run format
```
4. **Production Build**
......@@ -131,8 +129,8 @@ TODO: Add information about the deployment process of the project.
### Build Tools
- [NPM](https://www.npmjs.com/)
- [gatsby-cli](https://www.npmjs.com/package/gatsby-cli)
- [yarn](https://yarnpkg.com/)
- [gatsby-cli](https://yarnpkg.com/package/gatsby-cli)
### Development Tools
......
This diff is collapsed.
......@@ -5,44 +5,44 @@
"version": "0.2.0",
"author": "AMIV an der ETH, Sandro Lutz <code@temparus.ch>",
"dependencies": {
"@material-ui/core": "^4.11.1",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.56",
"@material-ui/styles": "^4.11.1",
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.57",
"@material-ui/styles": "^4.11.3",
"@reach/router": "^1.3.4",
"ajv": "^6.12.6",
"ajv": "^7.0.4",
"amiv-react-components": "git+https://gitlab.ethz.ch/amiv/react-components.git#fc02eef7d6af30831310c21fc258e56218b023db",
"axios": "^0.21.0",
"axios": "^0.21.1",
"debounce": "^1.2.0",
"filesize": "^6.1.0",
"gatsby": "^2.27.4",
"gatsby-image": "^2.6.0",
"gatsby": "^2.31.1",
"gatsby-image": "^2.10.0",
"gatsby-plugin-alias-imports": "^1.0.5",
"gatsby-plugin-intl": "^0.3.3",
"gatsby-plugin-manifest": "^2.7.0",
"gatsby-plugin-manifest": "^2.11.0",
"gatsby-plugin-material-ui": "^2.1.10",
"gatsby-plugin-matomo": "^0.8.3",
"gatsby-plugin-matomo": "^0.9.0",
"gatsby-plugin-meta-redirect": "^1.1.1",
"gatsby-plugin-react-helmet": "^3.5.0",
"gatsby-plugin-react-helmet": "^3.9.0",
"gatsby-plugin-react-redux": "^1.1.0",
"gatsby-plugin-remove-serviceworker": "^1.0.0",
"gatsby-plugin-remove-trailing-slashes": "^2.5.0",
"gatsby-plugin-robots-txt": "^1.5.3",
"gatsby-plugin-remove-trailing-slashes": "^2.9.0",
"gatsby-plugin-robots-txt": "^1.5.5",
"gatsby-plugin-sentry": "^1.0.1",
"gatsby-plugin-sharp": "^2.9.1",
"gatsby-plugin-sitemap": "^2.7.0",
"gatsby-plugin-sharp": "^2.13.4",
"gatsby-plugin-sitemap": "^2.11.0",
"gatsby-plugin-zopfli": "^2.0.0",
"gatsby-source-filesystem": "^2.6.1",
"gatsby-transformer-json": "^2.6.0",
"gatsby-transformer-sharp": "^2.7.0",
"gatsby-source-filesystem": "^2.10.0",
"gatsby-transformer-json": "^2.10.0",
"gatsby-transformer-sharp": "^2.11.0",
"html-escape": "^2.0.0",
"html-to-react": "^1.4.5",
"marked": "^1.2.5",
"marked": "^1.2.8",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-helmet": "^6.1.0",
"react-intl": "^5.10.6",
"react-intl": "^5.12.0",
"react-redux": "^7.2.2",
"react-scroll": "^1.8.1",
"redux": "^4.0.5",
......@@ -51,16 +51,16 @@
},
"devDependencies": {
"babel-eslint": "^10.1.0",
"babel-preset-gatsby": "^0.7.0",
"babel-preset-gatsby": "^0.11.0",
"eslint": "^7.14.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-webpack": "^0.13.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.17",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.20",
"html-loader": "^1.3.2",
"markdown-loader": "^6.0.0",
"prettier": "^2.2.1"
......@@ -76,7 +76,7 @@
"develop": "gatsby develop",
"eslint": "eslint src/*.js src/**/*.js",
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
"start": "npm run develop",
"start": "yarn run develop",
"serve": "gatsby serve",
"clean": "gatsby clean"
},
......
......@@ -361,8 +361,9 @@ const EventDetails = ({ eventId, ...props }) => {
id="events.signup.termsAccepted"
values={{
breakingLine: <br />,
// eslint-disable-next-line react/display-name
a: (...chunks) => <a onClick={openTermsModal}>{chunks}</a>,
a: function TermsLink(...chunks) {
return <a onClick={openTermsModal}>{chunks}</a>
},
}}
/>
}
......
......@@ -36,7 +36,8 @@ const JobsCompanyHint = ({ className, ...props }) => {
<FormattedMessage id="jobs.companyHintEmail" />
<a href="mailto:jobboerse@amiv.ethz.ch" className={classes.link}>
jobboerse@amiv.ethz.ch
</a>.
</a>
.
</div>
</Alert>
)
......
......@@ -7,8 +7,6 @@ import Skeleton from '@material-ui/lab/Skeleton'
import { useIntl, FormattedMessage } from 'gatsby-plugin-intl'
import { FileTypeIcon } from 'amiv-react-components'
import { apiUrl } from 'config'
const useStyles = makeStyles(
theme => ({
root: {
......
......@@ -6,11 +6,11 @@ Der Akademische Maschinen- und Elektro-Ingenieur Verein (AMIV) an der ETH wurde
Der AMIV betätigt sich in vielerlei Hinsicht für das Wohl der von ihm vertretenen Studenten:
* Die hochschulpolitische Vertretung gegenüber den Departementen wird durch die HoPo-Teams (HoPo-ITET und HoPo-MAVT) des AMIV organisiert.
* Die Organisation von kulturellen Events, Parties und sonstigen geselligen Aktivitäten wird vom Kulturteam übernommen.
* Exkursionen und Sponsoring werden vom External Relations (ER) Team auf die Beine gestellt.
* Die generelle administrative Arbeit führt der AMIV-Vorstand aus. Dessen Tätigkeit kann in den Sitzungsprotokollen nachgelesen werden.
* Die verschiedenen Kommissionen bieten zusätzliche Angebote an.
- Die hochschulpolitische Vertretung gegenüber den Departementen wird durch die HoPo-Teams (HoPo-ITET und HoPo-MAVT) des AMIV organisiert.
- Die Organisation von kulturellen Events, Parties und sonstigen geselligen Aktivitäten wird vom Kulturteam übernommen.
- Exkursionen und Sponsoring werden vom External Relations (ER) Team auf die Beine gestellt.
- Die generelle administrative Arbeit führt der AMIV-Vorstand aus. Dessen Tätigkeit kann in den Sitzungsprotokollen nachgelesen werden.
- Die verschiedenen Kommissionen bieten zusätzliche Angebote an.
## Kontakt
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment