混合模式目錄結構

當然,你可以混合使用這些方法,並在特定於應用程式的程式碼旁邊使用包和匯入。混合模式結構在三種情況下最常見:一個 franken-app,它只是在沒有任何整體策略的情況下從這裡和那裡拉出一點點; 一個正在從 Classic 或 Package-Only 結構主動重構為 Imports / Modules 結構的應用程式。

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)