fireworks-js
fireworks-js copied to clipboard
Cannot install @fireworks-js/angular
Description
It looks like the dependency graph for this package is pointing to @angular/common ^12.0.0 while the latest angular version is 18.x.x
Which package are you using?
@fireworks-js/angular
fireworks-js version
^2.10.8
Browser
Version 127.0.6533.72 (Official Build) (64-bit)
Hi 👋 I don't write in Angular myself and have no idea how to maintain this a package. Maybe should bump version of Angular and just release a minor update or extend semver in peer depends? 🤔
Hi @crashmax-dev
Yes in the package (unless there is desire to support <18) it should be sufficient to update and publish,
https://github.com/crashmax-dev/fireworks-js/blob/master/packages/angular/projects/ng-fireworks/package.json
"peerDependencies": {
"@angular/common": ">= 18.0.0",
"@angular/core": ">= 18.0.0"
},
I have pulled it down as a directive in my project and installed fireworks-js directly for the time being
As a standalone component, you can export the directive now and remove the module as well
import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';
import type { FireworksOptions } from 'fireworks-js';
import { Fireworks } from 'fireworks-js';
@Directive({
selector: '[ngFireworks], ng-fireworks',
exportAs: 'ngFireworks',
standalone: true
})
export class FireworksJsDirective extends Fireworks implements OnInit, OnDestroy {
constructor(elRef: ElementRef) {
super(elRef.nativeElement);
}
@Input() options!: FireworksOptions;
public ngOnInit() {
this.updateOptions(this.options);
this.updateSize();
this.start();
}
public ngOnDestroy(): void {
this.stop();
}
}