Skip to content

Commit

Permalink
feat!: implement pdk
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 5, 2023
1 parent 5a1129f commit c497eb8
Show file tree
Hide file tree
Showing 422 changed files with 14,877 additions and 33,519 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
40 changes: 0 additions & 40 deletions .eslintrc

This file was deleted.

47 changes: 47 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
root: true,
extends: ['@myparcel-eslint/eslint-config-esnext', '@myparcel-eslint/eslint-config-prettier'],
rules: {
'class-methods-use-this': 'off',
},
overrides: [
{
files: ['./**/*.vue'],
extends: '@myparcel-eslint/eslint-config-prettier-typescript-vue',
rules: {
'@typescript-eslint/no-misused-promises': 'off',
'vue/no-undef-components': [
'error',
{
ignorePatterns: ['^Pdk(?:\\w)+$'],
},
],
},
},
{
files: ['./**/*.ts', './**/*.tsx'],
extends: '@myparcel-eslint/eslint-config-prettier-typescript',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
extraFileExtensions: ['.vue'],
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-misused-promises': 'off',
},
},
{
files: ['./**/*.js', './**/*.cjs', './**/*.mjs'],
extends: '@myparcel-eslint/eslint-config-node',
},
{
files: ['./**/*.spec.*', './**/*.test.*', './**/__tests__/**'],
rules: {
'@typescript-eslint/no-magic-numbers': 'off',
'max-len': 'off',
'max-lines-per-function': 'off',
},
},
],
};
18 changes: 18 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'label'

on:
issues:
types:
- opened

jobs:
label:
runs-on: ubuntu-22.04
steps:
- id: parse
uses: peter-murray/issue-forms-body-parser@v2.0.0
with:
issue_id: ${{ github.event.issue.number }}
separator: '###'
label_marker_start: ''
label_marker_end: ''
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# PrestaShop
config*.xml

docker-compose.override.yml

*.cache
.eslintcache
*.log
*.log.*
*.tgz
*.zip

# 3rdParty
dist/
node_modules/
Expand All @@ -9,9 +18,14 @@ views/dist/
.php_cs.cache
.php-cs-fixer.cache

**/lib
**/dist

# OS files
.DS_Store

yarn-error.log

# Yarn
.pnp.*
.yarn/*
Expand Down
22 changes: 0 additions & 22 deletions .php_cs.dist.php

This file was deleted.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

807 changes: 807 additions & 0 deletions .yarn/releases/yarn-3.3.0.cjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.4.1.cjs
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.3.0.cjs
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing

1. Clone or download the [source code]
2. If you're planning to change JavaScript or CSS code, see below section for
details.
3. Make your changes
4. Create a pull request!

## Prerequisites

* [Docker]

## Steps

### Build and run the image

```shell
docker build . -t myparcelnl/prestashop-module
docker run --rm -v $(pwd):/app myparcelnl/prestashop-module
```

This will install Node and Composer dependencies and build the plugin. The
plugin will be available in the `dist` folder and as a zip file in the root.

### Make your changes

* Please try to conform to our existing code style.

### Test your changes

**Easiest method**

This is only sufficient if you're running WordPress locally and your source
directory is inside your `wp-content` folder. If this is not the case, continue
to the next section.

Run this after every change:

```shell
docker run --rm -v $(pwd):/app myparcelnl/prestashop-module
```

Or run this to monitor your changes and rebuild automatically:

```shell
docker run --rm -v $(pwd):/app myparcelnl/prestashop-module yarn serve
```
44 changes: 27 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
{
"name": "myparcelnl/prestashop-module",
"version": "1.8.1",
"version": "2.0.0",
"license": "MIT",
"type": "prestashop-module",
"scripts": {
"format": "vendor/bin/php-cs-fixer fix ."
},
"require": {
"php": ">=7.2.0",
"myparcelnl/pdk": "~1.31.0",
"myparcelnl/sdk": "~7.6.1"
"myparcelnl/pdk": "*",
"php": ">=7.2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0"
"doctrine/orm": "2.7.4",
"pestphp/pest": "^1.22",
"spatie/pest-plugin-snapshots": "^1.1.0"
},
"config": {
"prepend-autoloader": false,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"autoload": {
"psr-4": {
"Gett\\MyparcelBE\\": "src/"
"MyParcelNL\\PrestaShop\\": "src/"
},
"classmap": [
"myparcelbe.php",
"src/Model/OrderLabel.php"
],
"exclude-from-classmap": []
"myparcelnl.php"
]
},
"config": {
"prepend-autoloader": false
}
}
"autoload-dev": {
"psr-4": {
"MyParcelNL\\PrestaShop\\Tests\\": "tests/"
}
},
"repositories": [
{
"type": "path",
"url": "/Users/edie/Sites/myparcel/pdk"
}
]
}
Loading

0 comments on commit c497eb8

Please sign in to comment.