• Stars
    star
    220
  • Rank 180,422 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โš™ shared react app configs

firstlookmedia/react-scripts

Provides configuration for universal React/Relay apps.

By default we expect a graphql server to exist as a separate service. The default template will query for { viewer { id } } but this is not required of the schema.

Install

npm install -g create-react-app

create-react-app --scripts-version=git+ssh://[email protected]/firstlookmedia/react-scripts.git my-app
cd my-app
yarn update-schema
yarn start

Usage

react-scripts expects at least the following files:

src/index.js    # entry to the client-side app
server.js       # entry to the server
schema.graphql  # your graphql schema

The output will become:

build/server.js             # compiled server
build/manifest.json         # manifest pointing source files to compiled
build/assets/32f2q8fj3.js   # example compiled app
build/assets/2d0823jd.css   # any other compiled assets (css, images, fonts)

yarn start

Starts the development environment:

yarn build

Builds the production assets to the build folder.

yarn test

Runs jest tests. react-scripts will look for any file named __spec.js.

You will need watchman to use yarn test without CI=true. To install on OSX brew bundle in this directory.

Persisted queries

To enable persisted queries:

  1. Add PERSIST_QUERIES: "true" in the build and runtime environments
  2. Point QUERIES_S3_BUCKET to an s3 bucket during build time to deploy queries, making them accessible to the graphql backend
  3. Upgrade to the newest version of React scripts that has the GET and POST fetcher methods
  4. Upgrade to relay >= 3.0

Note: persisted queries are always turned off during local development.

More Repositories

1

pdf-redact-tools

a set of tools to help with securely redacting and stripping metadata from documents before publishing
Python
524
star
2

gpgsync

๐Ÿ”’ GPG Sync is designed to let users always have up-to-date public keys for other members of their organization
Python
344
star
3

autocanary

Makes generating machine-readable, digitally signed warrant canary statements simpler
Python
147
star
4

dangerzone-converter

dangerzone has moved to https://github.com/freedomofpress/dangerzone
Python
39
star
5

aws-profile-gpg

๐Ÿ” โ˜๏ธ Run aws-cli commands using IAM Access Keys stored in a GPG-encrypted credentials file
Python
37
star
6

flock-agent

๐Ÿฆ‰ Agent for Flock, the privacy-preserving fleet management system
Python
32
star
7

flock-server

๐Ÿฆ‰ Flock is a privacy-preserving fleet management system powered by osquery and the Elastic Stack
Python
19
star
8

keylist-rfc

๐Ÿ” turning the system behind GPG Sync into an Internet standard
Makefile
16
star
9

gpgsync-firstlook-fingerprints

Signed list of OpenPGP fingerprints for First Look employees
15
star
10

firstlookmedia.github.io

11
star
11

deployables

๐Ÿ—‘๏ธ a basket of deploy scripts
Shell
10
star
12

homebrew-firstlookmedia

๐Ÿป homebrew tap for first look media projects
Ruby
3
star
13

dangerzone.rocks

dangerzone has moved to https://github.com/freedomofpress/dangerzone
CSS
3
star
14

hagrid-verifier

Submit all the keys on a keylist to keys.openpgp.org, and request email verification for all UIDs
Python
3
star
15

whistleblower

Headless browser testing utils via Jest and Puppeteer
JavaScript
2
star
16

deployables2

Python
2
star
17

keylist

First Look Media's keylist
Python
2
star
18

listcrunch

A JS port of MuckRock's listcrunch python library
TypeScript
1
star
19

ecstatic

:squirrel: ๐Ÿ” automatically update ecs agents and report issues via webhook
Python
1
star
20

pst

Clojure library to parse PFF databases.
Clojure
1
star
21

docker-placeholder-app

HTTP app intended to be used as a placeholder when spinning up an ECS cluster
Shell
1
star
22

docker-https-redirect

โ†ฉ๏ธ redirect http to https
1
star