Skip to content

Commit

Permalink
Updated SCAYLE Panel Demo Add-On to version 1.0
Browse files Browse the repository at this point in the history
- Updated to latest SCAYLE Panel Icon Library
- Updated to latest SCAYLE Component Library
- Adjusted Readme
  • Loading branch information
Marcel Domke committed Jan 25, 2024
1 parent 84f458e commit 0309b55
Show file tree
Hide file tree
Showing 48 changed files with 1,964 additions and 803 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.yml]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ENV not exposed to application
CONFIG_SERVER_HOST=demo-add-on.cloud-panel.aboutyou.test
CONFIG_SERVER_PORT=8082

# ENV exposed application (with PANEL_, prefix)
PANEL_ADDON_IDENTIFIER=demo
PANEL_USE_SHADOW_DOM=true
66 changes: 66 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module.exports = {
root: false,
env: {
browser: true,
es6: true,
node: true,
},
plugins: ['unicorn'],
extends: [
'plugin:import/errors',
'plugin:import/warnings',
'plugin:vue/vue3-recommended',
'eslint:recommended',
],
settings: {
'import/resolver': {
typescript: {},
},
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
ts: '@typescript-eslint/parser',
},
sourceType: 'module',
},
rules: {
'vue/require-explicit-emits': [
'error',
{
allowProps: false,
},
],
'vue/attributes-order': 'error',
'vue/multi-word-component-names': 'off',
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
'vue/html-self-closing': ['error', {
'html': {
'void': 'always',
'normal': 'always',
'component': 'always'
},
'svg': 'always',
'math': 'always'
}],
'vue/html-closing-bracket-spacing': [
'error',
{
startTag: 'never',
endTag: 'never',
selfClosingTag: 'always',
},
],
// eslint-plugin-import
'import/first': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
},
],
'import/no-mutable-exports': 'error',
'import/no-unresolved': 'off',
'no-unused-vars': ['off'],
},
};
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

server-ssl/*
!server-ssl/README.md
!server-ssl/generate-ssl.sh
!server-ssl/default.conf

.env
coverage
junit.xml

# ignore types generated from unit tests (src are the vital ones)
auto-imports.d.ts
components.d.ts
6 changes: 6 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'*.{ts,js,cjs,vue}': [
'bash -c "vue-tsc --noEmit"',
'eslint --fix'
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 ABOUTYOU / Public

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 54 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,53 @@
## Initial Setup
![scayle-logo-cr](https://cdn-prod.scayle.com/public/media/general/SCAYLE-Commerce-Engine-header.png)

<h1 align="center">
SCAYLE Panel Demo Add-On
</h1>

<h4 align="center">
<a href="https://scayle.dev">Documentation</a> |
<a href="https://www.scayle.com/">Website</a>
</h4>

<p align="center">
The SCAYLE <strong>Panel Demo Add-On</strong> is showcasing how to write an Add-On in combination with the SCAYLE Component Library.
</p>

<p align="center">
<a href="#"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="SCAYLE's *Component Library* is released under the MIT license." /></a>
</p>


## Getting Started

Visit the [Add-On Developer Guide](https://scayle.dev/en/dev/add-on/introduction) to learn more on how to use the Panel icons.

Visit the [Docs](https://scayle.dev) to learn more about our system requirements.

## What is Scayle ?

[SCAYLE](https://scayle.com) is a full-featured e-commerce software solution that comes with flexible APIs. Within SCAYLE, you can manage all aspects of your shop, such as products, stocks, customers, and transactions.

Learn more about [Scayles’s architecture](https://scayle.dev/en/dev/getting-started/introduction) and [commerce modules](https://scayle.dev/en/dev/getting-started/introduction) in the Docs.


## Installation

Before running the application, you need to configure your hosts file with the add-on's hostname. You'll also need to create an SSL key pair for this domain.

It's also recommended to install [Volta](https://volta.sh/) in order to use the correct versions of node.js and npm.

1. Add `127.0.0.1 {hostname from .env}` (replace everything including the {}) to `/etc/hosts`
2. `npm ci`
3. **Make sure you have `openssl` installed on your computer for this step**. Generate ssl certificates with `npm run generate:ssl`. The domain name (aka hostname) is retrieved from `CONFIG_SERVER_HOST` in `.env`.
```shell
# Add
127.0.0.1 {hostname from .env}` (replace everything including the {}) to `/etc/hosts`
# Execute
npm ci
# !! Make sure you have openssl installed on your computer for this step. !!
# Generate a ssl certificates with the following command. The domain name (aka hostname) is retrieved from `CONFIG_SERVER_HOST` in `.env`.
npm run generate:ssl
```

## Scripts

Expand All @@ -31,3 +72,12 @@ Check types: `npm run typecheck`
## Shadow DOM

To inject addon in it's own isolated container we can use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). To enable it you must set in .env `PANEL_USE_SHADOW_DOM=true`.
## Other channels
- [LinkedIn](https://www.linkedin.com/company/scaylecommerce/)
- [Jobs](https://careers.smartrecruiters.com/ABOUTYOUGmbH/scayle)
- [AboutYou Tech Blog](https://aboutyou.tech/)
## License
Licensed under the [MIT](https://opensource.org/license/mit/)
Loading

0 comments on commit 0309b55

Please sign in to comment.