Skip to content

Add build:local script #2245

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

Merged
merged 4 commits into from
Sep 13, 2022
Merged

Add build:local script #2245

merged 4 commits into from
Sep 13, 2022

Conversation

M-i-k-e-l
Copy link
Collaborator

Description

Add a script to build changes locally.
Usage:

  1. npm run build:local
  2. Extract react-native-ui-lib-5.0.0.tgz (preferably in another location).
  3. Replace react-native-ui-lib in your node_modules (probably backup or delete your current node_modules/react-native-ui-lib).
  4. Delete react-native-ui-lib-5.0.0.tgz.
  5. package.json will change, take extra care if you have changes there.

Note: I've added a warning if the user has untracked files (which will be deleted without this).

CC @Inbal-Tish @lidord-wix @adids1221

Changelog

None

@ethanshar
Copy link
Collaborator

@M-i-k-e-l
Reminder: check for changes in package.json. And revert the change we do as part of the build

@M-i-k-e-l
Copy link
Collaborator Author

check for changes in package.json. And revert the change we do as part of the build

Done.
Sadly it is impossible to change the folder name (package) without expanding it, so I chose not to do it.

.gitignore Outdated
@@ -2,6 +2,10 @@
#
.DS_Store

# Do not track local package
react-native-ui-lib-5.0.0.tgz
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will it always be 5.0.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe it comes from our package.json's version, so it should not change since we do not really update it.

git clean -f
git checkout package.json
# Rename tar
mv react-native-ui-lib-5.0.0.tgz react-native-ui-lib.tgz
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe mv to the user Downloads folder?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea, this should probably remove the need for the ignore, and solve the above comment.

@ethanshar
Copy link
Collaborator

Wrote some comment, anyway approved.
nice work (:

@M-i-k-e-l M-i-k-e-l enabled auto-merge (squash) September 13, 2022 08:14
@M-i-k-e-l M-i-k-e-l merged commit 029b9bd into master Sep 13, 2022
@M-i-k-e-l M-i-k-e-l deleted the infra/add-build-local-script branch September 13, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants