Skip to content

Commit 2c3bd09

Browse files
committed
refactor: better name for podspec
closes #25
1 parent d24e464 commit 2c3bd09

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/create.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export default async function create(argv: yargs.Arguments<any>) {
142142
.replace(/[^a-z0-9](\w)/g, (_, $1) => $1.toUpperCase())
143143
.slice(1)}`,
144144
package: slug.replace(/[^a-z0-9]/g, '').toLowerCase(),
145+
podspec: slug.replace(/[^a-z0-9]+/g, '-').replace(/^-/, ''),
145146
},
146147
author: {
147148
name: authorName,

templates/library/<%= project.package %>.podspec renamed to templates/library/<%= project.podspec %>.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ require "json"
33
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
44

55
Pod::Spec.new do |s|
6-
s.name = "<%= project.package %>"
6+
s.name = "<%= project.podspec %>"
77
s.version = package["version"]
88
s.summary = package["description"]
99
s.homepage = package["homepage"]

templates/library/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ target '<%= project.name %>Example' do
3434
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
3535
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
3636

37-
pod '<%= project.package %>', :path => '../..'
37+
pod '<%= project.podspec %>', :path => '../..'
3838

3939
use_native_modules!
4040
end

0 commit comments

Comments
 (0)