Skip to content

Commit

Permalink
plugin's json name is unified to (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
knight9999 authored and erisu committed Oct 31, 2018
1 parent ce73690 commit fb7acc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bin/templates/cordova/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function setupEvents (externalEventEmitter) {

class Api {
constructor (platform, platformRootDir, events) {
this.platform = 'electron';
this.platform = 'cordova-electron';

// MyApp/platforms/electron
this.root = path.resolve(__dirname, '..');
Expand Down Expand Up @@ -330,7 +330,6 @@ class Api {
const wwwDest = options.usePlatformWww ?
this.getPlatformInfo().locations.platformWww :
this.handler.www_dir(this.root);

if (type === 'asset') {
installer.install(item, plugin_dir, wwwDest);
} else if (type === 'js-module') {
Expand Down
2 changes: 1 addition & 1 deletion bin/templates/cordova/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = {

const moduleDestination = path.resolve(www_dir, 'plugins', plugin_id, jsModule.src);

fs.ensureDirSync('-p', path.dirname(moduleDestination));
fs.ensureDirSync(path.dirname(moduleDestination));
fs.writeFileSync(moduleDestination, scriptContent, 'utf-8');
},
uninstall: (jsModule, www_dir, plugin_id) => {
Expand Down

0 comments on commit fb7acc9

Please sign in to comment.