open-index/open-npm huggingface dataset:
npm package: @stellar-apps/apollo
Description: This package contains `react-apollo` utilities and components
Author: Jared Lunde
Latest version: 3.0.1

# @stellar-apps/apollo
This package contains `react-apollo` utilities and components

## Installation
`yarn add @stellar-apps/apollo`

## Usage
```js
import {MutationForm, MutationButton} from '@stellar-apps/apollo'
```

### `MutationForm`
A render props component for easily implementing a `react-apollo`-based Mutation form using Formik. No
`fetch` polyfill is provided because the assumption is you're already implementing such a thing with
your Apollo implementation.

### Props
In addition to the props below, it inherits props from [Formik](https://jaredpalmer.com/formik/docs/api/formik#props-1)
and [react-apollo Mutation](https://www.apollographql.com/docs/react/essentials/mutations.html#props)
- `confirm {func}`
    - If defined, the mutation will only run if this function returns `true`
    - Receives two arguments `(formikValues, formikBag)` [seen here](https://jaredpalmer.com/formik/docs/api/formik#onsubmit-values-values-formikbag-formikbag-void)
- `prepareUpdate {func}`
    - **default** `({variables}) => ({variables})`
    - Should return an object to send to the `react-apollo` `mutate()` function. See 
      [here](https://www.apollographql.com/docs/react/api/react-apollo.html#mutation-render-prop)
      for details on additional options.
    - By default this returns the `{values}` from `Formik` as `{variables}`
    
### Render function
- `children(<formik>, <mutationResult>)`
    - `formik`
        - See [Formik render props](https://jaredpalmer.com/formik/docs/api/formik#children-reactreactnode-props-formikprops-values-reactnode)
    - `mutationResult`
        - See [Mutation result](https://www.apollographql.com/docs/react/api/react-apollo.html#mutation-render-prop) here

------


### `MutationButton`
A wrapper for `SpinnerButton` above and `react-apollo/Mutation`

### Props
In addition to the props below, this component also receives props for `SpinnerButton` above and
[react-apollo Mutation](https://www.apollographql.com/docs/react/essentials/mutations.html#props)
- `confirm {func}`
    - If defined, the mutation will only run if this function returns `true`
    - Receives two arguments `(formikValues, formikBag)` [seen here](https://jaredpalmer.com/formik/docs/api/formik#onsubmit-values-values-formikbag-formikbag-void)
- `prepareUpdate {func}`
    - **default** `({variables}) => ({variables})`
    - Should return an object to send to the `react-apollo` `mutate()` function. See 
      [here](https://www.apollographql.com/docs/react/api/react-apollo.html#mutation-render-prop)
      for details on additional options.
    - By default this returns the `{values}` from `Formik` as `{variables}`
npm package: @stellar-apps/babel-preset-es
Description: A babel preset for configuring ECMAScript-next features Stellar apps and packages.
Latest version: 1.0.7

# @stellar-apps/babel-preset-es
A babel preset for configuring ECMAScript-next features Stellar apps and packages.

## Installation
`yarn add --dev @stellar-apps/babel-preset-es`

## Usage
### `.babelrc`
```json
{
  "presets": [
    [
      "@stellar-apps/es", {
        "env": {
          "modules": false
        }
      }
    ]
  ]
}
```
## Included presets
- `@babel/preset-env`

## Included plugins
- `@babel/plugin-transform-runtime`
- `@babel/plugin-proposal-class-properties`
- `@babel/plugin-proposal-export-default-from`
- `@babel/plugin-proposal-export-namespace-from`
- `@babel/plugin-proposal-logical-assignment-operators`
- `@babel/plugin-proposal-nullish-coalescing-operator`
- `@babel/plugin-transform-object-assign`
- `@babel/plugin-proposal-object-rest-spread`
- `@babel/plugin-proposal-optional-chaining`
- `@babel/plugin-syntax-dynamic-import`
- `@babel/plugin-syntax-import-meta`
- `babel-plugin-closure-elimination`
- `babel-plugin-macros`
- `babel-plugin-dev-expression`

## Options
### `env`
- *default* `{loose: true}`
- Define `false` to turn off `@babel/preset-env`

### `runtime`
- *default* `{}`
- Define `false` to turn off `@babel/plugin-transform-runtime`

### `classProps`
- *default* `{loose: true}`

### `macros`
- Define `false` to turn off `babel-plugin-macros`
npm package: @stellar-apps/babel-preset-react
Description: A babel preset for configuring React transforms in Stellar apps and packages.
Latest version: 1.0.4

# @stellar-apps/babel-preset-react
A babel preset for configuring React transforms in Stellar apps and packages.

## Installation
`yarn add --dev @stellar-apps/babel-preset-react`

## Usage
### `.babelrc`
```json
{
  "presets": [
    [
      "@stellar-apps/react", {
        "transformConstant": true,
        "transformPure": false
      }
    ]
  ]
}
```
## Included presets
- `@babel/preset-react`

## Included plugins
- `@babel/plugin-transform-react-constant-element`
- `babel-plugin-transform-react-pure-components`
- `babel-plugin-transform-react-remove-prop-types`

## Options
### `transformPure`
- Define `false` to turn off `babel-plugin-transform-react-pure-components`

### `transformConstant`
- Define `false` to turn off `@babel/plugin-transform-react-constant-element`

### `removePropTypes`
- Define `false` to turn off `babel-plugin-transform-react-remove-prop-types`
npm package: @stellar-apps/babel-preset-react-app
Description: A babel preset for configuring React web applications in Stellar apps.
Latest version: 1.0.20

# @stellar-apps/babel-preset-react-app
A babel preset for configuring React web applications in Stellar apps.

## Installation
`yarn add --dev @stellar-apps/babel-preset-react-app`

## Usage
### `.babelrc`
```json
{
  "presets": [
    [
      "@stellar-apps/react-app", {
        "es": {
          "env": {
            "modules": false
          }
        },
        "react": {
          "transformConstant": true
        },
        "emotion":  false
      }
    ]
  ]
}
```

## Included presets
- `@stellar-apps/babel-preset-es`
- `@stellar-apps/babel-preset-react`
- `@emotion/babel-preset-css-prop`

## Included plugins
- `babel-plugin-polished`

## Options
### `es`
- Configures [`@stellar-apps/babel-preset-es`](https://github.com/jaredLunde/stellar-apps/tree/master/packages/babel-presets/babel-preset-es)
- *default* 
```js
{
  env: {
    "useBuiltIns": "usage",
    "loose": true,
    "modules": false
  },
  "runtime": {
    corejs: 3
  }
}
```

### `react`
- Configures [`@stellar-apps/babel-preset-react`](https://github.com/jaredLunde/stellar-apps/tree/master/packages/babel-presets/babel-preset-react)

### `emotion`
- Configures `@emotion/babel-preset-css-prop`
- Define `false` to turn off this plugin
- *default* 
```js
// development
{"sourceMap": true}
// production
{"sourceMap": false, "hoist": true}
```

### `polished`
- Configures `babel-plugin-polished`
- Define `false` to turn off this plugin
npm package: @stellar-apps/content
Description: A component for establishing site-wide content widths
Author: Jared Lunde
Latest version: 4.1.0

# @stellar-apps/content
A component for establishing site-wide content widths

## Installation
`yarn add @stellar-apps/content`

## Usage
```js
import Content from '@stellar-apps/content'


function HomePage(props) {
  return (
    <Box>
      <Content>
        Some content constrained to the content width
      </Content>
      
      <Content slim>
        Some content constrained to the slim content width
      </Content>
    </Box>
  )
}
```

### `Content`
### Props
In addition to the props below, this component accepts any prop that `curls/Box` accepts.
- `slim {bool}`
    - **default** `width * 0.61803398875 // golden ratio`
    - Uses the `slimWidth` defined in the theme

### defaultCSS
```js
const defaultCSS = css`
  width: 100%;
  margin-left: auto;
  margin-right: auto;
`
```

### defaultTheme
```js
const defaultTheme = {
  width: 1360,
  slimWidth: null // width * 0.61803398875
}
```
npm package: @stellar-apps/errors
Description: This package contains an Error provider and formatter  around `@jaredlunde/curls-addons/Alerts` for displaying errors in a Drawer-like fashion from the top of the viewport.
Author: Jared Lunde
Latest version: 3.0.2

# @stellar-apps/errors
This package contains an Error provider and formatter  around `@jaredlunde/curls-addons/Alerts` for 
displaying errors in a Drawer-like fashion from the top of the viewport.

## Installation
`yarn add @stellar-apps/errors`

## Usage
```js
import {Errors, ErrorsProvider, ErrorsConsumer} from '@stellar-apps/errors'

function App (props) {
  return (
    <ErrorsProvider> {/** Stores the errors */}
      <ErrorsConsumer>
        {({setErrors}) => (
          <>
            <Errors/> {/** Displays the errors */}
            <SomeForm onError={setErrors}/> {/** Sets the errors */}
          </>
        )}
      </ErrorsConsumer>
    </ErrorsProvider>
  )
}
```

### `ErrorsProvider`
Provides context for error handling

### Props
- `formatter {func}`
    - Formats any incoming errors from `setErrors()` in the `ErrorsConsumer`

------

### `ErrorsConsumer`
Provides a function for setting errors (`setErrors`) and an array of current errors in the
error context

### Render props
- `setErrors {func}`
    - Accepts one argument for setting new errors.
        - When the argument is a function, this works exactly like `setState`
        - When the argument is not a function, any existing errors will be replaced by
          the errors provided here
    - Errors should stick to a format similar to `{code: 400, message: 'Foo'}` to work with the
      `Errors` component out of the box.
       
- `errors {array}`
    - **default** `[]`
    - An array of all current errors in the context
    
------

### `Errors`
A component for displaying errors in the context in a Drawer-like fashion from the top of the
viewport

### Props
In addition to the props below, you can provide props for `@jaredlunde/curls-addons/Alerts`
- `errorBox {func}`
    - Renders each individual error
    - Has one argument for the following object:
        - `{n, id, code, message}`
            - `n {number}`
                - The index of this error in the `errors` array
            - `id {number|string}`
                - The ID of the error
            - `code {number}`
                - Error code if provided in `setErrors`
            - `message {string}`
                - The error message
npm package: @stellar-apps/fetcher
Description: A useful set of components for fetching JSON data on both the client and server side.
Author: Jared Lunde
Latest version: 2.0.8

# @stellar-apps/fetcher
A useful set of components for fetching JSON data on both the client and server side.

## Installation
`yarn add @stellar-apps/fetcher`

## Usage
```js
import * as Fetcher from '@stellar-apps/fetcher'


export default function App () {
  return (
    <Fetcher.FetcherProvider>
      <Fetcher.Fetch>
        {({status, response}) => status !== 'done' ? status : (
          JSON.stringify(response.data)
        )}
      </Fetcher.Fetch>
    </Fetcher.FetcherProvider>
  )
}
```
npm package: @stellar-apps/get-default-matches
Description: Determines the default breakpoint to set for a `curls/BreakPoint` component based upon the device returned by the curls `theme.grid.device` (one of desktop/mobile/tablet).
Author: Jared Lunde
Latest version: 2.0.2

# @stellar-apps/get-default-matches
Determines the default breakpoint to set for a `curls/BreakPoint` component based upon the
device returned by the curls `theme.grid.device` (one of desktop/mobile/tablet).

In `inst-app` apps, the device type is determined by Amazon CloudFront headers when
using Lambda and APIGateway.

```js
// From @inst-app/ssr
function getDevice (headers) {
  if (headers['cloudfront-is-smarttv-viewer'] === 'true') {
    return 'desktop'
  }
  else if (headers['cloudfront-is-tablet-viewer'] === 'true') {
    return 'tablet'
  }
  else if (headers['cloudfront-is-mobile-viewer'] === 'true') {
    return 'mobile'
  }
  else if (headers['cloudfront-is-desktop-viewer'] === 'true') {
    return 'desktop'
  }
}
```

## Installation
`yarn add @stellar-apps/get-default-matches`

## Usage
```js
import {ThemeProvider, BreakPoint, Box} from 'curls'
import getDefaultMatches from '@stellar-apps/get-default-matches'
import theme from '~/theme'


function App ({device}) {
  const curlsTheme = {grid: {}, ...theme}
    
  if (device) {
    curlsTheme.grid.device = device
  }
    
  return (
    <ThemeProvider theme={curlsTheme}>
      <BreakPoint sm defaultMatches={getDefaultMatches('sm')}>
        {({matches}) => <Box p={matches.sm ? 2 : 3}/>}
      </BreakPoint>
    </ThemeProvider>
  )
}
```

### `getDefaultMatches(...<breakPoints>)`
- `breakPoints {string}`
    - One or several `xxs`, `xs`, `sm`, `md`, `lg`, `xl`, `xxl`
    - Should generally be the same as the flags provided to the `BreakPoint` component
npm package: @stellar-apps/hamburger-menu
Description: A component for creating configurable and versatile hamburger menus and hamburgers.
Author: Jared Lunde
Latest version: 4.1.0

# @stellar-apps/hamburger-menu
A component for creating configurable and versatile hamburger menus and hamburgers.

## Installation
`yarn add @stellar-apps/hamburger-menu`

## Usage
```js
import HamburgerMenu, {createHamburger} from '@stellar-apps/hamburger-menu'


const Hamburger = createHamburger({numLines: 3})

function Header (props) {
  return (
    <HamburgerMenu hamburger={Hamburger} fromLeft>
      {({show, hide, toggle, isVisible}) => (
        <Box bg='primary' w='100%' h='100%' ov='auto touch'>
          This is the menu
        </Box>
      )}
    </HamburgerMenu>
  )
}
```

### `HamburgerMenu`
A render props component for creating hamburger menus

### Props
This component also accepts any props that the `as` component takes
- `hamburger {func}`
    - **default** function returned by `createHamburger()`
- `as {React.Component}`
    - **default** `curls/Drawer`
    - A context Provider which controls the logic for opening and closing of the collapsible menu portion
      of the hamburger menu. Its render props `show`, `hide`, `toggle`, and `isVisible` are also
      provided to the `@hamburger` function.
- `menuAs {React.Component}`
    - **default** `curls/DrawerBox`
    - The Consumer half to the `as` Provider component. It is used for rendering the collapsible menu
      portion of the hamburger menu. It also any receives any ref provided to the `HamburgerMenu` component.
- `children {func}`
    - Returns the collapsible menu of portion of the hamburger menu. It is provided as the child
      component to `menuAs`. It receives the render props from `curls/DrawerBox` by default.
      
------

### `createHamburger(<options>)`
- `options {object}`
    - `color {string}`
        - **default** `primary`
        - The `background-color` of the resulting Hamburger lines
    - `numLines {number}`
        - **default** `3`
        - The number of lines to render for the Hamburger
    - `closeButton {func}`
        - A function for rendering a close button. The function receives the props `show`, `hide`, `toggle`, 
          and `isVisible`.
    - `ref {func}`
        - A ref forwarded to the `<Button>` which wraps this component
    - `...props`
        - Additional props forwarded to the `<Button>` which wraps this component

### Hamburger line `defaultTheme`
```js

const defaultTheme = {
  color: 'primary',
  getLine: n => css`
    width: 18px;
    height: 2px;
    min-height: 2px;
    border-radius: 2px;
    margin-top: 1px;
    margin-bottom: 1px;
    position: relative;
    contain: strict;
  `
}
```
npm package: @stellar-apps/made-by-stellar
Description: `yarn add @stellar-apps/made-by-stellar`
Author: Jared Lunde
Latest version: 3.0.3

# @stellar-apps/made-by-stellar

`yarn add @stellar-apps/made-by-stellar`

## Usage
```js
import MadeByStellar from '@stellar-apps/made-by-stellar'


<MadeByStellar color='primaryLink' m='x4'/>
// <a href='https://BeStellar.co/' target='_blank' rel='noopener noreferrer'>
//   Made with <img>🚀</img> by Stellar
// </a>
```

### MadeByStellar

### Props
Inherits props from `curls/A` component

- `iconSize {number}`
    - **default** `16`
    - Changes the size of the rocket icon
npm package: @stellar-apps/min-height-hero
Description: A Hero component that sets the viewport's height as a `min-height` unless the `maxHeight` prop is set and exceeds the viewport height.
Author: Jared Lunde
Latest version: 3.0.0

# @stellar-apps/min-height-hero
A Hero component that sets the viewport's height as a `min-height` unless the `maxHeight` prop
is set and exceeds the viewport height.

## Installation
`yarn add @stellar-apps/min-height-hero`

## Usage
```js
import Hero from '@stellar-apps/min-height-hero'

function HomePage (props) {
  return (
    <Hero headerID='my-header' maxHeight={900}>
      
    </Hero>
  )
}
```

### Hero
#### Props
- `maxHeight {number}`
    - **default** `Infinity`
    - The maximum allowed height of the Hero
- `headerID {string}`
    - **default** `main-header`
    - A header DOM id to subtract from the height of the hero. i.e. if provided and 
      the header element's height is 96, the height of the hero will be 
      `viewportHeight - 96`
- `footerID {string}`
    - **default** `null`
    - A footer DOM id to subtract from the height of the hero. i.e. if provided and 
      the footer element's height is 96, the height of the hero will be 
      `viewportHeight - 96`
npm package: @stellar-apps/scripts
Description: A set of scripts for managing [BeStellar.co](https://BeStellar.co) apps
Author: Jared Lunde
Latest version: 1.0.22

# @stellar-apps/scripts
A set of scripts for managing [BeStellar.co](https://BeStellar.co) apps 

## Installation
`yarn add @stellar-apps/scripts`

## Usage
```bash
# Starts dev server in apps that possess them
stellar-scripts start
stellar-scripts start production

# Deploys the application code
stellar-scripts deploy
stellar-scripts deploy production
# Deploys the application code and the complete CloudFormation stack
stellar-scripts deploy --stack
stellar-scripts deploy production --stack

# Bundles application code in applicable apps
stellar-scripts bundle
stellar-scripts bundle production

# Tears down the application stack
stellar-scripts teardown
stellar-scripts teardown production
```

### `stellar-scripts start [stage]`
Starts dev server in apps that possess them. See `stellar-scripts start --help` for options.

-----

### `stellar-scripts deploy [stage] [--stack]`
Deploys only the application code when `--stack` flag is not present, otherwise deploys the 
complete CloudFormation stack. See `stellar-scripts deploy --help` for options.

-----

### `stellar-scripts bundle [stage]`
Bundles application code in applicable apps. See `stellar-scripts bundle --help` for options.

-----

### `stellar-scripts teardown [stage]`
Tears down the application stack by running `serverless remove --stage [stage]`. 
See `stellar-scripts teardown --help` for options.

-----
npm package: @stellar-apps/scroll-to-link
Description: A link component for scrolling to a particular querySelector on the page using an easing function.
Author: Jared Lunde
Latest version: 3.0.0

# @stellar-apps/scroll-to-link
A link component for scrolling to a particular querySelector on the page using an easing
function.

## Installation
`yarn add @stellar-apps/scroll-to-link`

## Usage
```js
import ScrollToLink from '@stellar-apps/scroll-to-link'


<ScrollToLink to='#some-id' duration={500}/>
```

### `ScrollToLink`
### Props
- `as {React.Component}`
    - **default** `curls/A`
    - The type of Component to render the scroll link as
- `to {string}`
    - The query selector to scroll to when the link is clicked. e.g. `#your-cool-id`
- `duration {number]`
    - **default** 400
    - The amount of time to spend scrolling to the element defined in `to`
- `timing {func}`
    - **default** `BezierEasing(0.4, 0, 0.2, 1)`
    - The timing function used to ease the scrolling
- `offset {number}`
    - A positive or negative offset used to add a padding to the position of the
      element you're scrolling to. If positive, it will scroll past the element by the
      defined amount.
npm package: @stellar-apps/select
Description: A component for creating `<select>` menus which use the native `<select>` functionality on touch devices while using custom functionality on all other devices.
Author: Jared Lunde
Latest version: 2.0.6

# @stellar-apps/select
A component for creating `<select>` menus which use the native `<select>` functionality 
on touch devices while using custom functionality on all other devices.

## Installation
`yarn add @stellar-apps/select`

## Usage
```js
import _ from '@stellar-apps/select'
```
npm package: @stellar-apps/seo
Description: Basic tools for killing several birds with one stone in non-complex meta data situations.
Author: Jared Lunde
Latest version: 2.0.2

# @stellar-apps/seo
Basic tools for killing several birds with one stone in non-complex meta data situations. 

## Installation
`yarn add @stellar-apps/seo`

## Usage
```js
import Helmet from 'react-helmet'
import {getTitle} from '@stellar-apps/seo'

function HomePage (props) {
  return (
    <Helmet>
      {getTitle('Stellar - Denver, CO')}
      {/**
        <title key='0'>Stellar - Denver, CO</title>
        <meta name="twitter:title" content='Stellar - Denver, CO'>
        <meta property="og:title" content='Stellar - Denver, CO'>
       **/}
    </Helmet>
  )
}
```

### `getTitle(<title>)`
- `title {string}`
    - Creates a `<title>`, `<meta name='twitter:title'/>`, and `<meta property='og:title'/>`
      component

-----

### `getDescription(<description>)`
- `description {string}`
    - Creates a `<meta name='description'/>` and `<meta property='og:description'/>`
      component

-----   

### `getCanonical(<url>, <options>)`
- `url {string}`
    - Creates a `<link rel='canonical'/>`, `<meta name='twitter:url'/>`, and `<meta property='og:url'/>`
      component
- `options {object}`
    - `resolve {func}`
        - If provided, will resolve the `@url` using this function

-----
     
### `getMetaImage(<url>)`
- `url {string}`
    - Creates a `<meta property="og:image"/>` and `<meta name="twitter:image"/>` component

-----
  
### `getTwitterCard(<content>, <options>)`
- `content {string}`
    - **default** `summary_large_image`
    - One of `summary_large_image`, `player`, or `summary`
- `options {object}`
    - `twitterHandle {string}`
        - The Twitter handle to link to the page 
    - `origin {string}`
        - The Twitter domain associated with the Twitter handle's page
npm package: @stellar-apps/serverless-certificate-manager
Description: An ACM certificate manager which allows for certificate re-use and re-issuing outside the scope of CloudFormation, while still acting in coalition with it. This plugin will automatically create your ACM certificates before your first deployment and wait f
Author: Jared Lunde
Latest version: 1.0.9

# @stellar-apps/serverless-certificate-manager
An ACM certificate manager which allows for certificate re-use and re-issuing outside the scope
of CloudFormation, while still acting in coalition with it. This plugin will automatically create 
your ACM certificates before your first deployment and wait for them to become valid before continuing 
your deployment. You can inject the resulting ARNs elsewhere in your config, i.e. a CloudFront distribution.
It will not run when individual functions are deployed.

## Installation
`yarn add --dev @stellar-apps/serverless-certificate-manager`

## Usage
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-certificate-manager
 
custom:
  certificateManager:
    - retain: true
      domains:
        - foobar.com
        - '*.foobar.com'
    - refFor: resources.Resource.SomeAWSResource.AcmCertificateArn
      domains:
        - 'foobar.baz'
```

## Configuration
- `domains {array}`
    - **required**
    - An array of domain names to add to your certificate
- `retain {bool}`
    - **default** `false`
    - Retains the certificate on `sls remove` if `true`, otherwise the certificate is deleted
- `refFor {Array<string>}`
    - Object paths (`custom.bar.baz`) to properties in your Serverless configuration where you'd
      like the resulting certificate ARN to be injected. This is useful when sharing wildcard
      certificates between configurations where you don't want to lose the benefits of a pure
      CloudFormation implementation. These are injected on each `sls deploy`.
    - **Example**
 ```yaml
    certificateManager:
       - refFor:
          - resources.Resources.CloudFrontDistribution.Properties.DistributionConfig.ViewerCertificate.AcmCertificateArn
 ```
- `profile {string}`
    - **default** `provider.profile || process.env.AWS_PROFILE`
    - An AWS profile to use when creating the certificate
- `region {string}`
    - **default** `provider.region || process.env.AWS_REGION || 'us-east-1'`
    - The region to create your certificate in
    
## Commands
### `sls create-certs`
Creates certificates for the domains in your configuration if they are not already attached to
other certificates. Also injects the `refFor` properties into your config.

-----

### `sls get-certs`
Gets the JSON object result of `describeCertificate` attached to the domains in your 
configuration.

-----

### `sls remove-certs`
Deletes the certificates defined in your configuration where the `retain` property is not `true`

-----

### `sls has-valid-certs`
Checks to see if your configurations have valid certificates attached to them
npm package: @stellar-apps/serverless-dotenv
Description: A Serverless plugin that injects .env files into your serverless.yml based upon the `provider.stage`.
Author: Jared Lunde
Latest version: 1.0.5

# @stellar-apps/serverless-dotenv
A Serverless plugin that injects .env files into your serverless.yml based upon the
`provider.stage`.

By default, this plugin will assign all of the environment variables to each function
in your config. You can override this behavior with the `exclude` and `include` options 
below.

## Installation
`yarn add --dev @stellar-apps/serverless-dotenv`

## Usage
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-dotenv
 
custom:
  dotenv:
    exclude: 
      - 'SERVERLESS*'
```

## Options
**NOTE:** When both `include` and `exclude` options are defined `exclude` will take precedence over `include`. 
That is, you cannot define both at the same time.
- `path {string}`
    - **default** `.env.[--stage] || .env`
    - The path to your `.env` file relative to your `serverless.yml` file
- `exclude {array|object}`
    - An array of glob patterns which only exclude environment variables whose name match
      the glob
- `include {array|object}`
    - An array of glob patterns which only include environment variables whose name match
      the glob
  
### Examples using `exclude`
Excludes all environment variables that start with `SERVERLESS` from all functions
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-dotenv
 
custom:
  dotenv:
    exclude: 
      - 'SERVERLESS*'
```

Excludes all environment variables that start with `SERVERLESS` from the `main` function
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-dotenv
 
custom:
  dotenv:
    exclude: 
      main: 
        - 'SERVERLESS*'
```

### Examples using `include`
Includes all environment variables that start with `APP` in all functions
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-dotenv
 
custom:
  dotenv:
    include: 
      - 'APP*'
```

Includes all environment variables that start with `APP` in the `main` function
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-dotenv
 
custom:
  dotenv:
    include: 
      main: 
        - 'APP*'
```

### Example without `include` or `exclude`
```yaml
# serverless.yml
plugins:
  - @stellar-apps/serverless-dotenv

functions:
  main:
    environment:
       FOO: ${env:FOO}
       
custom:
  dotenv:
    path: '.env'  # NOTE: you don't actually have to define this as this is the default
```

## Credits
Inspiration and some code was derived from [serverless-dotenv-plugin](https://raw.githubusercontent.com/colynb/serverless-dotenv-plugin/master/index.js)
npm package: @stellar-apps/viewport-hero
Description: A Hero component that sets the viewport's height as a `height`.
Author: Jared Lunde
Latest version: 2.0.3

# @stellar-apps/viewport-hero
A Hero component that sets the viewport's height as a `height`.

## Installation
`yarn add @stellar-apps/viewport-hero`

## Usage
```js
import Hero from '@stellar-apps/viewport-hero'

function HomePage (props) {
  return (
    <Hero headerID='my-header' maxHeight={900}>
      
    </Hero>
  )
}
```

### Hero
#### Props
- `headerID {string}`
    - **default** `main-header`
    - A header DOM id to subtract from the height of the hero. i.e. if provided and 
      the header element's height is 96, the height of the hero will be 
      `viewportHeight - 96`
- `footerID {string}`
    - **default** `null`
    - A footer DOM id to subtract from the height of the hero. i.e. if provided and 
      the footer element's height is 96, the height of the hero will be 
      `viewportHeight - 96`
npm package: @stellar-apps/webpack
Description: Used for creating webpack configurations for Stellar apps with predefined `development` and `production` configs.
Author: Jared Lunde
Latest version: 1.0.23

# @stellar-apps/webpack
Used for creating webpack configurations for Stellar apps with predefined `development`
and `production` configs.

The configs provided to the `createDevelopment` and `createProduction` functions are merged
to the default config in those functions and the default config in `createConfig`.

See the `src` code to view the default configs. 

This also comes packaged with a `startDevServer` function which creates a Webpack development
server with the provided `config`, `port`, and `webpack-dev-server` options.

## Installation
`yarn add @stellar-apps/webpack`

## Usage
```js
const {createDevelopment, createProduction} = require('@stellar-apps/webpack')

const myDevConfig = createDevelopment({
  ...devConfigs
})

const myProdConfig = createProduction({
  ...prodConfigs
})
```

### `startDevServer (options <Object>)`
- `options`
    - `config {obj}`
        - Webpack configuration object
    - `port {number}`
        - The port number to start the dev server on
    - `...opt`
        - Additional options which are provided to the `new DevServer()` constructor
        - See: https://webpack.js.org/configuration/dev-server/
npm package: @stellar-apps/webpack-rimraf-plugin
Description: Does one thing and one thing only - rimraf's the `output.path` defined in your Webpack configuration. There are no, options, nothing special to know. I just didn't want to have to define the output path in multiple locations. Simple as that.
Author: Jared Lunde
Latest version: 1.0.5

# @stellar-apps/webpack-rimraf-plugin
Does one thing and one thing only - rimraf's the `output.path` defined in your Webpack 
configuration. There are no, options, nothing special to know. I just didn't want to have
to define the output path in multiple locations. Simple as that.

## Installation
`yarn add @stellar-apps/webpack-rimraf-plugin`

## Usage
```js
const path = require('path')
const WebpackRimrafPlugin = require('@stellar-apps/webpack-rimraf-plugin')

module.exports = {
  output: {
    // this will get nuked before Webpack assets emit
    path: path.resolve(__dirname, 'dist/server')
  },
  plugins: [
    new WebpackRimrafPlugin()
  ]
}
```
npm package: @stellar-asset-lists/sdk
Description: Thin wrapper library for asset list catalogue
Author: team@stellar.expert
Latest version: 1.0.1

# @stellar-asset-lists/sdk

Thin wrapper library for the Stellar asset list catalogue. The easiest way to start using SAL in your web app. 

## Installation

```shell
npm i @stellar-asset-lists/sdk
```

## Usage

### Fetch available asset lists from the community-managed catalogue

```js
const allLists = await fetchAvailableAssetLists()
/*
[
  {
    "name": "AssetList1",
    "provider": "Stellar community",
    "description": "Assets approved by Stellar community members",
    "url": "https://stellar.community/asset-list",
    "icon": "https://gateway.ipfs.io/ipfs/bafkreibpzncuhbk5ozhdw7xkcdoyf3xhwhcwcf6sj7axjzimxw6vm6pvyy"
  }
]
 */
```

### Fetch and parse specific asset list

```js
const list = await fetchAssetList('https://stellar.community/asset-list')

/*
{
  "name": "Stellar Top 50",
  "provider": "StellarExpert",
  "description": "Assets approved by Stellar community members",
  "version": "1.0",
  "feedback": "https://stellar.community/feedback",
  "assets": [
    {
      "code": "yXLM",
      "issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55",
      "org": "Ultra Stellar LLC dba Ultra Stellar",
      "domain": "ultrastellar.com",
      "icon": "https://ipfs.io/ipfs/bafkreihntcz2lpaxawmbhwidtuifladkgew6olwuly2dz5pewqillhhpay",
      "decimals": 7
    },
    {
      "code": "USDC",
      "issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
      "name": "USD Coin",
      "org": "Centre Consortium LLC dba Centre Consortium",
      "domain": "centre.io",
      "icon": "https://ipfs.io/ipfs/bafkreibpzncuhbk5ozhdw7xkcdoyf3xhwhcwcf6sj7axjzimxw6vm6pvyy",
      "decimals": 7
    }
  ]
}
*/
```

### Change resolver parameters

```js
setAssetListResolverOptions({
    catalogueUrl: 'https://stellar-asset-lists.github.io/index/', //replace the URL of the catalogue
    ipfsGatewayUrl: 'https://gateway.ipfs.io/ipfs/' //change default IPFS gateway URL
})
```

## Testing

```shell
npm run test
```