|
@@ -2,7 +2,6 @@
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
-import { map, find } from "lodash";
|
|
|
import { TauriBuildConfig } from "./types/config";
|
|
|
import { reactjs, reactts } from "./recipes/react";
|
|
|
import { vuecli } from "./recipes/vue-cli";
|
|
@@ -47,23 +46,12 @@ export interface Recipe {
|
|
|
|
|
|
export const allRecipes: Recipe[] = [vanillajs, reactjs, reactts, vite, vuecli];
|
|
|
|
|
|
-export const recipeNames: Array<[string, string]> = map(
|
|
|
- allRecipes,
|
|
|
- (r: Recipe) => [r.shortName, r.descriptiveName]
|
|
|
-);
|
|
|
+export const recipeNames: Array<[string, string]> = allRecipes.map(r => [r.shortName, r.descriptiveName]);
|
|
|
|
|
|
-export const recipeByShortName = (name: string): Recipe | undefined =>
|
|
|
- find(allRecipes, (r: Recipe) => r.shortName === name);
|
|
|
+export const recipeByShortName = (name: string) => allRecipes.find(r => r.shortName === name);
|
|
|
|
|
|
-export const recipeByDescriptiveName = (name: string): Recipe | undefined =>
|
|
|
- find(allRecipes, (r: Recipe) => r.descriptiveName === name);
|
|
|
+export const recipeByDescriptiveName = (name: string) => allRecipes.find(r => r.descriptiveName === name);
|
|
|
|
|
|
-export const recipeShortNames: string[] = map(
|
|
|
- allRecipes,
|
|
|
- (r: Recipe) => r.shortName
|
|
|
-);
|
|
|
+export const recipeShortNames = allRecipes.map(r => r.shortName);
|
|
|
|
|
|
-export const recipeDescriptiveNames: string[] = map(
|
|
|
- allRecipes,
|
|
|
- (r: Recipe) => r.descriptiveName
|
|
|
-);
|
|
|
+export const recipeDescriptiveNames = allRecipes.map(r => r.descriptiveName);
|