CodePush is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices. It works by acting as a central repository that developers can publish updates to (JS, HTML, CSS and images), and that apps can query for updates from (using provided client SDKs for Cordova and React Native). This allows you to have a more deterministic and direct engagement model with your userbase, when addressing bugs and/or adding small features that don’t require you to re-build a binary and re-distribute it through the respective app stores.
This repo includes the management CLI and Node.js management SDK, which allows you to manage and automate the needs of your Cordova and React Native apps. To get started using CodePush, refer to our documentation, otherwise, read the following steps if you’d like to build/contribute to the project from source.
- Install Node.js
- Install Git
- Install Gulp:
npm install -g gulp
- Clone the Repository:
git clone https://github.com/Microsoft/code-push.git
npm installfrom the root of the repository.
gulp installto install the NPM dependencies of each module within the project.
gulp linkto link CLI and SDK for local development. It is advisable to do this step if you are making changes to the SDK and want the CLI to pick those changes.
gulp buildto build all of the modules. To build just one of the modules (e.g. cli or sdk), run
To run all tests, run
gulp test script from the root of the project.
To test just one of the projects (e.g. cli or sdk), run
gulp test-cli or
- Use double quotes for strings
- Use four space tabs
camelCasefor local variables and imported modules,
PascalCasefor types, and
dash-casefor file names