Skip to content

Commit bc79233

Browse files
author
czhou
committed
version 0.1.0
0 parents  commit bc79233

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+133293
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bower_components
2+
node_modules
3+
test/browser/specs.browser.js

.jscsrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"preset": "google",
3+
"maximumLineLength": null
4+
}

.jshintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"node": true,
3+
"mocha": true,
4+
"predef": ["Promise"]
5+
}

Gruntfile.js

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
module.exports = function(grunt) {
2+
require('load-grunt-tasks')(grunt);
3+
4+
var SAUCE_BROWSERS = [{
5+
browserName: 'chrome'
6+
}, {
7+
browserName: 'internet explorer',
8+
version: '10.0'
9+
}];
10+
11+
var HINT_SRCS = ['src/**/*.js', 'test/**/*.js', '*.js', '!**/*.browser.js'];
12+
13+
grunt.initConfig({
14+
watch: {
15+
scripts: {
16+
files: HINT_SRCS,
17+
tasks: ['hint', 'release']
18+
},
19+
},
20+
babel: {
21+
dist: {
22+
files: [{
23+
expand: true,
24+
cwd: 'src/',
25+
src: '**/*.js',
26+
dest: 'lib/'
27+
}]
28+
}
29+
},
30+
browserify: {
31+
dist: {
32+
files: {
33+
'dist/ML.im.js': ['lib/ML.im.js']
34+
}
35+
},
36+
test: {
37+
files: {
38+
'test/browser/specs.browser.js': 'test/specs.js'
39+
},
40+
options: {
41+
transform: ['envify']
42+
}
43+
}
44+
},
45+
uglify: {
46+
dist: {
47+
files: {
48+
'dist/ML.im.js': ['dist/ML.im.js']
49+
}
50+
}
51+
},
52+
connect: {
53+
server: {
54+
options: {
55+
port: 8000,
56+
base: ''
57+
}
58+
}
59+
},
60+
simplemocha: {
61+
options: {
62+
timeout: 20000,
63+
ui: 'bdd'
64+
},
65+
all: {
66+
src: ['test/specs.js']
67+
}
68+
},
69+
'mocha_phantomjs': {
70+
all: {
71+
options: {
72+
urls: [
73+
'http://localhost:8000/test/browser/'
74+
]
75+
}
76+
}
77+
},
78+
'saucelabs-mocha': {
79+
all: {
80+
options: {
81+
urls: ['http://localhost:8000/test/browser/'],
82+
build: process.env.CI_BUILD_NUMBER,
83+
testname: 'Sauce Test for LeanCloud realtime SDK',
84+
browsers: SAUCE_BROWSERS,
85+
throttled: 3,
86+
tunnelArgs: ['--vm-version', 'dev-varnish']
87+
}
88+
}
89+
},
90+
jshint: {
91+
all: {
92+
src: HINT_SRCS,
93+
options: {
94+
jshintrc: true
95+
}
96+
}
97+
},
98+
jscs: {
99+
src: HINT_SRCS
100+
}
101+
});
102+
grunt.registerTask('default', []);
103+
grunt.registerTask('hint', ['jshint', 'jscs']);
104+
grunt.registerTask('sauce', ['babel', 'browserify:test', 'connect', 'saucelabs-mocha']);
105+
grunt.registerTask('test', '', function() {
106+
var tasks = ['hint', 'babel', 'browserify:test', 'connect', 'simplemocha'];
107+
if (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) {
108+
tasks.push('saucelabs-mocha');
109+
} else {
110+
grunt.log.writeln('Skip saucelabs test, set SAUCE_USERNAME and SAUCE_ACCESS_KEY to start it.');
111+
}
112+
grunt.task.run(tasks);
113+
});
114+
grunt.registerTask('release', ['babel', 'browserify:dist']);
115+
grunt.registerTask('dev', ['hint', 'release', 'connect', 'watch']);
116+
var fs = require('fs');
117+
};

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# JavaScript实时通信SDK
2+
3+
## 使用方法请看 [官方文档]()

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## 0.1.0
2+
### Features
3+
* 好友
4+
* 群组
5+
* 聊天室

demo/Chat/css/app.css

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
#basic-addon1 {
2+
min-width: 80px;
3+
}
4+
.input-group {
5+
margin-bottom: 20px;
6+
}
7+
8+
.ToolBar{
9+
width: 10%;
10+
height: 100%;
11+
float: left;
12+
height: 600px;
13+
border: 1px ;
14+
border-color: #f8f8f8;
15+
border-style: solid;
16+
border-collapse: collapse;
17+
}
18+
19+
.ConvList{
20+
width: 30%;
21+
height: 100%;
22+
float: left;
23+
height: 600px;
24+
border: 1px ;
25+
border-color: #f8f8f8;
26+
border-style: solid;
27+
border-collapse: collapse;
28+
}
29+
30+
.ConvMain{
31+
width: 60%;
32+
height: 100%;
33+
float: left;
34+
height: 600px;
35+
border: 1px ;
36+
border-color: #f8f8f8;
37+
border-style: solid;
38+
border-collapse: collapse;
39+
}
40+
41+
.Bar{
42+
width: 100%;
43+
padding: 10px;
44+
margin-top: 40px;
45+
}
46+
47+
.tab-content {
48+
margin-top: 20px;
49+
}
50+
51+
.Conversation{
52+
width: 100%;
53+
height: 70px;
54+
padding: 5px;
55+
padding-left: 15px;
56+
line-height: 60px;
57+
margin: 2px;
58+
}
59+
60+
.Conversation .icon{
61+
float: left;
62+
margin-right: 10px;
63+
height:60px;
64+
line-height: 60px;
65+
}
66+
67+
.Conversation .icon i{
68+
line-height: 60px;
69+
}
70+
71+
.Conversation .unread {
72+
line-height: 60px;
73+
float: right;
74+
margin-right: 10px;
75+
}
76+
77+
.Conversation .name{
78+
float: left;
79+
font-size: 36px;
80+
line-height: 60px;
81+
height:60px;
82+
}
83+
84+
.Conversation .online{
85+
float: left;
86+
margin-left: 10px;
87+
}
88+
89+
.Conversation .msgs{
90+
float: right;
91+
}
92+
93+
.Header {
94+
margin-bottom: 0px;
95+
}
96+
97+
.add-member{
98+
float: right;
99+
}
100+
101+
.ConvBox {
102+
padding: 10px;
103+
height: 440px;
104+
overflow: scroll;
105+
}
106+
107+
.ConvMsg {
108+
width: 100%;
109+
height: 40px;
110+
font-size: 24px;
111+
line-height: 40px;
112+
}
113+
114+
.ConvInput {
115+
padding: 10px;
116+
height: 120px;
117+
padding-top: 30px;
118+
}
119+
.show {
120+
display: block;
121+
}
122+
123+
.hide {
124+
display: none;
125+
}
126+
127+
.other {
128+
text-align: left;
129+
}
130+
131+
.me {
132+
text-align: right;
133+
}

demo/Chat/css/bootstrap-theme.min.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/Chat/css/bootstrap.min.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)