Skip to content
Open
Show file tree
Hide file tree
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
44 changes: 22 additions & 22 deletions Sources/NodesGenerator/Resources/Stencils/Builder-SwiftUI.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ public final class {{ node_name }}Component: Component

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }
{% if component_dependencies %}

{{ component_dependencies }}
Expand All @@ -82,11 +82,11 @@ public final class {{ node_name }}Component: Component

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>ComponentFactory() -> <Name>Component {
/// <Name>Component(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>ComponentFactory() -> <Name>Component {
// <Name>Component(parent: self)
// }
}

// MARK: - Builder
Expand Down
44 changes: 22 additions & 22 deletions Sources/NodesGenerator/Resources/Stencils/Builder.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ public final class {{ node_name }}Component: Component

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }
{% if component_dependencies %}

{{ component_dependencies }}
Expand Down Expand Up @@ -102,11 +102,11 @@ public final class {{ node_name }}Component: Component

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>ComponentFactory() -> <Name>Component {
/// <Name>Component(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>ComponentFactory() -> <Name>Component {
// <Name>Component(parent: self)
// }
{% if node_name == "App" %}

fileprivate func windowSceneComponentFactory() -> WindowSceneComponent {
Expand Down
44 changes: 22 additions & 22 deletions Sources/NodesGenerator/Resources/Stencils/Plugin.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,31 @@ public final class {{ plugin_name }}PluginComponent: Component

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>ComponentFactory() -> <Name>Component {
/// <Name>Component(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>ComponentFactory() -> <Name>Component {
// <Name>Component(parent: self)
// }

fileprivate func componentFactory() -> {{ plugin_name }}Component {
{{ plugin_name }}Component(parent: self)
Expand Down
44 changes: 22 additions & 22 deletions Sources/NodesGenerator/Resources/Stencils/PluginList.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,31 @@ public final class {{ plugin_list_name }}PluginListComponent: Component

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>PluginComponentFactory() -> <Name>PluginComponent {
/// <Name>PluginComponent(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>PluginComponentFactory() -> <Name>PluginComponent {
// <Name>PluginComponent(parent: self)
// }
}

// MARK: - Plugin List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ public final class AppComponent: BootstrapComponent {

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }

fileprivate let appService: AppService = AppServiceImp()

Expand All @@ -56,11 +56,11 @@ public final class AppComponent: BootstrapComponent {

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>ComponentFactory() -> <Name>Component {
/// <Name>Component(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>ComponentFactory() -> <Name>Component {
// <Name>Component(parent: self)
// }

fileprivate func windowSceneComponentFactory() -> WindowSceneComponent {
WindowSceneComponent(parent: self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ public final class RootComponent: Component

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }

private let dynamicDependency: RootDynamicComponentDependency

Expand All @@ -66,11 +66,11 @@ public final class RootComponent: Component

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>ComponentFactory() -> <Name>Component {
/// <Name>Component(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>ComponentFactory() -> <Name>Component {
// <Name>Component(parent: self)
// }
}

// MARK: - Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@ public final class WindowSceneComponent: Component

// MARK: - Dependencies

/// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
/// Only increase access control to `public` when the component is to provide the dependency to its descendants.
///
/// fileprivate var exampleFactory: Example {
/// Example()
/// }
///
/// Store the dependency on the component only when shared state is necessary.
///
/// fileprivate let example: Example = .init()
///
/// Or use the `shared` helper method which always returns the same instance from the computed property.
/// This is only necessary for dependencies initialized with other dependencies.
///
/// fileprivate var example: Example {
/// shared { Example(otherDependency: dependency.otherDependency) }
/// }
// Define dependencies as `fileprivate` computed property factories that create new instances when accessed.
// Only increase access control to `public` when the component is to provide the dependency to its descendants.
//
// fileprivate var exampleFactory: Example {
// Example()
// }
//
// Store the dependency on the component only when shared state is necessary.
//
// fileprivate let example: Example = .init()
//
// Or use the `shared` helper method which always returns the same instance from the computed property.
// This is only necessary for dependencies initialized with other dependencies.
//
// fileprivate var example: Example {
// shared { Example(otherDependency: dependency.otherDependency) }
// }

private let dynamicDependency: WindowSceneDynamicComponentDependency

Expand All @@ -66,11 +66,11 @@ public final class WindowSceneComponent: Component

// MARK: - Child Components

/// Define child component factories as 'fileprivate' methods.
///
/// fileprivate func <name>ComponentFactory() -> <Name>Component {
/// <Name>Component(parent: self)
/// }
// Define child component factories as 'fileprivate' methods.
//
// fileprivate func <name>ComponentFactory() -> <Name>Component {
// <Name>Component(parent: self)
// }

fileprivate func windowComponentFactory() -> WindowComponent {
WindowComponent(parent: self)
Expand Down
Loading