Skip to content

Commit

Permalink
feat: resolve maker added file path #169
Browse files Browse the repository at this point in the history
  • Loading branch information
bennymeg committed Jun 1, 2022
1 parent 7a72016 commit 1506470
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/nx-electron/src/executors/package/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,16 @@ function _createTargets(platforms: Platform[], type: string, arch: string): Map<

function _createBaseConfig(options: PackageElectronBuilderOptions, context: ExecutorContext): Configuration {
const files: Array<FileSet | string> = options.files ?
(Array.isArray(options.files) ? options.files : [options.files] ): Array<FileSet | string>()
(Array.isArray(options.files) ? options.files : [options.files]) : Array<FileSet | string>();
const outputPath = options.prepackageOnly ?
options.outputPath.replace('executables', 'packages') : options.outputPath;

files.forEach(file => {
if (file && typeof file === 'object' && file.from && file.from.length > 0) {
file.from = resolve(options.sourcePath, file.from);
}
});

return {
directories: {
...options.directories,
Expand Down

0 comments on commit 1506470

Please sign in to comment.