diff --git a/local-cli/generate-macos.js b/local-cli/generate-macos.js index 67a1ea2772b1f2..cb0a1e43acb32e 100644 --- a/local-cli/generate-macos.js +++ b/local-cli/generate-macos.js @@ -14,7 +14,7 @@ const { * @param {String} name name of the root JS module for this app * @param {Object} options command line options container */ -function generateWindows (projectDir, name, options) { +function generateMacOS (projectDir, name, options) { if (!fs.existsSync(projectDir)) { fs.mkdirSync(projectDir); } @@ -29,4 +29,4 @@ function generateWindows (projectDir, name, options) { ); } -module.exports = generateWindows; +module.exports = generateMacOS; diff --git a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.h b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.h index 37c41596c3b01a..b888376ce703bf 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.h +++ b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.h @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import @class RCTBridge; diff --git a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.m b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.m index 236f96827ac060..8386743e520a57 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.m +++ b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/AppDelegate.m @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import "AppDelegate.h" #import diff --git a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.h b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.h index 3dbe6dac7ee25c..d70148772e0fba 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.h +++ b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.h @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import @interface ViewController : NSViewController diff --git a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m index 43962387a91048..bc627375786f3e 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +++ b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import "ViewController.h" #import "AppDelegate.h" diff --git a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/main.m b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/main.m index 023187ff475027..1f154fcf69b005 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld-macOS/main.m +++ b/local-cli/generator-macos/templates/macos/HelloWorld-macOS/main.m @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import int main(int argc, const char *argv[]) { diff --git a/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/project.pbxproj b/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/project.pbxproj index 3ff956300e0468..c18882a55b02b8 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/project.pbxproj +++ b/local-cli/generator-macos/templates/macos/HelloWorld.xcodeproj/project.pbxproj @@ -437,7 +437,7 @@ 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HelloWorld/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native-macos/React/React.xcodeproj"; sourceTree = ""; }; - 38C1417223BBE33000902604 /* HelloWorld-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloWorld-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 38C1417223BBE33000902604 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38C141D123BBE33000902604 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = "HelloWorld-macOS/Info.plist"; sourceTree = ""; }; 38C1421523BBE5B500902604 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38C1421723BBE65C00902604 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; @@ -690,7 +690,7 @@ isa = PBXGroup; children = ( 13B07F961A680F5B00A75B9A /* HelloWorld.app */, - 38C1417223BBE33000902604 /* HelloWorld-macOS.app */, + 38C1417223BBE33000902604 /* HelloWorld.app */, ); name = Products; sourceTree = ""; @@ -741,7 +741,7 @@ ); name = "HelloWorld-macOS"; productName = "Hello World"; - productReference = 38C1417223BBE33000902604 /* HelloWorld-macOS.app */; + productReference = 38C1417223BBE33000902604 /* HelloWorld.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -751,7 +751,7 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 0940; - ORGANIZATIONNAME = Facebook; + ORGANIZATIONNAME = ""; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "HelloWorld" */; compatibilityVersion = "Xcode 3.2"; @@ -1338,7 +1338,7 @@ "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.HelloWorld.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = HelloWorld; SDKROOT = macosx; TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; @@ -1359,7 +1359,7 @@ "-lc++", ); PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.HelloWorld.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = HelloWorld; SDKROOT = macosx; TARGETED_DEVICE_FAMILY = 1; VERSIONING_SYSTEM = "apple-generic"; diff --git a/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.h b/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.h index 2726d5e13c7234..ef1de86a2a80ac 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.h +++ b/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.h @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import #import diff --git a/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.m b/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.m index 101fb8c324c067..e5f1fac421b602 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.m +++ b/local-cli/generator-macos/templates/macos/HelloWorld/AppDelegate.m @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import "AppDelegate.h" #import diff --git a/local-cli/generator-macos/templates/macos/HelloWorld/main.m b/local-cli/generator-macos/templates/macos/HelloWorld/main.m index c316cf816e736a..b1df44b953ec48 100644 --- a/local-cli/generator-macos/templates/macos/HelloWorld/main.m +++ b/local-cli/generator-macos/templates/macos/HelloWorld/main.m @@ -1,10 +1,3 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - #import #import "AppDelegate.h" diff --git a/packages/react-native-macos-init/package.json b/packages/react-native-macos-init/package.json index b285a19e7640cd..6ea151ab56411f 100644 --- a/packages/react-native-macos-init/package.json +++ b/packages/react-native-macos-init/package.json @@ -10,7 +10,8 @@ "build": "just-scripts build", "clean": "just-scripts clean", "lint": "just-scripts lint", - "lint:fix": "just-scripts lint:fix" + "lint:fix": "just-scripts lint:fix", + "prepublishOnly": "npm run build" }, "bin": { "react-native-macos-init": "./bin.js"