-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* scaffold 추가 * module path 추가 * stencill 추기
- Loading branch information
Showing
26 changed files
with
705 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.33.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
GENERATE = tuist generate | ||
FETCH = tuist fetch | ||
BUILD = tuist build | ||
CLEAN = tuist clean | ||
CURRENT_DATE = $(shell run scripts/current_date.swift) | ||
|
||
# Define your targets and dependencies | ||
|
||
.PHONY: generate | ||
generate: | ||
TUIST_ROOT_DIR=${PWD} $(GENERATE) | ||
|
||
.PHONY: build | ||
build: $(CLEAN) $(FETCH) $(FETCH) TUIST_ROOT_DIR=${PWD} $(GENERATE) | ||
|
||
.PHONY: clean | ||
clean: | ||
$(CLEAN) | ||
|
||
.PHONY: fetch | ||
fetch: | ||
$(FETCH) | ||
|
||
module: | ||
tuist scaffold Module \ | ||
--layer ${layer} \ | ||
--name ${name} \ | ||
--author "서원지" | ||
|
||
|
||
# Additional targets can be added as needed |
16 changes: 16 additions & 0 deletions
16
.../BeatCounter/ProjectDescriptionHelpers/DependencyPackage/Extension+TargetDependency.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Extension+TargetDependency.swift | ||
// MyPlugin | ||
// | ||
// Created by 서원지 on 12/17/23. | ||
// | ||
|
||
import ProjectDescription | ||
|
||
public extension TargetDependency { | ||
enum SPM {} | ||
} | ||
|
||
public extension TargetDependency.SPM { | ||
|
||
} |
67 changes: 0 additions & 67 deletions
67
BeatCounter/Plugins/BeatCounter/ProjectDescriptionHelpers/Project+Templates.swift
This file was deleted.
Oops, something went wrong.
139 changes: 139 additions & 0 deletions
139
...er/Plugins/BeatCounter/ProjectDescriptionHelpers/Project+Templete/Project+Templates.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
// | ||
// Project+Template.swift | ||
// MyPlugin | ||
// | ||
// Created by Gordon Choi on 12/10/23. | ||
// | ||
|
||
import ProjectDescription | ||
|
||
public extension Project { | ||
public enum Environment { | ||
public static let appName = "BeatCounter" | ||
public static let organizationName = "" // and so on | ||
public static let deploymentTarget = DeploymentTarget.iOS(targetVersion: "17.0", devices: [.iphone, .ipad]) | ||
public static let bundlePrefix = "com." // and so on | ||
public static let appVersion = "1.0.0" | ||
public static let mainBundleId = "com.BeatCounter" | ||
} | ||
} | ||
|
||
public extension Project { | ||
static func makeAppModule( | ||
name: String = Environment.appName, | ||
bundleId: String, | ||
platform: Platform = .iOS, | ||
product: Product, | ||
organizationName: String = Environment.organizationName, | ||
packages: [Package] = [], | ||
deploymentTarget: DeploymentTarget = Environment.deploymentTarget, | ||
settings: Settings, | ||
dependencies: [TargetDependency] = [], | ||
sources: SourceFilesList = .sources, | ||
resources: ResourceFileElements? = nil, | ||
infoPlist: InfoPlist = .default, | ||
entitlements: Entitlements? = nil, | ||
schemes: [Scheme] = [] | ||
) -> Project { | ||
let appTarget = Target( | ||
name: name, | ||
platform: platform, | ||
product: product, | ||
bundleId: bundleId, | ||
deploymentTarget: deploymentTarget, | ||
infoPlist: infoPlist, | ||
sources: sources, | ||
resources: resources, | ||
entitlements: entitlements, | ||
scripts: [], | ||
dependencies: dependencies | ||
) | ||
|
||
let appDevTarget = Target( | ||
name: "\(name)-Dev", | ||
platform: .iOS, | ||
product: product, | ||
bundleId: "\(bundleId)", | ||
deploymentTarget: deploymentTarget, | ||
infoPlist: infoPlist, | ||
sources: sources, | ||
resources: resources, | ||
entitlements: entitlements, | ||
scripts: [], | ||
dependencies: dependencies | ||
|
||
) | ||
|
||
let appTestTarget = Target( | ||
name: "\(name)Tests", | ||
platform: platform, | ||
product: .unitTests, | ||
bundleId: "\(bundleId).\(name)Tests", | ||
deploymentTarget: deploymentTarget, | ||
infoPlist: .default, | ||
sources: ["\(name)Tests/Sources/**"], | ||
dependencies: [.target(name: name)] | ||
) | ||
|
||
let targets = [appTarget, appDevTarget, appTestTarget] | ||
|
||
return Project( | ||
name: name, | ||
organizationName: organizationName, | ||
packages: packages, | ||
settings: settings, | ||
targets: targets, | ||
schemes: schemes | ||
) | ||
} | ||
} | ||
|
||
|
||
extension Scheme { | ||
public static func makeScheme(target: ConfigurationName, name: String) -> Scheme { | ||
return Scheme( | ||
name: name, | ||
shared: true, | ||
buildAction: .buildAction(targets: ["\(name)"]), | ||
testAction: .targets( | ||
["\(name)Tests"], | ||
configuration: target, | ||
options: .options(coverage: true, codeCoverageTargets: ["\(name)"]) | ||
), | ||
runAction: .runAction(configuration: target), | ||
archiveAction: .archiveAction(configuration: target), | ||
profileAction: .profileAction(configuration: target), | ||
analyzeAction: .analyzeAction(configuration: target) | ||
) | ||
} | ||
|
||
} | ||
|
||
|
||
extension String { | ||
public static func appVersion() -> String { | ||
let version: String = "1.0.0" | ||
return version | ||
} | ||
|
||
public static func watchAppVersion() -> String { | ||
let version: String = "1.0.0" | ||
return version | ||
} | ||
|
||
public static func appBuildVersion() -> String { | ||
let buildVersion: String = "10" | ||
return buildVersion | ||
} | ||
|
||
public static func mainBundleID() -> String { | ||
let bundleID = "com.BeatCounter" | ||
return bundleID | ||
} | ||
|
||
public static func appBundleID(name: String) -> String { | ||
let bundleID = "com.BeatCounter\(name)" | ||
return bundleID+name | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...eatCounter/ProjectDescriptionHelpers/Project+Templete/ResourceFileElements+Templete.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// ResourceFileElements+Templete.swift | ||
// MyPlugin | ||
// | ||
// Created by 서원지 on 12/17/23. | ||
// | ||
|
||
import Foundation | ||
import ProjectDescription | ||
|
||
|
||
public extension ResourceFileElements { | ||
static let resources: ResourceFileElements = "Resources/**" | ||
} |
13 changes: 13 additions & 0 deletions
13
...ins/BeatCounter/ProjectDescriptionHelpers/Project+Templete/SourceFilesList+Template.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// SourceFilesList+Template.swift | ||
// MyPlugin | ||
// | ||
// Created by 서원지 on 12/17/23. | ||
// | ||
|
||
import Foundation | ||
import ProjectDescription | ||
|
||
public extension SourceFilesList { | ||
static let sources: SourceFilesList = "Sources/**" | ||
} |
65 changes: 65 additions & 0 deletions
65
...unter/Plugins/BeatCounter/ProjectDescriptionHelpers/TargetDependency+Module/Modules.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// | ||
// Modules.swift | ||
// MyPlugin | ||
// | ||
// Created by 서원지 on 12/17/23. | ||
// | ||
|
||
import Foundation | ||
import ProjectDescription | ||
|
||
public enum ModulePath { | ||
case Feature(Features) | ||
case Core(Cores) | ||
case Networking(Networkings) | ||
case Shared(Shareds) | ||
} | ||
|
||
//MARK: - 앱 모듈 | ||
public extension ModulePath { | ||
enum App: String, CaseIterable { | ||
case iOS | ||
case iPad | ||
|
||
public static let name: String = "App" | ||
} | ||
} | ||
|
||
// MARK: FeatureModule | ||
public extension ModulePath { | ||
enum Features: String, CaseIterable { | ||
case Auth | ||
|
||
public static let name: String = "Feature" | ||
} | ||
} | ||
|
||
//MARK: - CoreMoudule | ||
public extension ModulePath { | ||
enum Cores: String, CaseIterable { | ||
case Core | ||
case Authorization | ||
case Station | ||
|
||
public static let name: String = "Core" | ||
} | ||
} | ||
|
||
//MARK: - CoreDomainModule | ||
public extension ModulePath { | ||
enum Networkings: String, CaseIterable { | ||
case Model | ||
case Service | ||
public static let name: String = "Networking" | ||
} | ||
} | ||
|
||
public extension ModulePath { | ||
enum Shareds: String, CaseIterable { | ||
case DesignSystem | ||
case Constants | ||
case ThirdParty | ||
|
||
public static let name: String = "Shared" | ||
} | ||
} |
Oops, something went wrong.