Skip to content

Commit 5493cef

Browse files
ivanovitrosen-vladimirov
authored andcommitted
Fix the linter
1 parent 9aabb6c commit 5493cef

File tree

4 files changed

+338
-338
lines changed

4 files changed

+338
-338
lines changed

lib/bootstrap.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,6 @@ $injector.require('playgroundService', './services/playground-service');
162162
$injector.require("platformEnvironmentRequirements", "./services/platform-environment-requirements");
163163
$injector.require("nativescriptCloudExtensionService", "./services/nativescript-cloud-extension-service");
164164

165-
$injector.requireCommand("resources|generate|icons", "./commands/generate-assets")
166-
$injector.requireCommand("resources|generate|splashes", "./commands/generate-assets")
165+
$injector.requireCommand("resources|generate|icons", "./commands/generate-assets");
166+
$injector.requireCommand("resources|generate|splashes", "./commands/generate-assets");
167167
$injector.requirePublic("assetsGenerationService", "./services/assets-generation/assets-generation-service");

lib/commands/generate-assets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export class GenerateSplashScreensCommand extends GenerateCommandBase implements
4747
}
4848
}
4949

50-
$injector.registerCommand("resources|generate|splashes", GenerateSplashScreensCommand);
50+
$injector.registerCommand("resources|generate|splashes", GenerateSplashScreensCommand);

lib/services/assets-generation/assets-generation-service.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
import * as path from "path";
22
import * as Jimp from "jimp";
33
import * as Color from "color";
4-
import { Icons, SplashScreens, Operations } from "./image-definitions"
4+
import { Icons, SplashScreens, Operations } from "./image-definitions";
55
import { exported } from "../../common/decorators";
66

77
export class AssetsGenerationService implements IAssetsGenerationService {
88
constructor(private $logger: ILogger,
9-
private $androidResourcesMigrationService: IAndroidResourcesMigrationService) {
9+
private $androidResourcesMigrationService: IAndroidResourcesMigrationService) {
1010
}
11-
11+
1212
@exported("assetsGenerationService")
1313
public async generateIcons(resourceGenerationData: IResourceGenerationData): Promise<void> {
1414
this.$logger.info("Generating icons ...");
15-
await this.generateImagesForDefinitions(resourceGenerationData.imagePath, resourceGenerationData.resourcesPath, Icons)
15+
await this.generateImagesForDefinitions(resourceGenerationData.imagePath, resourceGenerationData.resourcesPath, Icons);
1616
this.$logger.info("Icons generation completed.");
1717
}
1818

1919
@exported("assetsGenerationService")
2020
public async generateSplashScreens(splashesGenerationData: ISplashesGenerationData): Promise<void> {
2121
this.$logger.info("Generating splash screens ...");
22-
await this.generateImagesForDefinitions(splashesGenerationData.imagePath, splashesGenerationData.resourcesPath, SplashScreens, splashesGenerationData.background)
22+
await this.generateImagesForDefinitions(splashesGenerationData.imagePath, splashesGenerationData.resourcesPath, SplashScreens, splashesGenerationData.background);
2323
this.$logger.info("Splash screens generation completed.");
2424
}
2525

2626
private async generateImagesForDefinitions(imagePath: string, resourcesPath: string, definitions: any[], background: string = "white") : Promise<void> {
2727
const hasMigrated = this.$androidResourcesMigrationService.hasMigrated(resourcesPath);
28-
29-
for (let definition of definitions) {
28+
29+
for (const definition of definitions) {
3030
const operation = definition.operation || Operations.Resize;
3131
const scale = definition.scale || 0.8;
32-
const path = hasMigrated ? definition.path : (definition.pathBeforeMigration || definition.path)
32+
const path = hasMigrated ? definition.path : (definition.pathBeforeMigration || definition.path);
3333
const outputPath = this.convertToAbsolutePath(resourcesPath, path);
3434

3535
switch (operation) {
@@ -68,7 +68,7 @@ export class AssetsGenerationService implements IAssetsGenerationService {
6868
image = image.composite(overlayImage, centeredWidth, centeredHeight);
6969
}
7070

71-
image.write(outputPath)
71+
image.write(outputPath);
7272
}
7373

7474
private convertToAbsolutePath(resourcesPath: string, resourcePath: string) {
@@ -84,4 +84,4 @@ export class AssetsGenerationService implements IAssetsGenerationService {
8484
}
8585
}
8686

87-
$injector.register("assetsGenerationService", AssetsGenerationService);
87+
$injector.register("assetsGenerationService", AssetsGenerationService);

0 commit comments

Comments
 (0)