Comments (8)
What bothers me is adding another mandatory dependency to the library. I'm not 100% sure about this, but let me take a look first, I haven't used this library myself.
You could add a sub-module in a sub-folder by adding a package.json
file like this one:
{
"name": "ngx-date-fns/tz",
"private": true,
"ngPackage": {
"lib": {
"entryFile": "./src/public-api.ts"
}
},
"peerDependencies": {
"@angular/common": ">=8",
"@angular/core": ">=8",
"date-fns": ">=2",
"date-fns-tz": ">=2"
}
}
from ngx-date-fns.
Example here: https://github.com/ng-packagr/ng-packagr/blob/master/integration/samples/secondary/sub-module/package.json
from ngx-date-fns.
Docs here: https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md
from ngx-date-fns.
Hi @vhdirk, thanks for your suggestion.
What bothers me is adding another mandatory dependency to the library. I'm not 100% sure about this, but let me take a look first, I haven't used this library myself.
from ngx-date-fns.
Thank's @LayZeeDK,
I had no idea this could be done. Researching right know 👍
from ngx-date-fns.
I also found this very detailed article: https://medium.com/tunaiku-tech/creating-secondary-entry-points-for-your-angular-library-1d5c0e95600a
I will look into all of this more thoroughly next weekend.
from ngx-date-fns.
Hey, It's been a long time since this was posted and there hasn't been much interest in this. I'm closing the issue.
Thanks!
from ngx-date-fns.
As it turns out, having dependencies in a secondary entry point isn't supported by any package managers so it wouldn't have made a difference. There are ways to mark peer dependencies as optional in the primary entry point's package.json
file though.
from ngx-date-fns.
Related Issues (20)
- Pipes isToday, isWeekend, isSameMonth HOT 4
- IsSameYear pipe HOT 3
- Add dfnsParseIso pipe HOT 2
- Allow empty value (Prevent throwing "Invalid time value") HOT 4
- Documentation for lazy loaded modules HOT 1
- Support `strictTemplates` / All pipes should accept null and undefined HOT 4
- ngx-date-fns.js depends on 'date-fns/parseISO'. CommonJS or AMD dependencies can cause optimization bailouts HOT 7
- FR: Add *Duration pipes HOT 2
- IsEqual Pipe HOT 2
- "CommonJS or AMD" warnings HOT 9
- Documentation about tree shaking is not correct HOT 2
- FR: dfnsFormatRelativeToNow HOT 4
- is*() functions are missing HOT 5
- What is the amLocal equivalent of ngx-moment? HOT 2
- Angular 13 : "Encourage the library authors to publish an Ivy distribution" HOT 8
- Angular 14 support HOT 7
- Angular 16 support HOT 4
- date-fns 3.x support HOT 5
- Auto-detect language HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-date-fns.