而且,当然,您可以混合使用这些方法,并在您的应用程序特定代码旁边使用包和导入。混合模式结构在三种情况下最常见: 弗兰肯应用程序,它只是在没有任何整体策略的情况下从这里和那里拉取一点点;正在从经典或仅包结构积极重构为导入/模块结构的应用程序。
client/ # client application code client/compatibility/ # legacy 3rd party javascript libraries imports # imports/api # isomorphic methods imports/lib # any common code for client/server imports/client # client application code imports/server # server code lib/ # any common code for client/server. packages/ # place for all your atmosphere packages packages/foo/client # client application code packages/foo/lib # any common code for client/server packages/foo/server # server code packages/foo/tests # tests private/ # static files that only the server knows about public/ # static files that are available to the client server/ # server code tests/ # unit test files (won't be loaded on client or server)