Skip to content

Commit

Permalink
Merge pull request #52 from eea/develop
Browse files Browse the repository at this point in the history
Added site.webmanifest
  • Loading branch information
razvanMiu committed Apr 5, 2023
2 parents 5056f5f + 67081cc commit 0eab9bc
Show file tree
Hide file tree
Showing 77 changed files with 29,960 additions and 18,809 deletions.
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Folders
.git
.yarn/cache
.storybook
build
cache
locales/*.json
node_modules
omelette

# Files
.env
*.log
.dockerignore
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.gitmodules
.prettierignore
bootstrap
cypress*.json
docker-compose.yml
Jenkinsfile
start_.sh
36 changes: 36 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# EditorConfig Configurtaion file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{html,dtml,pt,zpt,xml,zcml,js,jsx,json,less,css,yaml,yml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
src/addons/**/node_modules
src/addons/**/cypress
src/addons/**/build
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
alias: {
map: [
['@plone/volto', '@plone/volto/src'],
['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
...addonAliases,
['@package', `${__dirname}/src`],
['@root', `${__dirname}/src`],
Expand Down
12 changes: 4 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ build
.idea
lighthouse-report.html
.vscode/
backend
.#*
*~

Expand Down Expand Up @@ -79,22 +78,19 @@ cypress/screenshots
# generic
data
omelette
*.old
*~
src/addons
src/develop
npm-cache
backend

# build
public/critical.css
src/addons/*
/cache

.nyc_output/

# yarn 3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/**/CHANGELOG.md
src/**/README.md
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
"hooks": {
"after:bump": "npx auto-changelog --commit-limit false -p"
}
}
}
40 changes: 39 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const webpack = require('webpack');
const fs = require('fs');
const path = require('path');
const makeLoaderFinder = require('razzle-dev-utils/makeLoaderFinder');
const fileLoaderFinder = makeLoaderFinder('file-loader');
Expand Down Expand Up @@ -29,6 +30,30 @@ const SVGLOADER = {
],
};

const defaultRazzleOptions = {
verbose: false,
debug: {},
buildType: 'iso',
cssPrefix: 'static/css',
jsPrefix: 'static/js',
enableSourceMaps: true,
enableReactRefresh: true,
enableTargetBabelrc: false,
enableBabelCache: true,
forceRuntimeEnvVars: [],
mediaPrefix: 'static/media',
staticCssInDev: false,
emitOnErrors: false,
disableWebpackbar: false,
browserslist: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie 11',
'not dead',
],
};

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
Expand All @@ -52,6 +77,10 @@ module.exports = {
plugins: razzleConfig.plugins,
},
webpack,
false,
undefined,
[],
defaultRazzleOptions,
);
const AddonConfigurationRegistry = require('@plone/volto/addon-registry');

Expand Down Expand Up @@ -85,7 +114,16 @@ module.exports = {
alias: { ...config.resolve.alias, ...baseConfig.resolve.alias },
},
};
resultConfig.module.rules[1].exclude = /node_modules\/(?!(@plone\/volto)\/)/;

// Addons have to be loaded with babel
const addonPaths = registry.addonNames.map((addon) =>
fs.realpathSync(registry.packages[addon].modulePath),
);
resultConfig.module.rules[1].exclude = (input) =>
// exclude every input from node_modules except from @plone/volto
/node_modules\/(?!(@plone\/volto)\/)/.test(input) &&
// If input is in an addon, DON'T exclude it
!addonPaths.some((p) => input.includes(p));

const addonExtenders = registry.getAddonExtenders().map((m) => require(m));

Expand Down
783 changes: 783 additions & 0 deletions .yarn/releases/yarn-3.2.3.cjs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
defaultSemverRangePrefix: ""

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.3.cjs
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [3.22.0](https://github.com/eea/industry-frontend/compare/3.21.0...3.22.0) - 5 April 2023

#### :rocket: New Features

- feat(package.json): add @eeacms/volto-datablocks, @eeacms/volto-openlayers-map, and @eeacms/volto-tableau to addons and dependencies [Miu Razvan - [`f100540`](https://github.com/eea/industry-frontend/commit/f1005408b22f9ff398a3bd7ac930b6431063ea96)]

#### :rocket: Dependency updates


#### :hammer_and_wrench: Others

- Use latest volto [Miu Razvan - [`66a9518`](https://github.com/eea/industry-frontend/commit/66a951851ab0ee6f8cb3b6925f94c84d0537016f)]
- Create icon.svg [Alexandru Ghica - [`81cb2bf`](https://github.com/eea/industry-frontend/commit/81cb2bf60808221e56d2b22127263d2fcc199c19)]
- Create site.webmanifest [Alexandru Ghica - [`77ec69a`](https://github.com/eea/industry-frontend/commit/77ec69ab323b3040503b2716228775293f02ab5f)]
### [3.21.0](https://github.com/eea/industry-frontend/compare/3.20.0...3.21.0) - 23 December 2022

#### :house: Internal changes
Expand Down
27 changes: 11 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
# Based on https://github.com/plone/volto/blob/master/entrypoint.sh
FROM node:16-slim

COPY . /opt/frontend/
WORKDIR /opt/frontend/
COPY . /app/
WORKDIR /app/

# Update apt packages
RUN runDeps="openssl ca-certificates patch gosu git make tmux locales-all" \
&& apt-get update \
&& apt-get install -y --no-install-recommends $runDeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& npm install --location=global mrs-developer \
&& npm install -g mrs-developer \
&& cp jsconfig.json.prod jsconfig.json \
&& mkdir -p /opt/frontend/src/addons \
&& rm -rf /opt/frontend/src/addons/* \
&& find /opt/frontend/ -not -user node -exec chown node {} \+ \
&& mkdir -p /app/src/addons \
&& rm -rf /app/src/addons/* \
&& find /app/ -not -user node -exec chown node {} \+ \
&& corepack enable

# Build
USER node

WORKDIR /opt/frontend/

RUN cd /opt/frontend \
&& RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn \
&& RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn build \
RUN yarn \
&& yarn build \
&& rm -rf /home/node/.cache \
&& rm -rf /home/node/.yarn \
&& rm -rf /home/node/.npm \
&& rm -rf /app/.yarn/cache

USER root

EXPOSE 3000 3001 4000 4001
EXPOSE 3000 3001

ENTRYPOINT ["/opt/frontend/entrypoint-prod.sh"]
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["yarn", "start:prod"]
Loading

0 comments on commit 0eab9bc

Please sign in to comment.