put the JSON files in the web root

This commit is contained in:
Brian Hicks 2022-03-28 16:34:52 -05:00
parent b2f4bc6ce2
commit 3da2bb3709
2 changed files with 9 additions and 1 deletions

View File

@ -149,13 +149,19 @@ main = do
need elmSources
cmd_ (Cwd "styleguide-app") "elm" "make" "Main.elm" "--output" (".." </> out)
"public/package.json" %> \out -> do
copyFileChanged "elm.json" out
"public/application.json" %> \out -> do
copyFileChanged "styleguide-app/elm.json" out
"public/**/*" %> \out ->
copyFileChanged (replaceDirectory1 out "styleguide-app") out
"log/public.txt" %> \out -> do
styleguideAssets <- getDirectoryFiles ("styleguide-app" </> "assets") ["**/*"]
need
( ["public/index.html", "public/elm.js", "public/bundle.js"]
( ["public/index.html", "public/elm.js", "public/bundle.js", "public/package.json", "public/application.json"]
++ map (("public" </> "assets") </>) styleguideAssets
)
writeFileChanged out "built styleguide app successfully"

View File

@ -21,3 +21,5 @@ npx browserify --entry styleguide-app/manifest.js --outfile public/bundle.js
# copy static files
cp -r styleguide-app/assets public/assets
cp styleguide-app/index.html public/index.html
cp styleguide-app/elm.json public/application.json
cp elm.json public/package.json