Skip to content

Latest commit

 

History

History
216 lines (141 loc) · 6.49 KB

DEVELOPERS.md

File metadata and controls

216 lines (141 loc) · 6.49 KB

Developing react-native-pos-printer

Development Setup

First off, thanks for your interest in react-native-pos-printer and for wanting to contribute! before you begin, read the code of conduct and check out the existing issues. This document describes how to set up your development environment to build and test react-native-pos-printer.

Installing Dependencies

Before you can build react-native-pos-printer, you must install and configure the following dependencies on your machine:

Forking react-native-pos-printer on GitHub

To contribute code to react-native-pos-printer, you must fork the react-native-pos-printer Repository. After you fork the repository, you may now begin editing the source code.

Building react-native-pos-printer

To build react-native-pos-printer, you clone the source code repository:

  1. Clone your GitHub forked repository:

    git clone https://github.com/<github_username>/supabase.git
  2. Go to the react-native-pos-printer directory:

    cd supabase

Choosing Directory

Before you start a development server, you must choose if you want to work on the Module itself or the Docs

  1. Go to the Module directory

    cd apps/www

    Go to the Docs directory

    cd web
  2. Install npm dependencies:

    npm

    npm install

    or with yarn

    yarn install

Start a Development Server

To debug code, and to see changes in real time, it is often useful to have a local HTTP server. Click one of the three links below to choose which development server you want to start.

react-native-pos-printer Website Development Server

The website is moving to a new monorepo setup. See the Monorepo section below.

react-native-pos-printer Docs Development Server

  1. Build development server

    npm

    npm run build

    or with yarn

    yarn build
    
  2. Start development server

    npm

    npm run start

    or with yarn

    yarn start
  3. To access the local server, enter the following URL into your web browser:

    http://localhost:3005/docs

react-native-pos-printer Studio Development Server

  1. Start development server

    npm

    npm run dev

    or with yarn

    yarn dev
  2. To access the local server, enter the following URL into your web browser:

    http://localhost:8082/

Monorepo

We are in the process of migrating this repository to monorepo which will significantly improve the developer workflow. You must be using NPM 7 or higher.

Getting started

npm install # install dependencies
npm run dev # start all the applications

Then edit and visit any of the following sites:

Shared components

The monorepo has a set of shared components under /packages:

  • /packages/common: Common React code, shared between all sites.
  • /packages/config: All shared config
  • /packages/tsconfig: Shared Typescript settings

Installing packages

Installing a package with NPM workspaces requires you to add the -w flag to tell NPM which workspace you want to install into.

The format is: npm install <package name> -w=<workspace to install in>.

For example:

  • npm install pngjs -w react-native-pos-printer: installs into ./packages/react-native-pos-printer
  • npm install pngjs -w example: installs into ./example

You do not need to install devDependencies in each workspace. These can all be installed in the root package.

Development

yarn start

Finally

After making your changes to the file(s) you'd like to update, it's time to open a pull request. Once you submit your pull request, others from the react-native-pos-printer team/community will review it with you.

Did you have an issue, like a merge conflict, or don't know how to open a pull request? Check out GitHub's pull request tutorial on how to resolve merge conflicts and other issues. Once your PR has been merged, you will be proudly listed as a contributor in the contributor chart

Community Channels

Stuck somewhere? Have any questions? please join the Discord Community Server or the Github Discussions. We are here to help!