Skip to content

Commit

Permalink
feat(expo): depcrecate expo-cli and use @expo/cli instead (#12799)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Oct 25, 2022
1 parent e24632f commit 386479f
Show file tree
Hide file tree
Showing 54 changed files with 1,173 additions and 196 deletions.
184 changes: 159 additions & 25 deletions docs/generated/packages/expo.json
Expand Up @@ -488,6 +488,10 @@
"type": "boolean",
"description": "Enable JSON output, non-JSON messages will be printed to stderr"
},
"nonInteractive": {
"type": "boolean",
"description": "Run the command in non-interactive mode."
},
"status": {
"enum": [
"new",
Expand Down Expand Up @@ -973,7 +977,8 @@
"platform": {
"description": "Platform to run for (ios, android).",
"enum": ["ios", "android"],
"default": "ios"
"default": "ios",
"alias": "p"
},
"xcodeConfiguration": {
"type": "string",
Expand Down Expand Up @@ -1007,8 +1012,15 @@
},
"bundler": {
"type": "boolean",
"description": "Whether to skip starting the Metro bundler. True to start it, false to skip it.",
"default": true
"description": "Whether to skip starting the Metro bundler. True to start it, false to skip it."
},
"install": {
"type": "boolean",
"description": "Should install missing dependencies before building."
},
"buildCache": {
"type": "boolean",
"description": "Should use derived data for builds."
}
},
"required": ["platform"],
Expand All @@ -1032,6 +1044,15 @@
"description": "Packager Server target options",
"type": "object",
"properties": {
"forceManifestType": {
"type": "string",
"description": "Override auto detection of manifest type.",
"enum": ["expo-updates", "classic"]
},
"privateKeyPath": {
"type": "string",
"description": "Path to private key for code signing. Default: 'private-key.pem' in the same directory as the certificate specified by the expo-updates configuration in app.json."
},
"port": {
"type": "number",
"description": "Port to start the native Metro bundler on (does not apply to web or tunnel)",
Expand Down Expand Up @@ -1067,11 +1088,6 @@
"type": "string",
"description": "Custom URI protocol to use with a development build"
},
"sentTo": {
"type": "string",
"description": "An email address to send a link to",
"alias": "s"
},
"android": {
"type": "boolean",
"description": "Opens your app in Expo Go on a connected Android device",
Expand All @@ -1082,10 +1098,15 @@
"description": "Opens your app in Expo Go in a currently running iOS simulator on your computer",
"alias": "i"
},
"web": {
"type": "boolean",
"description": " Opens your app in a web browser",
"alias": "w"
},
"host": {
"type": "string",
"description": "lan (default), tunnel, localhost. Type of host to use. \"tunnel\" allows you to view your link on other networks",
"alias": "m"
"description": "lan (default), tunnel, localhost. Type of host to use. lan uses the local network; tunnel ues any network by tunnel through ngrok; localhost connects to the dev server over localhost.",
"enum": ["localhost", "lan", "tunnel"]
},
"tunnel": {
"type": "boolean",
Expand All @@ -1100,9 +1121,16 @@
"type": "boolean",
"description": "Allows this command to run while offline"
},
"sentTo": {
"type": "string",
"description": "An email address to send a link to",
"alias": "s",
"x-deprecated": true
},
"webpack": {
"type": "boolean",
"description": "Start a Webpack dev server for the web app."
"description": "Start a Webpack dev server for the web app.",
"x-deprecated": true
}
},
"presets": []
Expand All @@ -1126,8 +1154,16 @@
"type": "object",
"properties": {
"include": {
"type": "string",
"description": "A comma-separated list of additional npm packages to include. e.g. 'nx sync-deps --include=react-native-gesture-handler,react-native-safe-area-context'"
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "An array of additional npm packages to include."
},
"exclude": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "An array of npm packages to exclude."
}
},
"presets": []
Expand Down Expand Up @@ -1158,36 +1194,134 @@
"path": "/packages/expo/src/executors/ensure-symlink/schema.json"
},
{
"name": "eject",
"implementation": "/packages/expo/src/executors/eject/eject.impl.ts",
"name": "prebuild",
"implementation": "/packages/expo/src/executors/prebuild/prebuild.impl.ts",
"schema": {
"cli": "nx",
"version": 2,
"outputCapture": "direct-nodejs",
"cli": "nx",
"$id": "NxExpoEject",
"$id": "NxExpoPrebuild",
"$schema": "http://json-schema.org/schema",
"title": "Expo Eject",
"description": "Create native iOS and Android project files",
"title": "Expo Prebuild",
"description": "Create native iOS and Android project files for building natively",
"type": "object",
"properties": {
"install": {
"type": "boolean",
"description": "Install CocoaPods.",
"default": true
"description": "Installing npm packages and CocoaPods.",
"default": false
},
"platform": {
"type": "string",
"description": "Platforms to sync",
"default": "all",
"examples": ["ios", "android", "all"]
"enum": ["ios", "android", "all"],
"alias": "p"
},
"template": {
"type": "string",
"description": "Project template to clone from. File path pointing to a local tar file or a github repo"
}
},
"presets": []
},
"description": "Create native iOS and Android project files for building natively.",
"aliases": [],
"hidden": false,
"path": "/packages/expo/src/executors/prebuild/schema.json"
},
{
"name": "install",
"implementation": "/packages/expo/src/executors/install/install.impl.ts",
"schema": {
"cli": "nx",
"version": 2,
"outputCapture": "direct-nodejs",
"$id": "NxExpoInstall",
"$schema": "http://json-schema.org/schema",
"title": "Expo Install",
"description": "Install a module or other package to a project",
"type": "object",
"properties": {
"packages": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "The names of packages to install",
"$default": { "$source": "argv", "index": 0 }
},
"check": {
"type": "boolean",
"description": "Check which installed packages need to be updated",
"default": true
},
"fix": {
"type": "boolean",
"description": "Automatically update any invalid package versions",
"default": false
}
},
"presets": []
},
"description": "Install a module or other package to a project.",
"aliases": [],
"hidden": false,
"path": "/packages/expo/src/executors/install/schema.json"
},
{
"name": "export",
"implementation": "/packages/expo/src/executors/export/export.impl.ts",
"schema": {
"cli": "nx",
"version": 2,
"outputCapture": "direct-nodejs",
"$id": "NxExpoExport",
"$schema": "http://json-schema.org/schema",
"title": "Expo Export",
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler",
"type": "object",
"properties": {
"platform": {
"description": "Choose the platform to compile for",
"enum": ["ios", "android", "all", "web"],
"alias": "p"
},
"dev": {
"type": "boolean",
"description": "Bundle for development environments without minifying code or stripping the __DEV__ boolean. Configure static files for developing locally using a non-https server."
},
"clear": {
"type": "boolean",
"description": "Clear the bundler cache before exporting"
},
"outputDir": {
"type": "string",
"description": "The directory to export the static files to. Default: dist"
},
"maxWorkers": {
"type": "number",
"description": "Maximum number of tasks to allow Metro to spawn"
},
"dumpAssetmap": {
"type": "string",
"description": "Dump the asset map for further processing"
},
"dumpSourcemap": {
"type": "string",
"description": "Dump the source map for debugging the JS bundle"
},
"bundler": {
"enum": ["metro", "webpack"],
"description": "Choose the bundler to compile for",
"default": "metro"
}
},
"required": ["bundler"],
"presets": []
},
"description": "Create native iOS and Android project files.",
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler",
"aliases": [],
"hidden": false,
"path": "/packages/expo/src/executors/eject/schema.json"
"path": "/packages/expo/src/executors/export/schema.json"
}
]
}
1 change: 1 addition & 0 deletions docs/generated/packages/react-native.json
Expand Up @@ -725,6 +725,7 @@
},
"platform": {
"enum": ["ios", "android"],
"alias": "p",
"description": "Platform to build for."
},
"transformer": {
Expand Down
4 changes: 3 additions & 1 deletion docs/packages.json
Expand Up @@ -149,7 +149,9 @@
"start",
"sync-deps",
"ensure-symlink",
"eject"
"prebuild",
"install",
"export"
],
"generators": ["init", "application", "library", "component"]
}
Expand Down
7 changes: 6 additions & 1 deletion e2e/expo/src/expo.test.ts
Expand Up @@ -16,7 +16,7 @@ describe('expo', () => {
);
afterEach(() => cleanupProject());

it('should test, lint', async () => {
it('should test, lint and export', async () => {
const appName = uniq('my-app');
const libName = uniq('lib');
const componentName = uniq('component');
Expand All @@ -41,5 +41,10 @@ describe('expo', () => {

const libLintResults = await runCLIAsync(`lint ${libName}`);
expect(libLintResults.combinedOutput).toContain('All files pass linting.');

const exportResults = await runCLIAsync(`export ${appName}`);
expect(exportResults.combinedOutput).toContain(
'Export was successful. Your exported files can be found'
);
}, 1000000);
});
36 changes: 28 additions & 8 deletions packages/expo/executors.json
Expand Up @@ -75,10 +75,20 @@
"schema": "./src/executors/ensure-symlink/schema.json",
"description": "Ensure workspace node_modules is symlink under app's node_modules folder."
},
"eject": {
"implementation": "./src/executors/eject/eject.impl",
"schema": "./src/executors/eject/schema.json",
"description": "Create native iOS and Android project files."
"prebuild": {
"implementation": "./src/executors/prebuild/prebuild.impl",
"schema": "./src/executors/prebuild/schema.json",
"description": "Create native iOS and Android project files for building natively."
},
"install": {
"implementation": "./src/executors/install/install.impl",
"schema": "./src/executors/install/schema.json",
"description": "Install a module or other package to a project."
},
"export": {
"implementation": "./src/executors/export/export.impl",
"schema": "./src/executors/export/schema.json",
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
}
},
"builders": {
Expand Down Expand Up @@ -157,10 +167,20 @@
"schema": "./src/executors/ensure-symlink/schema.json",
"description": "Ensure workspace node_modules is symlink under app's node_modules folder."
},
"eject": {
"implementation": "./src/executors/eject/compat",
"schema": "./src/executors/eject/schema.json",
"description": "Create native iOS and Android project files."
"prebuild": {
"implementation": "./src/executors/prebuild/compat",
"schema": "./src/executors/prebuild/schema.json",
"description": "Create native iOS and Android project files for building natively."
},
"install": {
"implementation": "./src/executors/install/compat",
"schema": "./src/executors/install/schema.json",
"description": "Install a module or other package to a project."
},
"export": {
"implementation": "./src/executors/export/compat",
"schema": "./src/executors/export/schema.json",
"description": "Export the JavaScript and assets for your app using Metro/webpack bundler"
}
}
}

1 comment on commit 386479f

@vercel
Copy link

@vercel vercel bot commented on 386479f Oct 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.