Skip to content

Commit

Permalink
fix: resolve failing handlebars check
Browse files Browse the repository at this point in the history
  • Loading branch information
GerganaNIvanova committed Mar 29, 2024
1 parent 87ba885 commit 9b450f6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
7 changes: 2 additions & 5 deletions baseProject/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import { BottomTabNavigator } from './src/common/navigation/bottomTab/BottomTabN
{{else}}
import { HomeContainer } from './src/features/home/container/HomeContainer'
{{/if}}
{{#if hasGluestackUICore}}
import { GluestackUIProvider } from '@gluestack-ui/themed';
{{/if}}
{{#if hasGluestackUI}}
{{#if hasAnyGluestackUIOption}}
import { GluestackUIProvider } from '@gluestack-ui/themed';
{{#if hasGluestackUIDefaultTheme}}
import {config } from '@gluestack-ui/config';
Expand Down Expand Up @@ -50,7 +47,7 @@ const App = () => {
<HomeContainer />
{{/if}}
</SafeAreaView>
{{#if hasGluestackUI}}</GluestackUIProvider>{{else if hasGluestackUICore}}</GluestackUIProvider>{{/if}}
{{#if hasAnyGluestackUIOption}}</GluestackUIProvider>{{/if}}
</NavigationContainer>
{{#if hasReduxToolkit}}</Provider>{{/if}}
);
Expand Down
8 changes: 2 additions & 6 deletions baseProject/config/storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/* eslint-disable react/react-in-jsx-scope */
import React from 'react';
import type { Preview } from '@storybook/react';
{{#if hasGluestackUICore}}
import { GluestackUIProvider } from '@gluestack-ui/themed';
import { StyleSheet, View } from 'react-native';
{{/if}}
{{#if hasGluestackUI}}
{{#if hasAnyGluestackUIOption}}
import { GluestackUIProvider } from '@gluestack-ui/themed';
import { StyleSheet, View } from 'react-native';
{{#if hasGluestackUIDefaultTheme}}
Expand All @@ -29,7 +25,7 @@ export const decorators = [
<View style={styles.container}>
{{#if hasGluestackUI}}<GluestackUIProvider config={config}>{{else if hasGluestackUICore}}<GluestackUIProvider>{{/if}}
<Story />
{{#if hasGluestackUI}}</GluestackUIProvider>{{else if hasGluestackUICore}}</GluestackUIProvider>{{/if}}
{{#if hasAnyGluestackUIOption}}</GluestackUIProvider>{{/if}}
</View>
),
];
Expand Down
2 changes: 1 addition & 1 deletion baseProject/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'babel-jest',
'\\.(png|jpg|jpeg|gif|svg)$': '<rootDir>/config/jest/transformAssets.js',
},
{{#if (or hasGluestackUI hasGluestackUICore)}}
{{#if hasAnyGluestackUIOption}}
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!((jest-)?react-native|@react-native(-community)?)|@expo?/.*|@gluestack-ui|@gluestack-ui/.*|@legendapp/motion)',
],
Expand Down
10 changes: 7 additions & 3 deletions src/tools/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,18 @@ export const SelectionToTemplateParamsMap: Partial<Record<
Partial<TemplateParams>
>> = {
[StyleLibraryChoice.GluestackUICore]: {
hasGluestackUICore: true
hasGluestackUICore: true,
hasAnyGluestackUIOption: true
},
[StyleLibraryChoice.GluestackUIDefault]: {
hasGluestackUI: true,
hasGluestackUIDefaultTheme: true
hasGluestackUIDefaultTheme: true,
hasAnyGluestackUIOption: true
},
[StyleLibraryChoice.GluestackUIEjected]: {
hasGluestackUI: true,
hasGluestackUIEjected: true
hasGluestackUIEjected: true,
hasAnyGluestackUIOption: true
},
[StyleLibraryChoice.StyledComponents]: {
hasStyledComponents: true
Expand Down Expand Up @@ -156,6 +159,7 @@ export const DefaultTemplateParams: TemplateParams = {
hasGluestackUICore: false,
hasGluestackUIDefaultTheme: false,
hasGluestackUIEjected: false,
hasAnyGluestackUIOption: false,
hasStyledComponents: false,
hasStorybook: false,
hasStorybookExample: false,
Expand Down
1 change: 1 addition & 0 deletions src/types/BaseProjectTemplateParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export interface TemplateParams {
hasGluestackUICore: boolean;
hasGluestackUIDefaultTheme: boolean;
hasGluestackUIEjected: boolean;
hasAnyGluestackUIOption: boolean;
hasStorybook: boolean;
hasStorybookExample: boolean;
hasReduxToolkit: boolean;
Expand Down

0 comments on commit 9b450f6

Please sign in to comment.