npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wildchat

v0.6.0

Published

wilddog

Downloads

2

Readme

demo-js-wildchat — Wilddog 开源实时聊天应用

Wildchat 是使用 Wilddog 一个开源的、实时的聊天应用。它提供完全多用户,多房间,用户搜索,站内短信,聊天邀请等等。

在线示例

访问 wildchat.wilddogapp.com 查看 Wildchat 在线示例.

 在 Wildchat 演示聊天截图

在线文档

 在 Wildchat 在线文档

下载

Wildchat 工作原理简单,前提是在你的应用程序正确的依赖它,并配置 Wilddog 帐户系统。 为了在你的项目使用 Wildchat, 需要包括 HTML 在内的以下文件:

<!-- jQuery -->
<script src='http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js'></script>

<!-- Wilddog -->
<script src='https://cdn.wilddog.com/sdk/js/2.3.9/wilddog.js'></script>

<!-- Wildchat -->
<link rel='stylesheet' href='https://cdn.wilddog.com/app/wildchat/0.6.0/wildchat.min.css' />
<script src='https://cdn.wilddog.com/app/wildchat/0.6.0/wildchat.min.js'></script>

使用上面提到的URL可以从Wilddog的CDN上下载到Wildchat的精简版和非精简版。你也可以从Wilddog的Github中下载他们。当然啦,Wilddog可以在官网上下载。

你也可以通过npm 或者 bowr安装Wildchat, 他们会自动下载依赖。

$ npm install wildchat --save
$ bower install wildchat --save

示例代码

  • 添加用户登录
<script>
// Create a new Wilddog reference, and a new instance of the Login client
var config = {
  authDomain: "<appId>.wilddog.com",
  syncURL: "https://<appId>.wilddogio.com",
};
wilddog.initializeApp(config);

var chatRef = wilddog.sync();
var auth = wilddog.auth();
var weiboProvider = new wilddog.auth.WeiboAuthProvider();

function login() {
  wilddog.auth().signInWithPopup(weiboProvider).then(function (user) {
    //  一旦通过验证,Wildchat实例携带我们的用户ID和用户名
    initChat(user);
  }).catch(function (error) {
     console.log(error);
  });
}

</script>

<a href='#' onclick='login();'>登录微博</a>
  • 初始化一个聊天。
<script>
function initChat(authData) {
  var chat = new WildchatUI(chatRef, document.getElementById('wildchat-wrapper'));
  chat.setUser(authData.uid, authData.displayName);
}
</script>

<div id='wildchat-wrapper'></div>

注册Wilddog

Wildchat 需要 Wilddog 来同步和存储数据。您可以在这里注册一个免费帐户。

更多示例

这里分类汇总了 WildDog平台上的示例程序和开源应用, 链接地址:https://github.com/WildDogTeam/wilddog-demos

支持

如果在使用过程中有任何问题,请提 issue ,我会在 Github 上给予帮助。

相关文档

License

MIT http://wilddog.mit-license.org/

感谢 Thanks

demo-js-wildchat is built on and with the aid of several projects. We would like to thank the following projects for helping us achieve our goals:

Open Source:

  • firechat Real-time Chat powered by Firebas
  • JQuery The Write Less, Do More, JavaScript Library