Migrate to Punky
1. FILES / FOLDERS TO create
Section titled โ1. FILES / FOLDERS TO createโ- Create folder
managersinsidejs - Create
managers/AssetManager.jsand paste full new file - Create
managers/DebugManager.jsand paste full new file - Create folder
utilitiesif not present insidejs - Create
utilities/EventSystem.jsand paste full new file - Create
utilities/getQueryParam.jsand paste full new file - Create
utilities/updateScrollTriggers.jsand paste full new file
2. FILES TO MODIFY
Section titled โ2. FILES TO MODIFYโThese files need to be modified, either partially or just copy-paste the entire new file on top of the old one. Itโs specified in each of them.
- CoreHandler - PASTE FULL NEW FILE
- Project - Check first if thereโs any script running in boostify onload or any place in the file, if not, just fully paste new file, if yes, combine both to preserve said scripts
- Core - Check if thereโs any libraries like Contact Form 7 active and combine with new file to preserve them
- Main - Paste the import for EventSystem and replace only the constructor by the new one
- Manager.js - Move into
managersfolder and PASTE FULL NEW FILE - ExtraAssets
- Change name to
resources.js, move into folderjsnext toCore,ProjectandMain - Change names of arrays to fit with the new ones
- Add minimal libraries from starter
- Change structure of resources to fit new
optionsobject and addmodifyHeightproperty where needed
- Change name to
- Transition index - Check the animations present and combine with new file so asset manager is only used to
importAutoAnimationsanddestroyAutoAnimations, and delete all Hero animations from there - _handlerFolder/Handler.js - PASTE FULL NEW FILE
- Hero animations
- Remove
return this.init()from constructor - Add
this.timeline = tlbefore returning the tl ininit()method - Add destroy method
- Remove
- Each handler
- Change config to be a callback with this format
({element}) => ({}) - Remove
super.init()andsuper.events() - Remove
libraryNameand object fromdestroymethod
- Change config to be a callback with this format
- Search for any instance of
Manager.libraries.("gsap").ScrollTriggerorManager.getLibrary("gsap").ScrollTriggerand replace byManager.getLibrary("ScrollTrigger") - Change any direct
import 'gsap'toManager.getLibrary("gsap")
3. FILES TO DELETE
Section titled โ3. FILES TO DELETEโ- Delete
preloadfolder
4. OTHER
Section titled โ4. OTHERโExecute command npm i @swup/body-class-plugin
5. CHECKS
Section titled โ5. CHECKSโYou wonโt be able to make the site function until you complete ALL above steps, except handlers, which will make only certain libraries not work. Once that is finished:
- Check debug panels to see if everything makes sense
- Check for debug panels opening in transition between pages - some destroy methods might be missing
- Check console for errors or warnings from GSAP
Knowledge Check
Test your understanding of this section
Loading questions...