bespokejs / bespoke

DIY Presentation Micro-Framework

Home Page:http://markdalgleish.com/projects/bespoke.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

  1. Updated the gulpfile (https://github.com/markdalgleish/bespoke-keys/blob/master/gulpfile.js)
  2. Change your plugin structure with the new module.exports syntax (https://github.com/markdalgleish/bespoke-keys/blob/master/lib/bespoke-keys.js#L1-L2)
  3. move your file to lib/bespoke-yourplugin.js
  4. Update all the references in gulpfile
  5. Update your demo so it references all the 'dist' builds (https://github.com/mcollina/bespoke-run/blob/master/demo/index.html#L41-L46)
  6. your demo should work!

If you have unit tests

  1. copy https://github.com/markdalgleish/bespoke-keys/blob/master/karma.conf.js
  2. Fix all the paths, move file around so that it matches what defined in gulpfile and karma.conf.
  3. Change how you require bespoke in the tests (mcollina/bespoke-run@7a8d41b#diff-91a69ddc7c621c1bf13ed208a31cb35dR15)
  4. your tests should run fine!