-
Notifications
You must be signed in to change notification settings - Fork 9
Feather dependency #6
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
Conversation
Just coming back to this, have just realised this only works when the project requiring
Back to the drawing board, perhaps? 🙁 🙂 |
Hey @craigrodway, thanks for the PR/suggestion! Sorry for the late response, I'm a bit inactive on GitHub at the moment. I don't have time at the moment to look into this at depth right now, but I'll try to within a few days. |
Hey! No problem at all :) That's fine, no rush. I'm still not sure if it's the best way to do it, and am still looking at alternatives :) |
@craigrodway @Pixelrobin Hey guys can we get this running? I would really appreciate it. |
Hello all, this project has been on the back burner for me for far too long, apologies for that, it's totally my bad. I do appreciate your experimentation though! I think there are two outstanding concerns I have about it:
I like the idea of loading from a JSON file though, that seems a lot more sensible. Perhaps as a dead simple alternative to start we can version the icons in the repo as a JSON and get rid of the node to PHP build step? |
I definitely like some aspects of this. I've been looking more into what it would be like to decouple Feather Icons from the project and I think as nice as it would be there are a few reasons I'd prefer to not add the extra dependency.
What I'm currently thinking is that we use assets packagist as a dev dependency and use Thanks for your contribution here @craigrodway! |
Superseded by #30. Thanks @craigrodway for your contribution! |
Hi! 👋
I've been thinking about #3 and ways this could be done - or achieve a similar result.
Not sure if you're aware of https://asset-packagist.org/, but essentially it allows PHP projects to pull in packages from Bower or npm registries as if they were regular PHP packages. If php-feather is updated to require the npm package for feather-icons, it should remove the need to re-build this package on every Feather update.
This means projects that require php-feather also require npm-asset/feather-icons - which means they can use the most recently published version which this library will then use (instead of the bundled ones). This does impact the way the icons are loaded, how it is tested, and no longer requires building. But it seems to work.
This PR includes the following changes:
icons.json
file from the npm package. This is only 52kb at the moment - so I think any performance/memory concerns of the single JSON file loaded vs loading each file on-demand separately isn't anything to be worried about. This sort of resolves Preload all icons #5 too!This also essentially removes the requirement on NodeJS for development/building. I haven't removed those yet, but don't mind doing that and some tidying-up if you're happy with the changes and direction. Look forward to hearing your thoughts!