Migrating plugins
mcollina opened this issue · comments
Hi @markdalgleish!
I would like to migrate bespoke-run. Do you have a guide, or a list of steps for migrating plugins to the new format easily?
Thanks!
I ported my bespoke-run. Here are my steps (for future references)
- Updated the gulpfile (https://github.com/markdalgleish/bespoke-keys/blob/master/gulpfile.js)
- Change your plugin structure with the new
module.exports
syntax (https://github.com/markdalgleish/bespoke-keys/blob/master/lib/bespoke-keys.js#L1-L2) - move your file to lib/bespoke-yourplugin.js
- Update all the references in gulpfile
- Update your demo so it references all the 'dist' builds (https://github.com/mcollina/bespoke-run/blob/master/demo/index.html#L41-L46)
- your demo should work!
If you have unit tests
- copy https://github.com/markdalgleish/bespoke-keys/blob/master/karma.conf.js
- Fix all the paths, move file around so that it matches what defined in gulpfile and karma.conf.
- Change how you require bespoke in the tests (mcollina/bespoke-run@7a8d41b#diff-91a69ddc7c621c1bf13ed208a31cb35dR15)
- your tests should run fine!