npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

relay-config

v12.0.1

Published

Config parser for Relay applications.

Downloads

64,334

Readme

Relay Config

Only works with Relay 12 and below, Relay 13 does not use this format

Handles the config which would traditionally be passed into the relay-compiler via the CLI command-line, or inside the babel plugin config.

To use this package, first install it: yarn add relay-config, then create a relay.config.js which includes fields the relay-compiler CLI describes:

// relay.config.js
module.exports = {
  // ...
  // Configuration options accepted by the `relay-compiler` command-line tool and `babel-plugin-relay`.
  src: "./src",
  schema: "./data/schema.graphql",
  exclude: ["**/node_modules/**", "**/__mocks__/**", "**/__generated__/**"],
}

Here's the full CLI input reference (as of Relay v12)

relay-compiler --schema <path> --src <path> [--watch]

Options:
  --schema              Path to schema.graphql or schema.json[string] [required]
  --src                 Root directory of application code   [string] [required]
  --include             Directories to include under src
                                                       [array] [default: ["**"]]
  --exclude             Directories to ignore under src        [array] [default:
                 ["**/node_modules/**","**/__mocks__/**","**/__generated__/**"]]
  --extensions          File extensions to compile (defaults to extensions
                        provided by the language plugin)                 [array]
  --verbose             More verbose logging          [boolean] [default: false]
  --quiet               No output to stdout           [boolean] [default: false]
  --watchman            Use watchman when not in watch mode
                                                       [boolean] [default: true]
  --watch               If specified, watches files and regenerates on changes
                                                      [boolean] [default: false]
  --validate            Looks for pending changes and exits with non-zero code
                        instead of writing to disk    [boolean] [default: false]
  --persistFunction     An async function (or path to a module exporting this
                        function) which will persist the query text and return
                        the id.                                         [string]
  --persistOutput       A path to a .json file where persisted query metadata
                        should be saved. Will use the default implementation
                        (md5 hash) if `persistFunction` is not passed.  [string]
  --repersist           Run the persist function even if the query has not
                        changed.                      [boolean] [default: false]
  --noFutureProofEnums  This option controls whether or not a catch-all entry is
                        added to enum type definitions for values that may be
                        added in the future. Enabling this means you will have
                        to update your application whenever the GraphQL server
                        schema adds new enum values to prevent it from breaking.
                                                      [boolean] [default: false]
  --language            The name of the language plugin used for input files and
                        artifacts               [string] [default: "javascript"]
  --artifactDirectory   A specific directory to output all artifacts to. When
                        enabling this the babel plugin needs `artifactDirectory`
                        set as well.                                    [string]
  --customScalars       Mappings from custom scalars in your schema to built-in
                        GraphQL types, for type emission purposes. (Uses yargs
                        dot-notation, e.g. --customScalars.URL=String)
  --eagerESModules      This option enables emitting es modules artifacts.
                                                      [boolean] [default: false]