MIT License

项目介绍

FirebaseExtended/emberfire 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 687 个 Star、257 次 Fork。

仓库全名
FirebaseExtended/emberfire
开源许可证
MIT License
Star 数
687
Fork 数
257
未关闭 Issue
59

README 摘要

Status This repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis. WARNING: Master branch is the work in progress for version 3 of Emberfire. You can find version 2 here, if you're looking for documentation or to contribute to stable. Learn more about the rewrite effort here. Why EmberFire…

完整内容见 GitHub 原始 README 或本页 。

常见问题

emberfire 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 687 个 Star。

emberfire 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 emberfire 的源码?

可以直接克隆仓库:git clone https://github.com/FirebaseExtended/emberfire.git;安装与运行步骤见仓库 README。

emberfire 最近还在维护吗?

仓库最近一次更新为 2025年2月13日,当前有 59 个未关闭 Issue;Star 数为 687,可作为社区活跃度的参考。

关于

The officially supported adapter for using Firebase with Ember

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

HTML
Handlebars
JavaScript
Shell
TypeScript

Release

README

EmberFire Build Status Version Monthly Downloads Ember Observer Score

Status

Status: Experimental

This repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.


WARNING: Master branch is the work in progress for version 3 of Emberfire. You can find version 2 here, if you’re looking for documentation or to contribute to stable. Learn more about the rewrite effort here.


Why EmberFire?

  • Developed by experts - Developed and maintained by the Firebase team
  • Ember Data Adapters - Cloud Firestore and Realtime Database adapters for Ember Data allow you to persist your models in Firebase
  • Ember Services - firebase and firebase-app services allow direct access to the underlying Firebase SDK instance
  • Realtime Bindings - Listen for realtime updates to your Firebase backed Ember Data models using the provided realtime-listener service or the RealtimeRouteMixin
  • Authentication Providers - Integrate Firebase Authentication with your Ember application easily with providers for Ember Simple Auth and Torii
  • Analytics Collection - The AnalyticsRouteMixin adds Google Analytics screen tracking to your Ember Router.
  • Offline Enabled - Persist Ember Data models offline automatically with FirestoreAdapter
  • Fastboot Compatible - Perform initial rendering and fetching of your models server-side to increase application performance

Installation

$ ember install emberfire@next

Example use

// app/adapters/application.js
import FirestoreAdapter from 'emberfire/adapters/firestore';

export default FirestoreAdapter.extend({
    enablePersistence: true,
    persistenceSettings: { synchronizeTabs: true }
});
// app/models/article.js
import DS from 'ember-data';
const { attr, belongsTo, hasMany } = DS;

export default DS.Model.extend({
    title: attr('string'),
    body: attr('string'),
    publishedAt: attr('date'),
    author: belongsTo('user'),
    comments: hasMany('comments', { subcollection: true }),
});
// app/routes/articles.js
import Route from '@ember/routing/route';
import RealtimeRouteMixin from 'emberfire/mixins/realtime-route';
import PerformanceRouteMixin from 'emberfire/mixins/performance-route';

export default Route.extend(RealtimeRouteMixin, PerformanceRouteMixin, {
    model() {
        return this.store.query('article', { orderBy: 'publishedAt' });
    }
});
// app/routes/application.js
import AnalyticsRouteMixin from 'emberfire/mixins/analytics-route';
import Route from '@ember/routing/route';

export default Route.extend(AnalyticsRouteMixin);

Documentation

Compatibility

Please consult this table when selecting your version of EmberFire and Firebase SDK:

Ember Data EmberFire Firebase SDK
3.0+ 3.x 5.x
2.3+ 2.x 3.x
2.0 - 2.2 1.6.x 2.x
1.13 1.5.x 2.x

Migration Guides

Contributing

If you’d like to contribute to EmberFire, please first read through our contribution guidelines. Local setup instructions are available here.

评论

暂无评论