You replace GameRegistry.registerRecipe(...) with a call to Foo.registerRecipe(...) where Foo is whatever you named the class with that code in it.
Then, when you run the game, it will generate a bunch of json files in the config/recipes folder.
You then copy these files to your assets and disable the Foo.registerRecipe(...) calls.