Skip to content

Latest commit

 

History

History
94 lines (78 loc) · 2.63 KB

README.md

File metadata and controls

94 lines (78 loc) · 2.63 KB

Caldera JS

This is the Caldera (Forms) 2.0 JavaScript framework.

This is not a WordPress plugin.

Packages

Development

Install for development

Mock Server

  • To start the mock data server:

    • yarn start:mock-server
  • Endpoints:

    • http://localhost:8080/stripe/plans.json List plans
    • http://localhost:8080/stripe/account.json Account details
    • http://localhost:8080/stripe/create-plan.json create subscription plans

Testing

Testing tools:

  • Jest - Unit tests, assertions and test runner.

  • react-test-renderer Basic React rendering for unit tests. Run by Jest.

  • Enzyme - More advanced React rendering for isolated DOM testing and other integration tests. Run by Jest.

  • Run all tests of all packages

    • yarn test
  • Test Components

    • yarn test:components
  • Test Forms

    • yarn test:forms
  • Test Server

    • yarn test:server
  • Test forms once for CI

    • yarn test:forms-ci
  • Test components once for CI

    • yarn test:components-ci

Storybook

  • Start Both Storybooks
    • yarn test
  • Start Components Storybook
    • yarn storybook:components
  • Start Forms Storybook
    • yarn storybook:forms

Linting

  • Lint and fix fixable issues in forms and components
    • yarn lint:fix
  • Lint forms and components
    • yarn lint

Using Mono Repo

  • Add A Package To A Component

    • yarn workspace @calderajs/components add react
    • yarn workspace @calderajs/forms add react
    • yarn workspace @calderajs/demo add react
  • Make publishable with lerna

  • Publish updates to all packages

    • yarn release