diff --git a/doric-cli/scripts/init.js b/doric-cli/scripts/init.js index c101b6c4..b5ba2c61 100644 --- a/doric-cli/scripts/init.js +++ b/doric-cli/scripts/init.js @@ -92,7 +92,12 @@ function initAndroid(path, name) { return console.error(err); } copyFolder(`${targetAndroidPath}`, `${path}`, () => { - ['app/src/main/java/pub/doric/example/MainActivity.java', 'app/build.gradle'].forEach(e => { + [ + 'app/src/main/java/pub/doric/example/MainActivity.java', + 'app/build.gradle', + 'app/src/main/res/values/strings.xml', + 'settings.gradle', + ].forEach(e => { fs.writeFileSync(`${path}/${e}`, fs.readFileSync(`${targetAndroidPath}/${e}`).toString() .replace(/__\$__/g, name) @@ -114,8 +119,12 @@ function initiOS(path, name) { return console.error(err); } copyFolder(`${targetiOSPath}`, `${path}`, () => { - ['Example/SceneDelegate.m', 'Example/AppDelegate.m', 'Podfile'].forEach(e => { - fs.writeFileSync(`${path}/${e}`, + [ + 'Example/SceneDelegate.m', + 'Example/AppDelegate.m', + 'Podfile', + ].forEach(e => { + fs.writeFileSync(`${pathq}/${e}`, fs.readFileSync(`${targetiOSPath}/${e}`).toString() .replace(/__\$__/g, name) .replace(/__\$Version__/g, currentVersion)) diff --git a/doric-cli/target/android/app/src/main/res/values/strings.xml b/doric-cli/target/android/app/src/main/res/values/strings.xml index 0057fcb9..0fa2349d 100644 --- a/doric-cli/target/android/app/src/main/res/values/strings.xml +++ b/doric-cli/target/android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - Example + __$__ diff --git a/doric-cli/target/android/settings.gradle b/doric-cli/target/android/settings.gradle index 99698ff7..4db7a08b 100644 --- a/doric-cli/target/android/settings.gradle +++ b/doric-cli/target/android/settings.gradle @@ -1,2 +1,2 @@ include ':app' -rootProject.name='Example' +rootProject.name='__$__' diff --git a/doric-cli/target/iOS/.gitignore b/doric-cli/target/iOS/.gitignore index ae9d5b6f..3726835c 100644 --- a/doric-cli/target/iOS/.gitignore +++ b/doric-cli/target/iOS/.gitignore @@ -1,5 +1,5 @@ Podfile.lock -Example.xcworkspace/ +*.xcworkspace/ Pods/ .idea/ -Example.xcodeproj/xcuserdata/ \ No newline at end of file +*.xcodeproj/xcuserdata/ \ No newline at end of file diff --git a/doric-cli/target/iOS/Example/AppDelegate.h b/doric-cli/target/iOS/App/AppDelegate.h similarity index 100% rename from doric-cli/target/iOS/Example/AppDelegate.h rename to doric-cli/target/iOS/App/AppDelegate.h diff --git a/doric-cli/target/iOS/Example/AppDelegate.m b/doric-cli/target/iOS/App/AppDelegate.m similarity index 100% rename from doric-cli/target/iOS/Example/AppDelegate.m rename to doric-cli/target/iOS/App/AppDelegate.m diff --git a/doric-cli/target/iOS/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/doric-cli/target/iOS/App/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from doric-cli/target/iOS/Example/Assets.xcassets/AppIcon.appiconset/Contents.json rename to doric-cli/target/iOS/App/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/doric-cli/target/iOS/Example/Assets.xcassets/Contents.json b/doric-cli/target/iOS/App/Assets.xcassets/Contents.json similarity index 100% rename from doric-cli/target/iOS/Example/Assets.xcassets/Contents.json rename to doric-cli/target/iOS/App/Assets.xcassets/Contents.json diff --git a/doric-cli/target/iOS/Example/Base.lproj/LaunchScreen.storyboard b/doric-cli/target/iOS/App/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from doric-cli/target/iOS/Example/Base.lproj/LaunchScreen.storyboard rename to doric-cli/target/iOS/App/Base.lproj/LaunchScreen.storyboard diff --git a/doric-cli/target/iOS/Example/Info.plist b/doric-cli/target/iOS/App/Info.plist similarity index 100% rename from doric-cli/target/iOS/Example/Info.plist rename to doric-cli/target/iOS/App/Info.plist diff --git a/doric-cli/target/iOS/Example/SceneDelegate.h b/doric-cli/target/iOS/App/SceneDelegate.h similarity index 100% rename from doric-cli/target/iOS/Example/SceneDelegate.h rename to doric-cli/target/iOS/App/SceneDelegate.h diff --git a/doric-cli/target/iOS/Example/SceneDelegate.m b/doric-cli/target/iOS/App/SceneDelegate.m similarity index 100% rename from doric-cli/target/iOS/Example/SceneDelegate.m rename to doric-cli/target/iOS/App/SceneDelegate.m diff --git a/doric-cli/target/iOS/Example/main.m b/doric-cli/target/iOS/App/main.m similarity index 100% rename from doric-cli/target/iOS/Example/main.m rename to doric-cli/target/iOS/App/main.m diff --git a/doric-cli/target/iOS/Example.xcodeproj/project.pbxproj b/doric-cli/target/iOS/Example.xcodeproj/project.pbxproj index b6747c33..8c1c063d 100644 --- a/doric-cli/target/iOS/Example.xcodeproj/project.pbxproj +++ b/doric-cli/target/iOS/Example.xcodeproj/project.pbxproj @@ -57,7 +57,7 @@ isa = PBXGroup; children = ( E2B059BE23C452BB007555C7 /* src */, - E2F64CEC2399359C0006BD9A /* Example */, + E2F64CEC2399359C0006BD9A /* App */, E2F64CEB2399359C0006BD9A /* Products */, 875E7B19E6A1ABA3F802B6B5 /* Pods */, F654B22175F1FDDC9AE817FA /* Frameworks */, @@ -72,7 +72,7 @@ name = Products; sourceTree = ""; }; - E2F64CEC2399359C0006BD9A /* Example */ = { + E2F64CEC2399359C0006BD9A /* App */ = { isa = PBXGroup; children = ( E2F64CED2399359C0006BD9A /* AppDelegate.h */, @@ -84,7 +84,7 @@ E2F64CFE2399359E0006BD9A /* Info.plist */, E2F64CFF2399359E0006BD9A /* main.m */, ); - path = Example; + path = App; sourceTree = ""; }; F654B22175F1FDDC9AE817FA /* Frameworks */ = { diff --git a/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6d2a51bb..00000000 --- a/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/xcuserdata/pengfei.xcuserdatad/UserInterfaceState.xcuserstate b/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/xcuserdata/pengfei.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 038bec89..00000000 Binary files a/doric-cli/target/iOS/Example.xcodeproj/project.xcworkspace/xcuserdata/pengfei.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/doric-cli/target/iOS/Podfile b/doric-cli/target/iOS/Podfile index 267690ce..2427b894 100644 --- a/doric-cli/target/iOS/Podfile +++ b/doric-cli/target/iOS/Podfile @@ -1,11 +1,11 @@ # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' -target 'Example' do +target '__$__' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! - # Pods for Example + # Pods for __$__ pod 'DoricCore', '~>__$Version__' pod 'DoricDevkit', '~>__$Version__' end