question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[PR WELCOME] Discover primary and secondary entry points from user configuration

See original GitHub issue

Type of Issue

[ ] Bug Report
[x] Feature Request

Description

Historically, a package.json and a ng-package.json are used to “configure” ng-packagr. The package.json is used for the module ID, npm metadata, and more node/npm-related things. The ng-package.json is used for destination paths, finding the entry file of an entry point, and angular/typescript/rollup-specific things.

Entry point discovery should be changed, see below. Discovery of primary and secondary entry points should both use this.

Expected Behaviour

New Draft / Outline (first one “wins”):

  • package.json: ngPackage
  • ng-package.json (requires a package.json as sibling)
  • ng-package.js (default export, requires a package.json as sibling)

Note: ignore package.json w/o ngPackage property.

Version Information

ng-packagr: v2.0.0-rc.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
gnomeontheruncommented, Oct 27, 2017

I personally don’t like adding stuff into package.json files. I don’t have a problem with specific files for specific tools, because things stay organized and don’t overload another file.

Having a ng-package.js type config file would be great should there be a need to write configuraiton/plugin type values, like what webpack does. For example, what if I wanted to write additional logic to copy files or something pre/post bundling, perhaps you could provide hooks during the build lifecycle to run tasks. Just a thought.

0reactions
github-actions[bot]commented, Jun 19, 2020

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating Secondary Entry Points for your Angular Library
In this article, we will take a look at how we can utilise ng-packagr secondary entry points to split our Angular Library even...
Read more >
ng-packagr/secondary-entrypoints.md at main - GitHub
For library developers, secondary entry points are configured by adding a ng-package.json file in subdirectories of the main package.json file's folder!
Read more >
Building an Angular Library with multiple entry points | Articles
So let's build a new Angular library from scratch and see how we can create secondary entry points. What are entry points. A...
Read more >
Angular Libraries Adding Secondary EntryPoints - YouTube
This is the second part of Angular Libraries, where we add a secondary entrypoint to make Angular libraries Tree-shakable.
Read more >
Use ArriveCAN for a faster border experience - Canada.ca
Travellers arriving in Canada at certain airports can save time at the border by submitting their customs and immigration declaration in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found