A migration script from yoshi to haste
- Node >= 8.7 is required
nvm use 8
npm install -g --engine-strict yoshi-to-haste
cd to project directory and run the following:
yoshi-to-haste
rm -rf node_modules package-lock.json
npm install
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 to haste
and haste-preset-yoshi
accordingly.
`
It will modify three files:
-
package.json
- change dependencies and haste configuration- Change the all occurences of
yoshi
in scripts tohaste
- Add a
haste
field with{ "preset": "yoshi" }
- Remove
yoshi
as a dev dependency - Add
haste-preset-yoshi
to devDependencies
- Change the all occurences of
-
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
-
maybe it's the lock file? If you have an old
package-lock.json
file, please recreate it using the new dependencies, just remove thepackage-lock.json
file andnode_modules
directory and performnpm 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
.
-
why
mocha.opts
does not work anymore?mocha.opts
is a way to configure mocha when using the mocha's cli, this feature was implicitly open in yoshi and it's not supported in haste because we're using mocha directly, if there is a good reason to configure mocha (like you did usingmocha.opts
) let us know, and we'll find a solution. -
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/yoshi/lib/ignore-extensions
->/node_modules/haste-preset-yoshi/src/ignore-extensions