-
Notifications
You must be signed in to change notification settings - Fork 11
feat(cli): add expo framework support to bundle command #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(cli): add expo framework support to bundle command #73
Conversation
cli/commands/bundleCommand/index.js
Outdated
@@ -4,13 +4,15 @@ const { OUTPUT_BUNDLE_DIR, ROOT_OUTPUT_DIR, ENTRY_FILE } = require('../../consta | |||
|
|||
program.command('bundle') | |||
.description('Creates a CodePush bundle file (assumes Hermes is enabled).') | |||
.addOption(new Option('-t, --type <type>', 'project type (react-native | expo)').choices(['react-native', 'expo']).default('react-native')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing the name of option to -f, --framework
and running the expo bundle command only when -f expo
option passed?
Because I thought framework
represents Expo’s identity better than type
.
(I also considered using a --expo
flag, but it didn’t seem scalable for future frameworks. 😆 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@floydkim
Awesome! Just switched type
to framework
as you suggested.
I've also updated the PR description and the README to reflect these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saseungmin Thank you!
This diff may be released as v9.2.0
along with your expo-plugin.
📝 Overview
Adds Expo project support to the code-push CLI, enabling CodePush functionality for Expo projects alongside existing React Native projects.
✨ What's Added
-f, --framework
parameter with choicesexpo
(only expo)runExpoBundleCommand
function usingexpo export:embed
bundle
andrelease
commands now support both project types🔧 Changes Made
1. Enhanced CLI Commands
Bundle Command (
cli/commands/bundleCommand/index.js
)--framework
option withexpo
choicesreact-native
for backward compatibilityRelease Command (
cli/commands/releaseCommand/index.js
)--framework
option support2. Core Bundle Logic (
cli/commands/bundleCommand/bundleCodePush.js
)framework
parameter tobundleCodePush
functionreact-native
(default): Uses existingrunReactNativeBundleCommand
expo
: Uses newrunExpoBundleCommand
3. New Expo Bundle Function (
cli/functions/runExpoBundleCommand.js
)expo export:embed
4. Release Pipeline Updates (
cli/commands/releaseCommand/release.js
)release
function to accept and pass throughtype
parameter5. Documentation Updates (
README.md
)--framework
parameter bundle, release cli description🎯 Usage Examples
For React Native Projects (unchanged)
For Expo Projects (new)
✅ Testing
expo export:embed
🔄 Breaking Changes
None - This is a fully backward compatible addition. All existing commands continue to work exactly as before.
📋 Related Work