Skip to content

docs: Creating Libraries Guide should include guidance on CSS/assets #33141

@Splaktar

Description

@Splaktar

📚 Docs or angular.io bug report

Description

I spent some time in January working on a new library. One thing that is missing from the new Library guide, and not supported out of the box (but generally required by most library authors) in the Angular CLI or ng-packagr, is shipping assets or theme SCSS files with your library. This issue (angular/angular-cli#11071) and many other linked/closed issues with hundreds of 👍 indicate that this is a major need and at minimum that the docs to work around this are not available.

It appears that the general guidance for SCSS is to use the scss-bundle package similar to what Angular Material does. For assets, it appears that manually copying them via npm scripts is the most common approach.

I can understand some hesitation to include details about library-specific implementation that could cause some kind of support burden.

However, the other perspective is that library authors see the docs and get started and then get completely stuck on assets and scss files (like many hundreds have already run into), etc with no references for how to proceed. They will then continue to open duplicate issues in the Angular CLI GitHub.

Perhaps there is some kind of happy medium between providing them with some starting points on how to handle this without providing them a fully supported solution that doesn’t exist yet. Even telling/reminding people that you can just use regular command line copy commands to move assets via NPM scripts would help people rather than them having to dig through a lot of closed GitHub issues to find examples that work.

🔬 Minimal Reproduction

What's the affected URL?**

@jbogarthyde I haven't had time to write up some proposed copy for this, but I wanted to at least create the issue.

Metadata

Metadata

Assignees

Labels

featureLabel used to distinguish feature request from other issuesfreq1: lowrisk: low

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions