I have just found your Nx plugins and it looks promising!
However, I want to ignore some files from being copied during the build step.
In options.ts, I have found the ignoreFiles option:
|
export interface PhpBuildOptions { |
|
outputName: string | null; |
|
outputPath: string | null; |
|
ignoreFiles: string[] | null; |
|
} |
I have apps/app/dockerfile, however it is copied to {options.outputPath}/{options.outputName}, whether I set ignoreFiles to ["dockerfile"] or ["apps/frontend-php/dockerfile"].
Anyway, here is my apps/app/project.json:
apps/app/project.json
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "app",
"projectType": "application",
"sourceRoot": "apps/app/src",
"tags": [],
"targets": {
"build": {
"dependsOn": [
"copyComposerJson"
],
"executor": "@nx-php/phpbuild:phpbuild",
"options": {
"ignoreFiles": [
"apps/app/dockerfile"
],
"outputName": "app",
"outputPath": "dist/apps"
},
"outputs": [
"{options.outputPath}/{options.outputName}"
]
},
"copyComposerJson": {
"executor": "nx:run-commands",
"options": {
// Note: This script copies the Composer files to `dist/apps/app`
// so that I could create a Docker image from the files in `dist/apps/app` only.
"command": "node scripts/copy-file.js composer.json composer.lock dist/apps/app"
}
},
"test": {
"dependsOn": [
"build"
],
"executor": "@nx-php/phpunit:phpunit"
}
}
}
Thanks for the creation of these plugins! 🙏
Versions:
@nx-php/composer-plugin@0.2.0;
@nx-php/phpbuild@0.1.2;
@nx-php/phpunit@0.2.0;
nx@19.2.3.
I have just found your Nx plugins and it looks promising!
However, I want to ignore some files from being copied during the build step.
In
options.ts, I have found theignoreFilesoption:nx-php/packages/phpbuild-executor/src/options.ts
Lines 1 to 5 in 3c0e648
I have
apps/app/dockerfile, however it is copied to{options.outputPath}/{options.outputName}, whether I setignoreFilesto["dockerfile"]or["apps/frontend-php/dockerfile"].Anyway, here is my
apps/app/project.json:apps/app/project.jsonThanks for the creation of these plugins! 🙏
Versions:
@nx-php/composer-plugin@0.2.0;@nx-php/phpbuild@0.1.2;@nx-php/phpunit@0.2.0;nx@19.2.3.