haste-to-yoshi

1.0.12 • Public • Published

haste-to-yoshi

A migration script from haste-preset-yoshi back to yoshi

requirements

  • Node >= 8.7 is required
nvm use 8

installation

npm install -g --engine-strict haste-to-yoshi

usage

cd to project directory and run the following:

haste-to-yoshi
rm -rf node_modules package-lock.json
npm install

Important Note!

These are some simple heuristics that will work for most cases, if you use Yoshi in other scripts or you import some of Yoshi's internals to your project, you'll need to change these from haste-preset-yoshi to yoshi accordingly. `

The heuristics

It will modify three files:

  • package.json - change dependencies and haste configuration
    • Change the all occurences of haste in scripts to yoshi
    • Remove the haste field with { "preset": "yoshi" } in it
    • Remove haste-preset-yoshi as a devDependency
    • Add yoshi to devDependencies
  • wallaby.js - change wallaby configuration file path
  • .vscode/launch.json - change debug file path
  • .storybook/webpack.config.js - change storybook webpack.config.js file path

Troubleshooting

  • maybe it's the lock file? If you have an old package-lock.json file, please recreate it using the new dependencies, just remove the package-lock.json file and node_modules directory and perform npm install, that will probably solve most problems :).

  • maybe it's your node version? If you've used an old version of node before, just nvm install && nvm use && npm rebuild.

FAQ

  • my webstorm test command isn't working anymore! you've probably used some of yoshi's internals when configuring these commands, you only need to change the following - /node_modules/haste-preset-yoshi/lib/ignore-extensions -> /node_modules/yoshi/src/ignore-extensions

Readme

Keywords

none

Package Sidebar

Install

npm i haste-to-yoshi

Weekly Downloads

2

Version

1.0.12

License

ISC

Unpacked Size

18.6 kB

Total Files

25

Last publish

Collaborators

  • ranyitzhaki