ng-packagr exports markdown files from all folders within a library
See original GitHub issueFor documenting my library, Iβm using compodoc which allows to add additional markdown files (https://compodoc.github.io/website/guides/tips-and-tricks.html) to describe a component.
My libraries folder structure looks like this:
βββ my-exported-component/
βββ my-exported.component.ts
βββ my-exported.component.spec.ts
βββ my-exported.component.scss
βββ my-exported.component.html
βββ my-exported.module.ts
βββ my-exported.component.md
βββ my-not-exported-component/
βββ my-not-exported.component.ts
βββ my-not-exported.component.spec.ts
βββ my-not-exported.component.scss
βββ my-not-exported.component.html
βββ my-not-exported.module.ts
βββ my-not-exported.component.md
βββ package.json
βββ index.ts
// index.ts
export * from './my-exported-component/my-exported.module';
When I build with ng-packagr :
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"src": "src/my-lib/lib",
"dest": "dist/",
"lib": {
"entryFile": "index.ts"
}
}
it creates the dist
folder like this:
βββ dist/
βββ my-exported-component/
βββ my-exported.component.ts
βββ my-exported.module.ts
βββ my-exported.component.md
βββ my-not-exported-component/
βββ my-not-exported.component.md
βββ bundles/
βββ package.json
βββ etc..
It seems as ng-packagr copies all markdown files from all folders although I did not explicitly register these modules in my index.ts file. Is there a way to exclude them?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Building a library with dependent libraries defined via paths
When I trying a build lib which depends on other lib (in example case lib1) via ng build --project=lib1 ng-packagr builds a strange...
Read more >Angular library - Ng-packagr: entrypoint and styleIncludePaths
styleIncludePaths is meant to be used when you want to resolve global styles within your lib during main app build: https://github.com/ng-Β ...
Read more >Building an Angular Library with multiple entry points | Articles
In a newly created Angular library that's the only entry point that you have, and it exports all of your modules, components, services,...
Read more >Creating Secondary Entry Points for your Angular Library
To make secondary entry points, we need to tell ng-packagr which folder to look for. This can be achieved by creating another package....
Read more >Build an Angular Library With NgPackagr - Fireship
Inside this the lib folder create the following elements. src/ source code; package.json package definition; public_api.ts to export your publicΒ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @x1c0,
You can use version 1.4.1
npm install ng-packagr@1.4.1
instead of the newer version. Thereβs pull request merged to fixed this but still not released yet.Related code is here:
https://github.com/dherges/ng-packagr/blob/9de75241aba6bcf511d88a465e8ffbc5bf59b03c/src/lib/steps/package.ts#L234-L235
Before the secondary entrypoints feature, it was the following:
https://github.com/dherges/ng-packagr/blob/cc0657520a2ad021d08f6b0fd2077ebb361074f2/src/lib/ng-packagr.ts#L50-L52