Closed jogelin closed 1 year ago
Do you know what has to be done to achieve this? I thought Nx resolves the template in outputs from configured options.
@twittwer sorry for the late answer.
I don't really know what you mean by "has to be done".
If I execute these steps with my hard coded outputPath
in me project.json
:
dist/compodoc/may-app
--> if existsyarn nx run my-app:compodoc
--> store it in dist/compodoc/may-app
and in the clouddist/compodoc/may-app
yarn nx run my-app:compodoc
--> get from cloud and set it to dist/compodoc/may-app
If I remove my config outputPath
then the last step doesn't work
After playing with the debug mode, I clearly see that the outputPath
disappeared in the configurations:
with the config set: Prepare Compodoc...
{
tsConfig: 'libs/shared/ui/tsconfig.lib.json',
outputPath: 'dist/compodoc/shared-ui',
disablePrivate: true,
disableInternal: true,
exportFormat: 'json',
debug: true,
workspaceDocs: false,
disableCoverage: true,
disableSourceCode: false,
disableDomTree: false,
disableTemplateTab: false,
disableStyleTab: false,
disableGraph: false,
disableProtected: false,
disableLifeCycleHooks: true,
disableRoutesGraph: false,
disableSearch: false,
disableDependencies: false,
language: 'en-US',
theme: 'gitbook',
hideGenerator: false,
port: 8080,
watch: false
}
without the config set: Prepare Compodoc...
{
tsConfig: 'libs/sdc/shared/ui/tsconfig.lib.json',
disablePrivate: true,
disableInternal: true,
exportFormat: 'json',
debug: true,
workspaceDocs: false,
disableCoverage: true,
disableSourceCode: false,
disableDomTree: false,
disableTemplateTab: false,
disableStyleTab: false,
disableGraph: false,
disableProtected: false,
disableLifeCycleHooks: true,
disableRoutesGraph: false,
disableSearch: false,
disableDependencies: false,
language: 'en-US',
theme: 'gitbook',
hideGenerator: false,
port: 8080,
watch: false
}
So I think Nrwl/Nx cannot apply the config: "outputs": ["{options.outputPath}"],
correctly
May it be a good option to define only the outputs, like nx's jest configuration?
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/foo"],
"options": {
"jestConfig": "libs/foo/jest.config.ts",
"passWithNoTests": true
}
},
The minimal options would look like this:
"compodoc": {
"executor": "@twittwer/compodoc:compodoc",
"outputs": ["dist/compodoc/foo"],
"configurations": {
"json": {
"exportFormat": "json"
}
}
}
I have this config:
but I wanted to use the default value so remove
tsconfig
+outputPath
to have this:then the cache of Nx isn't reverted in the dist folder