Since 7.2.5 the "main" property in the "package.json" of WebRTC adapter
points to an ES6 file which does not provide "module.exports" but
"exports.default". Due to this uses of "var adapter =
require('webrtc-adapter');" now fail, as the properties of the module
are loaded in "adapter.default" instead of in "adapter". To restore the
previous and expected behaviour a Babel plugin is now used to also add
"module.exports" if "exports.default" exists.
As WebRTC adapter still provides an ES5 file an alternative solution
would have been to alias "webrtc-adapter" to that file with
'--transform [ aliasify --global --aliases [ --webrtc-adapter
"webrtc-adapter/dist/adapter_core5.js" ] ]'.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
As the JavaScript files are versioned again they should not be rebuilt
before packing a release; otherwise the JavaScript files in the package
could be different than the ones in the version control system.
As the JavaScript files are no longer built it is not needed either to
set up the development environment; however, it is still necessary to
remove the build directory before packaging the release, so this is now
explicitly done.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Currently there are no JavaScript unit tests, so the related stuff can
be removed and added later if/when needed.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Dependencies declared in "package.json" are installed locally, so the
call to the handlebars script must be updated accordingly.
To ensure that Handlebars is installed before using it the Make step to
compile the templates now depends on the step to setup the development
environment.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>