Skip to content
Merged
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
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ class CreateCordovaPlugin {
async generatePluginXml () {
const content = await this._renderEJSFile('plugin.xml.ejs');
const outputPath = path.join(this.location.pluginDir, 'plugin.xml');
return await formatAndWriteFile(outputPath, content, 'utf-8');
return await formatAndWriteFile(outputPath, content);
}

async generateFrontendAPI () {
const content = await this._renderEJSFile('api.js.ejs');
const outputPath = path.join(this.location.wwwDir, `${this.answers.apiName}.js`);
return await formatAndWriteFile(outputPath, content, 'utf-8');
return await formatAndWriteFile(outputPath, content);
}

async generateAndroidContent () {
Expand All @@ -124,7 +124,7 @@ class CreateCordovaPlugin {
*/
const content = await this._renderEJSFile('android.service.kt.ejs');
const outputPath = path.join(this.location.platformAndroid, `${this.answers.apiName}.kt`);
return await formatAndWriteFile(outputPath, content, 'utf-8');
return await formatAndWriteFile(outputPath, content);
}

async generateElectronContent () {
Expand All @@ -146,13 +146,13 @@ class CreateCordovaPlugin {

const content = await this._renderEJSFile('electron.service.js.ejs');
const outputPath = path.join(this.location.platformElectron, 'index.js');
return await formatAndWriteFile(outputPath, content, 'utf-8');
return await formatAndWriteFile(outputPath, content);
}

async generateiOSContent () {
const content = await this._renderEJSFile('ios.service.swift.ejs');
const outputPath = path.join(this.location.platformIos, `${this.answers.apiName}.swift`);
return await formatAndWriteFile(outputPath, content, 'utf-8');
return await formatAndWriteFile(outputPath, content);
}

async _renderEJSFile (fileName) {
Expand Down