NewSpring / Holtzman

The main NewSpring namespace and utilities for all newspring packages.
http://holtzman.newspring.io/
Other
24 stars 10 forks source link
javascript jest meteor react

Holtzman

NewSpring
Church Build Status Coverage Status

Holtzman is an application framework for building high speed, web + native, reactive applications. It is built using Reactjs, Redux, and Meteor. This repository contains the application framework and instructions for usage.

Table of Contents

Prerequisites

Quick Start

Structure

Local Development

Deploys

Contributing

Prerequisites

Quick Start

$ git clone git@github.com:NewSpring/Holtzman.git
$ cd Holtzmann
& yarn install
$ cp ./.meteor/sample.settings.json ./.meteor/settings.json
$ WEB=true meteor run --settings ./.meteor/settings.json

You may need some additional parameters for your meteor settings file.

Structure

This repo contains the code base used to build v5 of the NewSpring site and native app. Our sites and native apps share much of the same functionality, and therefore share the same code.

Imports directory

/imports/ contains all of the working files for Holtzman. Inside are the following directories:

Local Development

Basics

To install all dependencies, we use Yarn. To get started:

  1. Clone down the repo
  2. Make sure you have the Yarn CLI installed
  3. Run yarn.

Use the meteor run command. It may be helpful to alias the command in your command line for quick startups.

Holtzman uses environment variables to control certain aspects of building. Setting these variables will cause either the web version or the mobile version to build.

$ WEB=true $ NATIVE=true

you can leave these off instead of setting them to false. Its not recommended to set these using export. Instead you can add them to the command like this:

Building

The build done for production on web is this:

NODE_ENV="production" WEB=true meteor build .build --architecture os.linux.x86_64 --server https://my.newspring.cc --mobile-settings ./.meteor/settings.json

The build for native is this:

NODE_ENV="production" NATIVE=true meteor build .build --architecture os.linux.x86_64 --server https://native.newspring.cc --mobile-settings ./.meteor/settings.json

Testing

This project uses Jest for unit tests. These tests are located in __tests__ subfolders adjacent to the thing they're testing.

To run tests, call yarn test or yarn test -- --watch. This will also run eslint and flow tests when complete.

Linting

This project includes linting using ESLint. To manually run eslint, use yarn lint. There are tools available for many editors to show you errors while you work. Its recommended to use one of these tools and enable the option to use project based eslint which will use the eslint thats installed with yarn.

Typing

This project contains static typing for some of our code. We use Flow for this. To enable flow to a file, add // @flow to the very top of the file.

To run flow, use yarn flow.

CI and Deploys

This project is automatically tested on Jenkins CI. It is tested on every branch push as well as every PR. If a PR is open, then pushes to the branch being requested also get tested.

This project can be deployed by Jenkins through its web UI. We have 2 different versions of the application: web and native. We also have 2 different environments to deploy to: beta and production. Currently, only the web platform can be deployed through Jenkins. Native builds currently are manually run and submitted.

Deploy Process

This details how administrators to the repository with admin access inside Jenkins can deploy the project to all of our platforms.

Contributing

For more information about contributing PRs and issues, see our Contribution Guidelines.

Good First PR is a great starting point for people new to this project.