-
Notifications
You must be signed in to change notification settings - Fork 5
/
pdk.config.js
54 lines (48 loc) · 1.39 KB
/
pdk.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import {PdkPlatformName, defineConfig} from '@myparcel-pdk/app-builder';
import {downloadCarrierLogos} from './private/downloadCarrierLogos.js';
import {spawnSync} from 'node:child_process';
export default defineConfig({
name: 'prestashop',
platformFolderName: '{{platform}}',
platforms: [PdkPlatformName.MyParcelNl, PdkPlatformName.MyParcelBe],
source: [
'!**/node_modules/**',
// Php files will be copied after scoping
'mails/**/*',
'private/carrier-logos/**/*',
'views/PrestaShop/**/*',
'views/js/**/dist/**/*',
'views/templates/**/*',
'CONTRIBUTING.md',
'LICENSE.txt',
'README.md',
'logo.png',
],
versionSource: [{path: 'package.json'}, {path: 'composer.json'}],
translations: {
// eslint-disable-next-line no-magic-numbers
additionalSheet: 279275153,
},
rootCommand: 'docker compose run --rm -T php',
hooks: {
/**
* Download carrier logos and build the frontend.
*/
async beforeCopy({context}) {
await downloadCarrierLogos(context);
const buffer = spawnSync('yarn', ['nx', 'run-many', '--target=build', '--output-style=stream'], {
stdio: 'inherit',
});
if (buffer.error) {
throw buffer.error;
}
},
},
additionalCommands: [
{
name: 'download-carrier-logos',
description: 'Download carrier logos',
action: downloadCarrierLogos,
},
],
});