Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ node_modules/
coverage/
.nyc_output/
temp
lcov.info

# Output of 'npm pack'
*.tgz
Expand Down
1 change: 1 addition & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
.git/
coverage/
node_modules/
lcov.info
10 changes: 2 additions & 8 deletions lib/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,9 @@ class Api {
const name = config.name().normalize('NFD');

try {
// we create the project using our scripts in this platform
// Creates the project and returns an instance of Api.
return createProject(dest, config.packageName(), name, options, config)
.then(function () {
// after platform is created we return Api instance based on new Api.js location
// Api.js has been copied to the new project
// This is required to correctly resolve paths in the future api calls
const PlatformApi = require(path.resolve(dest, 'cordova/Api'));
return new PlatformApi('browser', dest, externalEventEmitter);
});
.then(() => new Api('browser', dest, externalEventEmitter));
} catch (e) {
externalEventEmitter.emit('error', 'createPlatform is not callable from the browser project API.');
throw (e);
Expand Down
Loading
Loading