Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d825ad8a
提交
d825ad8a
authored
8月 21, 2015
作者:
Joao Mesquita
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use string-replace and copy partials over
上级
147a6394
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
79 行增加
和
53 行删除
+79
-53
Gruntfile.js
html5/verto/verto_communicator/Gruntfile.js
+72
-46
index.html
html5/verto/verto_communicator/index.html
+1
-1
verto-service.js
html5/verto/verto_communicator/js/verto-service.js
+2
-2
package.json
html5/verto/verto_communicator/package.json
+4
-4
没有找到文件。
html5/verto/verto_communicator/Gruntfile.js
浏览文件 @
d825ad8a
...
...
@@ -20,7 +20,7 @@ module.exports = function (grunt) {
dist
:
'dist'
};
var
ip
=
grunt
.
option
(
'ip'
)
||
'localhost'
;
var
ip
=
grunt
.
option
(
'ip'
);
// Project configuration.
grunt
.
initConfig
({
...
...
@@ -35,7 +35,7 @@ module.exports = function (grunt) {
},
js
:
{
files
:
[
'js/verto-service.js'
],
tasks
:
[
'
include
replace:dev'
]
tasks
:
[
'
string-
replace:dev'
]
},
styles
:
{
files
:
[
'<%= config.app %>/css/{,*/}*.css'
],
...
...
@@ -47,25 +47,20 @@ module.exports = function (grunt) {
},
// Replace so we can have it properly passed from dev
includereplace
:
{
'string-replace'
:
{
dev
:
{
options
:
{
globals
:
{
ip
:
ip
},
files
:
{
'.tmp/js/verto-service.js'
:
'<%= config.app %>/js/verto-service.js'
},
src
:
'js/verto-service.js'
,
dest
:
'.tmp/js/verto-service.js'
},
prod
:
{
options
:
{
globals
:
{
ip
:
ip
},
},
src
:
'js/verto-service.js'
,
dest
:
'dist/js/'
}
replacements
:
[
{
pattern
:
'window.location.hostname'
,
replacement
:
ip
}
]
}
}
},
wiredep
:
{
app
:
{
...
...
@@ -87,9 +82,9 @@ module.exports = function (grunt) {
dist
:
{
files
:
[{
expand
:
true
,
cwd
:
'.tmp/
style
s/'
,
cwd
:
'.tmp/
cs
s/'
,
src
:
'{,*/}*.css'
,
dest
:
'.tmp/
style
s/'
dest
:
'.tmp/
cs
s/'
}]
}
},
...
...
@@ -120,6 +115,15 @@ module.exports = function (grunt) {
}
}
},
dist
:
{
options
:
{
port
:
9001
,
background
:
false
,
server
:
{
baseDir
:
[
'dist'
]
}
}
}
},
jshint
:
{
...
...
@@ -206,28 +210,34 @@ module.exports = function (grunt) {
}
},
htmlmin
:
{
dist
:
{
options
:
{
collapseBooleanAttributes
:
true
,
collapseWhitespace
:
true
,
conservativeCollapse
:
true
,
removeAttributeQuotes
:
true
,
removeCommentsFromCDATA
:
true
,
removeEmptyAttributes
:
true
,
removeOptionalTags
:
true
,
// true would impact styles with attribute selectors
removeRedundantAttributes
:
false
,
useShortDoctype
:
true
},
files
:
[{
expand
:
true
,
cwd
:
'<%= config.dist %>'
,
src
:
'{,*/}*.html'
,
dest
:
'<%= config.dist %>'
}]
}
},
// htmlmin: {
// dist: {
// options: {
// collapseBooleanAttributes: true,
// collapseWhitespace: true,
// conservativeCollapse: true,
// removeAttributeQuotes: true,
// removeCommentsFromCDATA: true,
// removeEmptyAttributes: true,
// removeOptionalTags: true,
// // true would impact styles with attribute selectors
// removeRedundantAttributes: false,
// useShortDoctype: true
// },
// files: [{
// expand: true,
// cwd: '<%= config.dist %>',
// src: '{,*/}*.html',
// dest: '<%= config.dist %>'
// },
// {
// expand: true,
// cwd: '<%= config.dist %>/partials',
// src: '{,*/}*.html',
// dest: '<%= config.dist %>/partials'
// }]
// }
// },
// ng-annotate tries to make the code safe for minification automatically
// by using the Angular long form for dependency injection.
ngAnnotate
:
{
...
...
@@ -251,6 +261,7 @@ module.exports = function (grunt) {
src
:
[
'*.{ico,png,txt}'
,
'*.html'
,
'partials/**/*.html'
,
'images/{,*/}*.{webp}'
,
'css/fonts/{,*/}*.*'
]
...
...
@@ -264,6 +275,11 @@ module.exports = function (grunt) {
cwd
:
'bower_components/bootstrap/dist'
,
src
:
'fonts/*'
,
dest
:
'dist'
},
{
expand
:
true
,
cwd
:
'bower_components/bootstrap-material-design/dist'
,
src
:
'fonts/*'
,
dest
:
'dist'
}]
},
styles
:
{
...
...
@@ -286,13 +302,23 @@ module.exports = function (grunt) {
},
});
grunt
.
registerTask
(
'serve'
,
[
'clean:server'
,
grunt
.
registerTask
(
'serve'
,
function
(
target
)
{
var
tasks
=
[
'clean:server'
,
'wiredep'
,
'concurrent:server'
,
'postcss'
,
'includereplace:dev'
,
'postcss'
];
if
(
ip
)
{
tasks
=
tasks
.
concat
([
'string-replace:dev'
,
'browserSync:livereload'
,
'watch'
]);
}
else
{
tasks
=
tasks
.
concat
([
'browserSync:livereload'
,
'watch'
]);
}
grunt
.
task
.
run
(
tasks
);
});
grunt
.
registerTask
(
'build'
,
[
'clean:dist'
,
...
...
@@ -307,7 +333,7 @@ module.exports = function (grunt) {
'copy:dist'
,
'filerev'
,
'usemin'
,
'htmlmin'
//
'htmlmin'
]);
};
html5/verto/verto_communicator/index.html
浏览文件 @
d825ad8a
...
...
@@ -23,7 +23,7 @@
<!-- endbuild -->
<!-- CSS -->
<!-- build:css(.
tmp) css/main
.css -->
<!-- build:css(.
) css/verto
.css -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"css/verto.css"
>
<!-- endbuild -->
...
...
html5/verto/verto_communicator/js/verto-service.js
浏览文件 @
d825ad8a
...
...
@@ -117,8 +117,8 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora
textTo
:
$cookieStore
.
get
(
'verto_demo_textto'
)
||
"1000"
,
login
:
$cookieStore
.
get
(
'verto_demo_login'
)
||
"1008"
,
password
:
$cookieStore
.
get
(
'verto_demo_passwd'
)
||
"1234"
,
hostname
:
$cookieStore
.
get
(
'verto_demo_hostname'
)
||
'@@ip'
,
wsURL
:
$cookieStore
.
get
(
'verto_demo_wsurl'
)
||
(
"wss://"
+
'@@ip'
+
":8082"
),
hostname
:
$cookieStore
.
get
(
'verto_demo_hostname'
)
||
window
.
location
.
hostname
,
wsURL
:
$cookieStore
.
get
(
'verto_demo_wsurl'
)
||
(
"wss://"
+
window
.
location
.
hostname
+
":8082"
),
useVideo
:
$cookieStore
.
get
(
'verto_demo_vid_checked'
)
||
true
,
useCamera
:
$cookieStore
.
get
(
'verto_demo_camera_checked'
)
||
true
,
useStereo
:
$cookieStore
.
get
(
'verto_demo_stereo_checked'
)
||
true
,
...
...
html5/verto/verto_communicator/package.json
浏览文件 @
d825ad8a
...
...
@@ -3,10 +3,10 @@
"version"
:
"0.0.1"
,
"description"
:
"HTML5 Based Communications application for use with FreeSWITCH and mod_verto"
,
"devDependencies"
:
{
"grunt-browser-sync"
:
"^2.1.2"
,
"browser-sync"
:
"^2.8.2"
,
"autoprefixer-core"
:
"^5.2.1"
,
"browser-sync"
:
"^2.8.2"
,
"grunt"
:
"^0.4.5"
,
"grunt-browser-sync"
:
"^2.1.2"
,
"grunt-concurrent"
:
"^1.0.0"
,
"grunt-contrib-clean"
:
"^0.6.0"
,
"grunt-contrib-concat"
:
"^0.5.0"
,
...
...
@@ -15,13 +15,13 @@
"grunt-contrib-htmlmin"
:
"^0.4.0"
,
"grunt-contrib-imagemin"
:
"^0.9.2"
,
"grunt-contrib-jshint"
:
"^0.11.0"
,
"grunt-postcss"
:
"^0.5.3"
,
"grunt-contrib-uglify"
:
"^0.7.0"
,
"grunt-contrib-watch"
:
"latest"
,
"grunt-filerev"
:
"^2.1.2"
,
"grunt-include-replace"
:
"^3.1.0"
,
"grunt-newer"
:
"^1.1.0"
,
"grunt-ng-annotate"
:
"^0.9.2"
,
"grunt-postcss"
:
"^0.5.3"
,
"grunt-string-replace"
:
"^1.2.0"
,
"grunt-svgmin"
:
"^2.0.0"
,
"grunt-usemin"
:
"^3.0.0"
,
"grunt-wiredep"
:
"^2.0.0"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论