Skip to content

Commit 2df505e

Browse files
author
johache
committed
Merge branch 'development'
2 parents 4bb7e0b + 51bc150 commit 2df505e

File tree

11 files changed

+1685
-813
lines changed

11 files changed

+1685
-813
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "third_party/adapter"]
2+
path = third_party/adapter
3+
url = https://github.com/webrtc/adapter.git

Gruntfile.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module.exports = function(grunt) {
1919

2020
source: 'source',
2121

22+
googleAdapterPath: 'third_party/adapter/adapter.js',
23+
2224
production: 'publish',
2325

2426
bamboo: 'bamboo',
@@ -117,7 +119,21 @@ module.exports = function(grunt) {
117119
options: {
118120
// Task-specific options go here.
119121
prefix: '@@',
120-
includesDir: '<%= pluginInfoRoot %>/',
122+
includesDir: '.',
123+
processIncludeContents: function (includeContents, localVars, filePath) {
124+
if (filePath.indexOf(grunt.config.get('googleAdapterPath')) != -1) {
125+
// Indent file and indent Google's exports
126+
return includeContents
127+
// Comment export
128+
.replace(/if \(typeof module \!\=\= 'undefined'\) \{(.|\n)*\}\n/gm, function(content) {
129+
return '/* Orginal exports removed in favor of AdapterJS custom export.\n' + content + '*/\n';
130+
})
131+
// Indent (2 spaces so far, to be updated as AJS evolves)
132+
.replace(/.*\n/g, function(line) { return ' ' + line; });
133+
} else { // not Google's AJS
134+
return includeContents;
135+
}
136+
},
121137
},
122138
// Files to perform replacements and includes with
123139
src: [

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "adapterjs",
33
"description": "Creating a common API for WebRTC in the browser",
4-
"version": "0.12.3",
4+
"version": "0.13.0",
55
"homepage": "https://temasys.github.io/",
66
"author": {
77
"name": "Temasys Communications Pte. Ltd.",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "adapterjs",
33
"description": "Creating a common API for WebRTC in the browser",
4-
"version": "0.12.3",
4+
"version": "0.13.0",
55
"homepage": "https://temasys.github.io/",
66
"author": {
77
"name": "Temasys Communications Pte. Ltd.",

0 commit comments

Comments
 (0)