Skip to content

Commit

Permalink
License requirements (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-moser authored May 3, 2024
1 parent 7a53da7 commit 154ed25
Show file tree
Hide file tree
Showing 322 changed files with 4,087 additions and 309 deletions.
82 changes: 0 additions & 82 deletions .eslintrc.js

This file was deleted.

12 changes: 8 additions & 4 deletions .github/workflows/frontend-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ jobs:
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: node_modules
path: ./assets/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
working-directory: ./assets
run: npm ci

lint:
Expand All @@ -59,12 +60,13 @@ jobs:
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: node_modules
path: ./assets/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run code linting
working-directory: ./assets
run: npm run lint-fix

- uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -90,12 +92,13 @@ jobs:
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: node_modules
path: ./assets/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run production build
working-directory: ./assets
run: npm run build

- uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -119,10 +122,11 @@ jobs:
- name: Cache npm dependencies
uses: actions/cache@v4
with:
path: node_modules
path: ./assets/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run tests
working-directory: ./assets
run: npm run test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Thumbs.db
/var
/vendor

/node_modules
assets/node_modules

# code style fixer
.php_cs
Expand Down
7 changes: 5 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => 'Pimcore' . PHP_EOL . PHP_EOL .
'This source file is available under following license:' . PHP_EOL .
'This source file is available under two different licenses:' . PHP_EOL .
'- GNU General Public License version 3 (GPLv3)' . PHP_EOL .
'- Pimcore Commercial License (PCL)' . PHP_EOL .
'Full copyright and license information is available in' . PHP_EOL .
'LICENSE.md which is distributed with this source code.' . PHP_EOL .
PHP_EOL .
' @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)' . PHP_EOL .
' @license http://www.pimcore.org/license PCL'
' @license http://www.pimcore.org/license GPLv3 and PCL'
],

'blank_line_before_statement' => true,
Expand Down
29 changes: 0 additions & 29 deletions .storybook/preview.tsx

This file was deleted.

33 changes: 31 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
# License
Copyright (C) Pimcore GmbH

This software is available under following license:
This software is available under two different licensing options:
* Pimcore Open Core License (POCL) + GNU General Public License version 3 (GPLv3) as Pimcore Community Edition
* All contents inside of `/assets/` and `/public/build` are licensed under the Pimcore Open Core License (POCL).
* All contents outside of `/assets/` and `/public/build` are licensed under the GNU General Public License version 3 (GPLv3).
* Pimcore Commercial License (PCL)

## Pimcore Community Edition
If you decide to choose the Pimcore Community Edition, you must comply with the following terms:

### Pimcore Open Core License (POCL)

> For all contents inside of `/assets/` and `/public/build`
The `pocl.txt` file in the root of this repository contains the Pimcore Open Core License (POCL) licensing terms.

### GNU General Public License version 3 (GPLv3)

> For all contents outside of `/assets/` and `/public/build`
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

## Pimcore Commercial License (PCL)
Commercial and supported versions of the program - also known as
Commercial Distributions - must be used in accordance with the terms and conditions
contained in a separate written agreement between you and Pimcore GmbH.
For more information about the Pimcore Commercial License (PCL) please contact info@pimcore.com.
For more information about the Pimcore Commercial License (PCL) please contact info@pimcore.com.
108 changes: 108 additions & 0 deletions assets/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/**
* Pimcore
*
* This source file is available under two different licenses:
* - Pimcore Open Core License (POCL)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
*/

module.exports = {
ignorePatterns: ['*.gen.ts'],
env: {
browser: true,
es2021: true
},
settings: {
react: {
version: 'detect'
}
},
extends: [
'standard-with-typescript',
'plugin:react/recommended',
'plugin:storybook/recommended',
'plugin:jsx-a11y/recommended'
],
overrides: [
{
env: {
node: true
},
files: [
'.eslintrc.{js,cjs}'
],
parserOptions: {
sourceType: 'script'
}
},

{
files: ['*.spec.ts', '*.spec.tsx', '*.test.ts', '*.test.tsx'],
env: {
jest: true
}
}
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
plugins: [
'react',
'header'
],
rules: {
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/unbound-method': 'off',
'react/jsx-boolean-value': 'error',
'react/jsx-closing-bracket-location': 'error',
'react/jsx-curly-spacing': ['error', 'always'],
'react/jsx-equals-spacing': 'error',
'react/jsx-first-prop-new-line': 'error',
'react/jsx-indent-props': ['error', 2],
'react/jsx-indent': ['error', 2],
'react/jsx-key': 'error',
'react/jsx-max-props-per-line': ['error', { maximum: 1 }],
'react/jsx-no-literals': 'off',
'react/jsx-no-target-blank': 'error',
'react/jsx-pascal-case': 'error',
'react/jsx-sort-props': 'error',
'react/jsx-tag-spacing': 'error',
'react/jsx-no-constructed-context-values': 'error',
'react/jsx-wrap-multilines': [
'error',
{
declaration: 'parens-new-line',
assignment: 'parens-new-line',
return: 'parens-new-line',
arrow: 'parens-new-line',
condition: 'parens-new-line',
logical: 'parens-new-line',
prop: 'ignore'
}
],
'header/header': [2, 'block', [
'*',
'* Pimcore',
'*',
'* This source file is available under two different licenses:',
'* - Pimcore Open Core License (POCL)',
'* - Pimcore Commercial License (PCL)',
'* Full copyright and license information is available in',
'* LICENSE.md which is distributed with this source code.',
'*',
'* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)',
'* @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL',
''
], 2]
}
}
17 changes: 15 additions & 2 deletions .storybook/main.ts → assets/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
/**
* Pimcore
*
* This source file is available under two different licenses:
* - Pimcore Open Core License (POCL)
* - Pimcore Commercial License (PCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
*/

import type { StorybookConfig } from "@storybook/react-webpack5";
import path from "path";

const config: StorybookConfig = {
stories: ["../assets/js/**/*.mdx", "../assets/js/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
stories: ["../js/**/*.mdx", "../js/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
Expand All @@ -25,7 +38,7 @@ const config: StorybookConfig = {
webpackFinal: async (config) => {
config.resolve!.alias = {
...config.resolve!.alias,
"@Pimcore": path.resolve(__dirname, "../assets/js/src"),
"@Pimcore": path.resolve(__dirname, "../js/src"),
};

// disable whatever is already set to load SVGs
Expand Down
File renamed without changes.
Loading

0 comments on commit 154ed25

Please sign in to comment.