Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-scroll-into-view-if-needed

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-into-view-if-needed - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/umd/standalone.js

5

package.json
{
"name": "react-scroll-into-view-if-needed",
"version": "1.0.1",
"version": "1.0.2",
"description": "A thin component wrapper around scroll-into-view-if-needed",

@@ -27,2 +27,3 @@ "main": "dist/umd/index.js",

"coveralls": "^3.0.0",
"cross-env": "^5.1.4",
"enzyme": "^3.3.0",

@@ -45,3 +46,3 @@ "enzyme-adapter-react-16": "^1.1.1",

"scripts": {
"build": "rollup -c",
"build": "rollup -c && cross-env BUILD_TYPE=standalone rollup -c",
"lint": "eslint ./src/**",

@@ -48,0 +49,0 @@ "prepublishOnly": "yarn build",

13

README.md

@@ -7,3 +7,3 @@ [![Build Status](https://travis-ci.org/icd2k3/react-scroll-into-view-if-needed.svg?branch=master)](https://travis-ci.org/icd2k3/react-scroll-into-view-if-needed)

A thin react component wrapper bundled with the fantastic [scroll-into-view-if-needed](https://www.npmjs.com/package/scroll-into-view-if-needed) polyfill.
A thin react component wrapper bundled with the fantastic [scroll-into-view-if-needed](https://www.npmjs.com/package/scroll-into-view-if-needed) [ponyfill](https://ponyfill.com).

@@ -32,2 +32,12 @@ ## Install

## Standalone Version
The standalone version does _not_ come bundled with [scroll-into-view-if-needed](https://www.npmjs.com/package/scroll-into-view-if-needed). Use this version if you'd like to maintain your own dependency for scroll-into-view-if-needed.
ES version:
`import ScrollIntoViewIfNeeded from 'react-scroll-into-view-if-needed/dist/es/standalone.js'`
UMD version:
`import ScrollIntoViewIfNeeded from 'react-scroll-into-view-if-needed/dist/umd/standalone.js'`
## Optional Props

@@ -52,1 +62,2 @@

The `options` prop simply passes options to `scroll-into-view-if-needed`. See all the possible options in their [API documentation](https://www.npmjs.com/package/scroll-into-view-if-needed#api).

@@ -7,7 +7,22 @@ import babel from 'rollup-plugin-babel';

const external = Object.keys(pkg.peerDependencies);
const globals = {
react: 'React',
const IS_STANDALONE_BUILD = process.env.BUILD_TYPE === 'standalone';
const name = 'react-scroll-into-view-if-needed';
const external = Object.keys(pkg.peerDependencies)
.concat(IS_STANDALONE_BUILD ? 'scroll-into-view-if-needed' : []);
const globals = { react: 'React' };
const rootOutputProps = {
exports: 'named',
globals,
name,
sourcemap: true,
};
const output = IS_STANDALONE_BUILD
? [
{ ...rootOutputProps, file: 'dist/umd/standalone.js', format: 'umd' },
{ ...rootOutputProps, file: 'dist/es/standalone.js', format: 'es' },
]
: [
{ ...rootOutputProps, file: pkg.main, format: 'umd' },
{ ...rootOutputProps, file: pkg.module, format: 'es' },
];

@@ -29,21 +44,5 @@ const config = {

external,
output: [
{
exports: 'named',
file: pkg.main,
format: 'umd',
globals,
name: 'react-scroll-into-view-if-needed',
sourcemap: true,
},
{
exports: 'named',
file: pkg.module,
format: 'es',
globals,
sourcemap: true,
},
],
output,
};
export default config;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc