Socket
Socket
Sign inDemoInstall

brew-image-react

Package Overview
Dependencies
1
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    brew-image-react

Generates responsive image URLs for various screen sizes and automatically lazy-loads them!


Version published
Weekly downloads
288
decreased by-7.1%
Maintainers
1
Install size
222 kB
Created
Weekly downloads
 

Readme

Source

Brew Images - React

Generates responsive image URLs for various screen sizes and automatically lazy-loads them!

Commands

The recommended workflow is to run TSDX in one terminal:

yarn start

This builds to /dist and runs the project in watch mode so any edits you save inside src causes a rebuild to /dist.

To do a one-off build, use yarn build.

To run tests, use yarn test.

To publish to NPM, run yarn publish.

Jest

Jest tests are set up to run with yarn test. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

Rollup

TSDX uses Rollup v1.x as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.

TypeScript

tsconfig.json is set up to interpret dom and esnext types, as well as react for jsx.

Optimizations

Please see the main tsdx optimizations docs. In particular, know that you can take advantage of development-only optimizations:

// ./types/index.d.ts
declare var __DEV__: boolean;

// inside your code...
if (__DEV__) {
  console.log('foo');
}
Testing Locally

Use yarn link to enable testing this package locally within another node project. Each time you make a change, you'll need to run yarn build for those changes to be propogated to the test environment.

FAQs

Last updated on 07 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc