Skip to content

dgrijuela/modular-lodash-codemod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

This script makes all your lodash imports modular.

For example:

import { sortBy } from 'lodash'
import { throttle, debounce } from 'lodash'

Would be:

import sortBy from 'lodash/sortBy'
import throttle from 'lodash/throttle'
import debounce from 'lodash/debounce'

Setup & Run

npm install -g jscodeshift
git clone https://github.com/dgrijuela/modular-lodash-codemod.git
jscodeshift -t modular-lodash-codemod/modular-lodash.js <your-project-dir>

Check both JS and JSX files using the --extensions flag:

jscodeshift --extensions=js,jsx -t modular-lodash-codemod/modular-lodash.js <your-project-dir>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published