-
Notifications
You must be signed in to change notification settings - Fork 125
Migrating Projects from Devkit1 to Devkit2
#Devkit 2 - Project Migration
##Devkit2 Overview
Devkit2 does many things differently than the original devkit, especially in the way it handles dependencies and package management. Devkit2 solves the need for multiple games to have their own versions of their dependencies by including a ‘modules’ folder in each project with each of its exact dependencies inside. These dependencies are now specified in the manifest.json file for the project. Devkit2 is designed to play as nicely as possible with old devkit installations so you can have games on both while migrating from the old version. All Devkit2 commands now go through the devkit command - all Devkit1 commands remain on basil.
##Migration Steps - Existing Game
Always always back up your files whenever you make massive changes to things. Additionally, if you aren’t using version control for your projects, start immediately before doing anything else.
-
cdinto your project directory. -
Add additional dependencies to the manifest. This includes all addons and any other plugins your project is using. Ensure your dependency format matches the devkit-core one -
“dependency-name”: “path-to-git-repository#tag”. It is best practice to always use a tag for a dependency to ensure consistency across installs of your project. -
Run
devkit install. This creates the ‘dependencies’ key in the project manifest, adds a modules folder, puts the devkit-core project inside it (and any other dependencies you specified in the previous step), and registers the project with the Devkit2 simulator. -
Rename all addon imports to match the new style -- in general, this means
import plugins.pluginName.pluginNameusually becomesimport pluginName. Check each addon to be sure. -
Run
devkit serve. This will open the Devkit2 simulator, which will now include your migrated application.