Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install @fireworks-js/angular #123

Open
Tyler-V opened this issue Jul 25, 2024 · 3 comments
Open

Cannot install @fireworks-js/angular #123

Tyler-V opened this issue Jul 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Tyler-V
Copy link

Tyler-V commented Jul 25, 2024

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

image

Which package are you using?

@fireworks-js/angular

fireworks-js version

^2.10.8

Browser

Version 127.0.6533.72 (Official Build) (64-bit)

@Tyler-V Tyler-V added the bug Something isn't working label Jul 25, 2024
@crashmax-dev
Copy link
Owner

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? 🤔

@Tyler-V
Copy link
Author

Tyler-V commented Jul 25, 2024

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"
  },

@Tyler-V
Copy link
Author

Tyler-V commented Jul 26, 2024

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();
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants