This version of the documentation is outdated, and features documented here may work differently now. You can see the latest stable version of the docs here.
Migrating from v0.3.3
Perseus v0.3.4 added a huge number of new features to do with the new reactive state platform, but maintains backward-compatibility with (almost) all uses of v0.3.3. If you're currently running v0.3.0-0.3.3, here's how to upgrade! Note that any sites you've built with v0.3.3 should still work fine.
- Update your
Cargo.toml
dependencies forperseus
to0.3.5
(to force the upgrade). - Upgrade the Perseus CLI with
cargo install perseus-cli --version 0.3.5
. - Run
perseus clean
to remove the old.perseus/
directory. - Update your code for the new reactive state platform if you want to!
Perseus v0.3.5 also changed several idioms, particularly deprecating define_app!
in favor of the more versatile PerseusApp
. This change isn't compulsory, and no warning will appear yet, but it's recommended that you upgrade soon. You can see examples of the new idioms here.
If You've Ejected
If you were running Perseus v0.3.3 and had ejected, here are the steps you should take in addition to the above.
- Rename
.perseus/
to.perseus.old/
. - Run
perseus build
to create a new.perseus/
directory. - Apply your changes to the new directory.
- Delete
.perseus.old/
when you're done. - Confirm everything works with
perseus serve
.
This may seem arduous, but v0.3.4 includes extreme restructuring of the innards in .perseus/
, and it's typically simpler to re-apply your own changes to the new system than it is to apply Perseus' updates to your existing directory (though you could do this if you really wanted).