Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize landingpage #312

Merged
merged 19 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

74 changes: 25 additions & 49 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,31 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"ignorePatterns": ["projects/**/*"],
"plugins": ["@typescript-eslint/eslint-plugin"],
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": "off",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
"@angular-eslint/directive-selector": [
"error",
{
"accessibility": "explicit"
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
Expand Down Expand Up @@ -69,53 +66,32 @@
"@typescript-eslint/naming-convention": [
"error",
{
"format": [
"camelCase",
"snake_case",
"UPPER_CASE"
],
"selector": [
"variable",
"function"
]
"format": ["camelCase", "snake_case", "UPPER_CASE"],
"selector": ["variable", "function"]
}
],
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
"@typescript-eslint/quotes": [
"error",
"double",
{
"allowTemplateLiterals": true
}
],
"@typescript-eslint/semi": [
"error",
"always"
],
"brace-style": [
"error",
"1tbs"
],
"default-case": "error",
"id-blacklist": "off",
"id-match": "off",
"jsdoc/newline-after-description": "off",
"jsdoc/no-types": "off",
"no-duplicate-case": "error",
"no-duplicate-imports": "error",
"no-fallthrough": "off",
"no-redeclare": "error",
"no-underscore-dangle": "off"
"@typescript-eslint/semi": ["error", "always"]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
},
{
"files": ["*.ts"],
"extends": ["plugin:ngrx/recommended"]
}
]
}
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Use Node.js 14.x
- name: Use Node.js 20.x
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 20.x

- name: Build
run: |
Expand Down
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"bracketSpacing": true,
"singleQuote": false,
"printWidth": 80,
"trailingComma": "all",
"arrowParens": "always"
}
2 changes: 1 addition & 1 deletion CI/ESS/Dockerfile.dmsc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:20-alpine
RUN mkdir /usr/html
RUN mkdir /landing
WORKDIR /landing
Expand Down
2 changes: 1 addition & 1 deletion CI/ESS/Dockerfile.dmscprod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:20-alpine AS builder

RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
ENV http_proxy "http://192.168.1.1:8123"
Expand Down
4 changes: 2 additions & 2 deletions CI/ESS/Dockerfile.ess
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:20-alpine
RUN mkdir /usr/html
RUN mkdir /landing
WORKDIR /landing
Expand All @@ -24,4 +24,4 @@ COPY CI/ESS/sitemap.xml /landing/dist/browser
COPY CI/ESS/google43e14584df796f63.html /landing/dist/server
COPY CI/ESS/sitemap.xml /landing/dist/server
EXPOSE 4000
CMD ["node", "dist/server.js"]
CMD ["node", "dist/server.js"]
2 changes: 1 addition & 1 deletion CI/ESS/Dockerfile.hub
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:20-alpine AS builder

RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
ENV http_proxy "http://192.168.1.1:8123"
Expand Down
2 changes: 1 addition & 1 deletion CI/ESS/Dockerfile.proxy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:20-alpine

RUN mkdir /usr/html
RUN mkdir /landing
Expand Down
2 changes: 1 addition & 1 deletion CI/ESS/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16
FROM node:20
ENV http_proxy "http://192.168.1.1:8123"
ENV https_proxy $http_proxy
ENV no_proxy "localhost, 127.0.0.1"
Expand Down
4 changes: 2 additions & 2 deletions CI/MAXIV/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14-alpine AS builder
FROM node:20-alpine AS builder

RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
RUN apk update && apk upgrade && \
Expand All @@ -18,4 +18,4 @@ RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /landing/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 80
EXPOSE 80
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine AS builder
FROM node:20-alpine AS builder

RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
RUN apk update && apk upgrade && \
Expand All @@ -24,7 +24,7 @@ COPY --chown=node:node . /home/node/app/
# Build app
RUN npx ng build --configuration=${env}

FROM nginx:1.23.3-alpine
FROM nginx:alpine

RUN sed -i -e 's/^root::/root:!:/' /etc/shadow
RUN rm -rf /usr/share/nginx/html/*
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ These instructions will get you a copy of the project up and running on your loc
What things you need to install the software and how to install them


- Angular 13
- Node 14
- Angular 17
- Node 20
- [SciCat Backend](https://github.com/SciCatProject/backend)
- MongoDB

Expand Down
32 changes: 21 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,36 +249,36 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"dmscdev": {
"browserTarget": "LandingPageServer:build:dmscdev"
"buildTarget": "LandingPageServer:build:dmscdev"
},
"dmsc": {
"browserTarget": "LandingPageServer:build:dmsc"
"buildTarget": "LandingPageServer:build:dmsc"
},
"essdev": {
"browserTarget": "LandingPageServer:build:essdev"
"buildTarget": "LandingPageServer:build:essdev"
},
"essprod": {
"browserTarget": "LandingPageServer:build:essprod"
"buildTarget": "LandingPageServer:build:essprod"
},
"dmscprod": {
"browserTarget": "LandingPageServer:build:dmscprod"
"buildTarget": "LandingPageServer:build:dmscprod"
},
"maxiv-prod": {
"browserTarget": "LandingPageServer:build:maxiv-prod"
"buildTarget": "LandingPageServer:build:maxiv-prod"
},
"production": {
"browserTarget": "LandingPageServer:build:production"
"buildTarget": "LandingPageServer:build:production"
},
"development": {
"browserTarget": "LandingPageServer:build:development"
"buildTarget": "LandingPageServer:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "LandingPageServer:build"
"buildTarget": "LandingPageServer:build"
}
},
"test": {
Expand Down Expand Up @@ -354,8 +354,18 @@
}
}
},
"defaultProject": "LandingPageServer",
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": [
"@angular-eslint/schematics"
],
"analytics": false
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
2 changes: 1 addition & 1 deletion e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("workspace-project App", () => {
expect(logs).not.toContain(
jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry)
} as logging.Entry),
);
});
});
2 changes: 1 addition & 1 deletion e2e/src/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class AppPage {

getTitleText(): Promise<string> {
return element(
by.css("app-root .content span")
by.css("app-root .content span"),
).getText() as Promise<string>;
}
}
Loading
Loading