Go to repository
Internal

Function copyFilesFrom

Copy all files in a given project type definition that are present in the list of files to copy. If the file already exists in the final location stated in file definition, it will not be copied unless the overwrite option is set to true.

If the dryRun option is set to true, no files will be copied, but the list of files that should have been copied is returned.

If the addTestLine is set to true, then, if the file .npmrc is copied, the verdaccio test information will be written to the contents of the file.

Parameters

  • projectTypeDef: ProjectTypeDefinition

    The project type definition that contains the information of the files to copy.

  • filesToCopy: (keyof ProjectTypeDefinition)[]

    The actual list of files to copy.

  • overwrite: boolean = false

    Whether or not to overwrite already present files

  • dryRun: boolean = false

    Whether or not thi is a dry run.

  • addTestLine: boolean = false

    Whether to add the verdaccio information line to the .npmrc file

  • projectName: string

Returns string[]

The list of copied files names, full path.