Giter Site home page Giter Site logo

purchases-js's Introduction

๐Ÿ˜ป In-App Subscriptions Made Easy ๐Ÿ˜ป

๐Ÿ•ธ๏ธ For the web ๐Ÿ•ธ๏ธ

RevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support. This repository includes all you need to manage your subscriptions on your website or web app using RevenueCat.

Sign up to get started for free.

Prerequisites

Login @ app.revenuecat.com

  • Connect your Stripe account if you haven't already (More payment gateways are coming soon)
  • Create a Project (if you haven't already)
  • Add a new RCBilling app
  • Get the sandbox API key or production API key (depending on the environment)
  • Create some products for the RCBilling App
  • Create an offering and add packages with RCBilling products
  • Create the entitlements you need in your app and link them to the RCBilling products

Installation

  • Add the library to your project's dependencies
    • npm
      npm install --save @revenuecat/purchases-js
      
    • yarn
      yarn add --save @revenuecat/purchases-js
      

Usage

See the RevenueCat docs and the SDK Reference.

Development

Install the library in a local project

  • Clone the repository
  • Install dependencies
  • Build the library
npm install
npm run build:dev

To avoid publishing the package you can set it up as a local dependency. In your testing project install the library as.

npm i /path/to/rcbilling-js

Running tests

npm run test

Running linters

npm run test:typeCheck
npm run svelte-check
npm run prettier
npm run lint

Running E2E tests

npm run build
cd examples/rcbilling-demo
npm run build
# In a different terminal or background the process
npm run dev
npm run test

Update API specs

npm run extract-api

This will update the files in api-report with the latest public API. If it has uncommited changes, CI tests will fail. Run this command and commit the changes if they are expected.

Publishing a new version

New versions are automated weekly, but you can also trigger a new release through CircleCI or locally following these steps:

  • Run bundle exec fastlane bump and follow the instructions
  • A PR should be created with the changes and a hold job in CircleCI.
  • Approve the hold job once tests pass. This will create a tag and continue the release in CircleCI
  • Merge the PR once it's been released

purchases-js's People

Contributors

tonidero avatar alfondotnet avatar nicfix avatar francocorreasosa avatar jefago avatar rcgitbot avatar dependabot[bot] avatar ymdkit avatar vicfergar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.