definition:
|
spiceyStructure :: String -> DirTree
spiceyStructure pkgname =
Directory "." [
ResourceFile NoExec "README.md",
ResourceFile NoExec "LICENSE",
ResourcePatchFile NoExec "package.json" (replacePackageName pkgname),
ResourcePatchFile NoExec "Makefile" patchMakeFile,
Directory "src" [
srcfile "Main.curry",
Directory "System" [
srcfile $ "System" </> "Spicey.curry",
srcfile $ "System" </> "Routes.curry",
srcfile $ "System" </> "SessionInfo.curry",
srcfile $ "System" </> "Authorization.curry",
srcfile $ "System" </> "Authentication.curry",
srcfile $ "System" </> "Processes.curry",
srcfile $ "System" </> "PreludeHelpers.curry",
GeneratedFromERD createAuthorizations ],
Directory "View" [
srcfile $ "View" </> "SpiceySystem.curry",
GeneratedFromERD createViews,
GeneratedFromERD createHtmlHelpers ],
Directory "Controller" [
srcfile $ "Controller" </> "SpiceySystem.curry",
GeneratedFromERD createControllers ],
Directory "Model" [
GeneratedFromERD createModels ],
Directory "Config" [
srcfile $ "Config" </> "UserProcesses.curry",
GeneratedFromERD createRoutes,
GeneratedFromERD createEntityRoutes ]
],
Directory "data" [
ResourceFile NoExec $ "data" </> "htaccess"
],
Directory "public" [
ResourceFile NoExec $ "public" </> "index.html",
Directory "bt4" [
Directory "css" [
bt4file $ "css" </> "bootstrap.min.css",
bt4file $ "css" </> "spicey.css"
],
Directory "js" [
bt4file $ "js" </> "bootstrap.bundle.min.js",
bt4file $ "js" </> "jquery.slim.min.js"
],
Directory "img" [
bt4file $ "img" </> "favicon.ico",
bt4file $ "img" </> "spicey-logo.png",
bt4file $ "img" </> "text.png",
bt4file $ "img" </> "time.png",
bt4file $ "img" </> "number.png",
bt4file $ "img" </> "foreign.png"
]
]
]
]
where
srcfile f = ResourceFile NoExec $ "src" </> f
bt4file f = ResourceFile NoExec $ "public" </> "bt4" </> f
|