pnp / generator-teams

A Yeoman Generator for Microsoft Teams
https://pnp.github.io/generator-teams
MIT License
428 stars 112 forks source link

gulp-inject configuration #277

Closed pschaeflein closed 2 years ago

pschaeflein commented 2 years ago

Discussed in https://github.com/pnp/generator-teams/discussions/276

Originally posted by **pschaeflein** January 5, 2022 I would like to propose an update to support a developer-provided configuration for gulp-inject. The yoteams-build-core package [supports configuration](https://github.com/pnp/generator-teams/tree/master/packages/yoteams-build-core#configuration) to extend what file paths are processed, but does not provide for changing the processing. I would appreciate thoughts around extending the config object to include injectOptions: ```typescript interface IYoTeamsBuildCoreConfig { watches: string[]; clientWatches: string[]; staticFiles: string[]; injectSources: string[]; injectOptions: any; // @types/gulp-inject: IOptions htmlFiles: string[]; } ``` (Options for gulp-inject: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e605162d378f52f5cb8fccb137442320c876bf4d/types/gulp-inject/index.d.ts#L22) The specified injectOptions (if any) would then be used in the webTasks.injectSources method instead of the default.
wictorwilen commented 2 years ago

Thank you @pschaeflein - this is now merged into yoteams-build-core@1.6.0-preview.1 and you can test it by running npm install yoteams-build-core@preview on an existing project. We'll give it a few days for testing until we publish it to the main branch.

pschaeflein commented 2 years ago

I updated existing projects without issue. Thanks!

wictorwilen commented 2 years ago

Thanks for verifying @pschaeflein - and we're out of preview.