David Herges
David Herges
I'd like a solution that's a little bit more generic: allow to register hooks in the build pipeline
See https://www.npmjs.com/package/ng-cli-packagr-tasks
Hi @smithad15, similar to `forProject()` and `withTsConfig()` will be a good way. The question is how to expose? `withPostCssPlugin(plugins: Plugin | pluginFunction | Processor[])` pass an array of processors, then...
On that notice, it's also a good idea to initialize the css tooling per ngPackage/entry point and not ["per stylesheet file"](https://github.com/dherges/ng-packagr/blob/master/src/lib/ng-v5/entry-point/resources/stylesheet.transform.ts#L40-L41). Currently., it's wasting a lot of resources by re-initializing...
See my comments in https://github.com/dherges/ng-packagr/commit/75907dc9451f83c6165a8eff3824eeb99deba0fa Should we make it a `withPostCssPlugin()` where you override factories for plugins or rather a with `withPostCss()` where you override the full post-css rendering? Of...
After breakfast coffee, why not `withStylesheetRenderer(fn: RendererFactory)` and `withTemplateRenderer(fn: RendererFactory)`? A renderer factory would look like: ```ts .withStylesheetRenderer((entryPoint: NgEntryPoint) => { return ({ filePath, data }: { filePath: string, data:...
After all that, I refactored the stylesheet transform and added some utilities to the Graph / Node API. https://github.com/dherges/ng-packagr/blob/26accf9/src/lib/ng-v5/entry-point/resources/stylesheet.transform.ts#L20-L27 `Graph`, `Node`, `StylesheetNode`, `EntryPointNode`, `isEntryPointInProgress()`, and so on should be added...
To summarize, how do you like to customize? - the full transformation: most flexibility, no re-use of defaults, implement with graph api - override postcss plugins: less flexible, re-use default...
FYI / CC @alan-agius4 What do you think? You mentioned the HTML minifying in #614. By giving access to the full template transform, you'd be able to customize like so:...
What about combining both? ```ts .withFooTransform(transFormFromPromise(async graph => { // full flexibility on your side, full responsibility on graph and nodes })) ``` ```ts .withFooTransform(forEachFoo((css: string, filePath: string, entryPoint: NgEntryPoint,...