Skip to content

Commit b5d2d30

Browse files
author
johache
committed
Merge branch 'development'
Conflicts: publish/adapter.min.js publish/adapter.screenshare.min.js source/adapter.plugin.rtc.adapter.js
2 parents e28208d + 77541d0 commit b5d2d30

30 files changed

+3629
-3350
lines changed

Gruntfile.js

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ module.exports = function(grunt) {
115115
},
116116

117117
includereplace: {
118-
production: {
118+
withGoogle: {
119119
options: {
120120
// Task-specific options go here.
121-
prefix: '@@',
121+
prefix: '@Goo@',
122122
includesDir: '.',
123123
processIncludeContents: function (includeContents, localVars, filePath) {
124-
if (filePath.indexOf(grunt.config.get('googleAdapterPath')) != -1) {
124+
if (filePath.indexOf(grunt.config.get('googleAdapterPath')) !== -1) {
125125
// Indent file and indent Google's exports
126126
return includeContents
127127
// Comment export
@@ -141,7 +141,20 @@ module.exports = function(grunt) {
141141
],
142142
// Destination directory to copy files to
143143
dest: './'
144-
}
144+
},
145+
withPluginInfo: {
146+
options: {
147+
// Task-specific options go here.
148+
prefix: '@Tem@',
149+
includesDir: '<%= pluginInfoRoot %>/',
150+
},
151+
// Files to perform replacements and includes with
152+
src: [
153+
'<%= production %>/*.js',
154+
],
155+
// Destination directory to copy files to
156+
dest: './'
157+
},
145158
},
146159

147160
jshint: {
@@ -159,7 +172,8 @@ module.exports = function(grunt) {
159172
node: true
160173
}, grunt.file.readJSON('.jshintrc')),
161174
src: [
162-
'tests/*_test.js'
175+
'tests/*.js',
176+
'tests/unit/*.js'
163177
]
164178
},
165179
app: {
@@ -279,6 +293,13 @@ module.exports = function(grunt) {
279293
grunt.log.writeln('bamboo/vars file successfully created');
280294
});
281295

296+
grunt.registerTask('CheckSubmodules', 'Checks that third_party/adapter is properly checked out', function() {
297+
if(!grunt.file.exists(grunt.config.get('googleAdapterPath'))) {
298+
grunt.fail.fatal('Couldn\'t find ' + grunt.config.get('googleAdapterPath') + '\n' +
299+
'Output would be incomplete. Did you remember to initialize submodules?\nPlease run: git submodule update --init');
300+
}
301+
});
302+
282303
grunt.registerTask('CheckPluginInfo', 'Checks for existing config file', function() {
283304
var fullPath = grunt.config.get('pluginInfoRoot') + '/' + grunt.config.get('pluginInfoFile');
284305
grunt.verbose.writeln('Checking that the plugin info file exists.');
@@ -290,18 +311,24 @@ module.exports = function(grunt) {
290311
}
291312
});
292313

293-
grunt.registerTask('dev', [
294-
'CheckPluginInfo',
295-
'versionise',
296-
'clean:production',
297-
'concat',
298-
'replace:production',
299-
'includereplace:production',
300-
'uglify'
301-
]);
314+
// NOTE(J-O) Prep for webrtc-adapter 0.2.10, will need to be compiled
315+
grunt.registerTask('webrtc-adapter', 'Build the webrtc-adapter submodule', function() {
316+
grunt.verbose.writeln('Spawning child process to compile webrtc-adapter subgrunt.');
317+
var done = this.async();
318+
var child = grunt.util.spawn({
319+
grunt: true,
320+
args: ['--gruntfile', './third_party/adapter/Gruntfile.js', 'build'],
321+
opts: {stdio: 'inherit'},
322+
}, function(error, result) {});
323+
child.on('close', function (code) {
324+
done(code === 0);
325+
});
326+
});
302327

303328
grunt.registerTask('publish', [
329+
'CheckSubmodules',
304330
'CheckPluginInfo',
331+
// 'webrtc-adapter',
305332
'versionise',
306333
'clean:production',
307334
'concat',

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.13.0",
4+
"version": "0.13.1",
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.13.0",
4+
"version": "0.13.1",
55
"homepage": "https://temasys.github.io/",
66
"author": {
77
"name": "Temasys Communications Pte. Ltd.",

0 commit comments

Comments
 (0)