Skip to content

Commit

Permalink
Revert "Use lodash-es instead of lodash (casesandberg#722)"
Browse files Browse the repository at this point in the history
This reverts commit d08a46b.
  • Loading branch information
atfzls committed Aug 19, 2020
1 parent c11939c commit 1813345
Show file tree
Hide file tree
Showing 22 changed files with 33 additions and 46 deletions.
12 changes: 1 addition & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
{
"env": {
"test": {
"presets": ["es2015", "stage-0", "react"]
}
},
"presets": [
[
"es2015",
{
"modules": false
}
],
"es2015",
"stage-0",
"react"
]
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ node_modules
package-lock.json

lib
es
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "2.18.1",
"description": "A Collection of Color Pickers from Sketch, Photoshop, Chrome & more",
"main": "lib/index.js",
"module": "es/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/casesandberg/react-color.git"
Expand All @@ -17,11 +16,9 @@
"test": "npm run jest && npm run eslint",
"jest": "jest",
"eslint": "eslint src/**/*.js",
"lib": "npm run clean-lib && babel --no-babelrc --presets=es2015,stage-0,react src -d lib",
"es": "npm run clean-es && babel src -d es",
"clean-lib": "rm -rf lib && mkdir lib",
"clean-es": "rm -rf es && mkdir es",
"prepublish": "npm run lib && npm run es",
"lib": "npm run clean && babel src -d lib",
"clean": "rm -rf lib && mkdir lib",
"prepublish": "npm run lib",
"docs": "npm run docs-server",
"docs-server": "node ./scripts/docs-server",
"docs-dist": "node ./scripts/docs-dist",
Expand All @@ -44,7 +41,7 @@
],
"dependencies": {
"@icons/material": "^0.2.4",
"lodash-es": "^4.17.15",
"lodash": "^4.17.11",
"material-colors": "^1.2.1",
"prop-types": "^15.5.10",
"reactcss": "^1.2.0",
Expand All @@ -61,7 +58,7 @@
"@storybook/react": "^3.2.4",
"babel-cli": "^6.8.0",
"babel-core": "^6.10.4",
"babel-jest": "^20.0.3",
"babel-jest": "^16.0.0",
"babel-loader": "^6.2.1",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
Expand All @@ -77,7 +74,7 @@
"html-loader": "^0.3.0",
"html-webpack-plugin": "^3.2.0",
"i": "^0.3.5",
"jest": "^20.0.4",
"jest": "^16.0.2",
"jest-cli": "^20.0.4",
"jsx-loader": "^0.13.2",
"mocha": "^2.4.5",
Expand All @@ -100,15 +97,11 @@
"webpack-dev-server": "^1.10.1"
},
"files": [
"lib",
"es"
"lib"
],
"jest": {
"rootDir": "src",
"testRegex": "spec.js$",
"transformIgnorePatterns": [
"/!node_modules\\/lodash-es/"
]
"testRegex": "spec.js$"
},
"eslintConfig": {
"extends": "@case",
Expand Down
2 changes: 1 addition & 1 deletion src/components/block/Block.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'
import color from '../../helpers/color'

import { ColorWrap, EditableInput, Checkboard } from '../common'
Expand Down
2 changes: 1 addition & 1 deletion src/components/block/BlockSwatches.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import reactCSS from 'reactcss'
import { map } from 'lodash-es'
import map from 'lodash/map'

import { Swatch } from '../common'

Expand Down
2 changes: 1 addition & 1 deletion src/components/chrome/Chrome.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'

import { ColorWrap, Saturation, Hue, Alpha, Checkboard } from '../common'
import ChromeFields from './ChromeFields'
Expand Down
2 changes: 1 addition & 1 deletion src/components/chrome/ChromeFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react'
import reactCSS from 'reactcss'
import color from '../../helpers/color'
import { isUndefined } from 'lodash-es'
import isUndefined from 'lodash/isUndefined'

import { EditableInput } from '../common'
import UnfoldMoreHorizontalIcon from '@icons/material/UnfoldMoreHorizontalIcon'
Expand Down
3 changes: 2 additions & 1 deletion src/components/circle/Circle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { map, merge } from 'lodash-es'
import map from 'lodash/map'
import merge from 'lodash/merge'
import * as material from 'material-colors'

import { ColorWrap } from '../common'
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/ColorWrap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component, PureComponent } from 'react'
import { debounce } from 'lodash-es'
import debounce from 'lodash/debounce'
import color from '../../helpers/color'

export const ColorWrap = (Picker) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Raised.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'

export const Raised = ({ zDepth, radius, background, children,
styles: passedStyles = {} }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Saturation.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PureComponent } from 'react'
import reactCSS from 'reactcss'
import { throttle } from 'lodash-es'
import throttle from 'lodash/throttle'
import * as saturation from '../../helpers/saturation'

export class Saturation extends (PureComponent || Component) {
Expand Down
3 changes: 2 additions & 1 deletion src/components/compact/Compact.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { map, merge } from 'lodash-es'
import map from 'lodash/map'
import merge from 'lodash/merge'
import color from '../../helpers/color'

import { ColorWrap, Raised } from '../common'
Expand Down
3 changes: 2 additions & 1 deletion src/components/github/Github.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { map, merge } from 'lodash-es'
import map from 'lodash/map'
import merge from 'lodash/merge'

import { ColorWrap } from '../common'
import GithubSwatch from './GithubSwatch'
Expand Down
2 changes: 1 addition & 1 deletion src/components/hue/Hue.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'

import { ColorWrap, Hue } from '../common'
import HuePointer from './HuePointer'
Expand Down
2 changes: 1 addition & 1 deletion src/components/material/Material.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'
import color from '../../helpers/color'

import { ColorWrap, EditableInput, Raised } from '../common'
Expand Down
2 changes: 1 addition & 1 deletion src/components/photoshop/Photoshop.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'

import { ColorWrap, Saturation, Hue } from '../common'
import PhotoshopFields from './PhotoshopFields'
Expand Down
2 changes: 1 addition & 1 deletion src/components/sketch/Sketch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'

import { ColorWrap, Saturation, Hue, Alpha, Checkboard } from '../common'
import SketchFields from './SketchFields'
Expand Down
2 changes: 1 addition & 1 deletion src/components/slider/Slider.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { merge } from 'lodash-es'
import merge from 'lodash/merge'

import { ColorWrap, Hue } from '../common'
import SliderSwatches from './SliderSwatches'
Expand Down
3 changes: 2 additions & 1 deletion src/components/swatches/Swatches.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { map, merge } from 'lodash-es'
import map from 'lodash/map'
import merge from 'lodash/merge'
import * as material from 'material-colors'

import { ColorWrap, Raised } from '../common'
Expand Down
2 changes: 1 addition & 1 deletion src/components/swatches/SwatchesGroup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import reactCSS from 'reactcss'
import { map } from 'lodash-es'
import map from 'lodash/map'

import SwatchesColor from './SwatchesColor'

Expand Down
3 changes: 2 additions & 1 deletion src/components/twitter/Twitter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react'
import PropTypes from 'prop-types'
import reactCSS from 'reactcss'
import { map, merge } from 'lodash-es'
import map from 'lodash/map'
import merge from 'lodash/merge'
import color from '../../helpers/color'

import { ColorWrap, EditableInput, Swatch } from '../common'
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/color.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { each } from 'lodash-es'
import each from 'lodash/each'
import tinycolor from 'tinycolor2'

export const simpleCheckForValidColor = (data) => {
Expand Down

0 comments on commit 1813345

Please sign in to comment.