[英]How do I upgrade my Marionette js app from 1.x to 2.x?
It looks like there was a pretty massive shift from 1.x to 2.x. 从1.x到2.x似乎有很大的转变。 My app doesn't work anymore. 我的应用程序不再起作用。 No errors. 没有错误。 Just doesn't work. 只是不起作用。 I'm 1.8.3 trying to get to 2.4.1 to take advantage of the new collection optimizations. 我正在尝试1.8.3升级到2.4.1,以利用新的集合优化。
I see there is a tool to help with the upgrade: 我看到有一个工具可以帮助您进行升级:
But it requires Python knowledge to run it. 但是它需要Python知识才能运行它。 I know nothing about Python. 我对Python一无所知。 The instructions for running look pretty foreign to me. 对我来说,跑步说明看起来很陌生。 I did install the latest version of Python on my Windows 7 machine but I'm just not understanding the instructions on running the tool. 我确实在Windows 7计算机上安装了最新版本的Python,但我只是不了解有关运行该工具的说明。
Is this the only approach to upgrading? 这是唯一的升级方法吗?
The biggest "issue" is probably the "start" event. 最大的“问题”可能是“开始”事件。 Before, you would listen for the "initialize:after" event to do stuff when the app starts, but that event has been renamed "start". 之前,您会在应用启动时侦听“ initialize:after”事件以进行操作,但是该事件已重命名为“ start”。
Also, make sure to read through https://docs.google.com/document/d/1fuXb9N5LwmdPn-teMwAo3c8JTx6ifUowbqFY1NNSdp8/edit# : you'll probably recognize bits of your code that need to be updated. 另外,请务必通读https://docs.google.com/document/d/1fuXb9N5LwmdPn-teMwAo3c8JTx6ifUowbqFY1NNSdp8/edit# :您可能会识别出需要更新的代码。
You could manually run all the search and replaces the tool does by starting here: 您可以从此处开始手动运行所有搜索并替换该工具所做的工作:
https://github.com/marionettejs/Marionette.Upgrade/blob/master/upgrade.py#L108 https://github.com/marionettejs/Marionette.Upgrade/blob/master/upgrade.py#L108
left side strings are old, right side new. 左侧的弦很旧,右侧的弦很新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.