From 81341e83d8283d3622855c9b68e5e2af5b83ba17 Mon Sep 17 00:00:00 2001 From: Zack Kayser Date: Fri, 12 Jun 2020 15:42:46 -0400 Subject: [PATCH] Polish up Parcel build output --- .gitignore | 3 ++- assets/package.json | 6 +++--- config/dev.exs | 13 +++---------- lib/live_deck_web/templates/control/index.html.leex | 2 +- lib/live_deck_web/templates/error/404_page.html.eex | 2 +- lib/live_deck_web/templates/error/500_page.html.eex | 2 +- .../templates/slide/template_2_col.html.eex | 2 +- .../templates/slide/template_full_image.html.eex | 2 +- .../templates/slide/template_left_aside.html.eex | 2 +- .../templates/slide/template_quote.html.eex | 2 +- .../templates/slide/template_quote_alt.html.eex | 2 +- .../templates/slide/template_right_aside.html.eex | 2 +- .../templates/slide/template_side_image.html.eex | 2 +- 13 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 27c08c6..191121b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,9 @@ # The directory Mix will write compiled artifacts to. /_build/ -# Parcel cache +# Parcel caches /.cache/ +/assets/.cache # If you run "mix test --cover", coverage assets end up here. /cover/ diff --git a/assets/package.json b/assets/package.json index 69b0962..018c892 100644 --- a/assets/package.json +++ b/assets/package.json @@ -2,8 +2,9 @@ "repository": {}, "license": "MIT", "scripts": { - "build": "parcel build ./js/app.js ./css/app.scss ./css/app-live-deck.scss ./css/app-crimson-command.scss --out-dir ../priv/static --public-url ./", - "watch": "parcel watch ./js/app.js ./css/app.scss ./css/app-live-deck.scss ./css/app-crimson-command.scss --out-dir ../priv/static --public-url ./", + + "build": "cp -R ./static/* ../priv/static && parcel build ./js/app.js ./css/app.scss ./css/app-live-deck.scss ./css/app-crimson-command.scss --out-dir ../priv/static --public-url ./", + "watch": "cp -R ./static/* ../priv/static && parcel watch ./js/app.js ./css/app.scss ./css/app-live-deck.scss ./css/app-crimson-command.scss --out-dir ../priv/static --public-url ./", "eslint": "eslint js/**" }, "dependencies": { @@ -26,7 +27,6 @@ "node-sass": "^4.13.1", "optimize-css-assets-webpack-plugin": "^5.0.3", "parcel-bundler": "^1.12.4", - "parcel-plugin-static-files-copy": "^2.4.3", "postcss-loader": "^3.0.0", "sass-loader": "^7.3.1", "style-loader": "^1.1.3", diff --git a/config/dev.exs b/config/dev.exs index a744928..1ae48dc 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -23,17 +23,10 @@ config :live_deck, LiveDeckWeb.Endpoint, code_reloader: true, check_origin: false, watchers: [ - node: [ - "./assets/node_modules/parcel-bundler/bin/cli.js", + npm: [ + "run", "watch", - "./assets/js/app.js", - "./assets/css/app.scss", - "./assets/css/app-live-deck.scss", - "./assets/css/app-crimson-command.scss", - "--out-dir", - "priv/static", - "--public-url", - "./" + cd: Path.expand("../assets", __DIR__) ] ] diff --git a/lib/live_deck_web/templates/control/index.html.leex b/lib/live_deck_web/templates/control/index.html.leex index 16038e4..092d327 100644 --- a/lib/live_deck_web/templates/control/index.html.leex +++ b/lib/live_deck_web/templates/control/index.html.leex @@ -14,7 +14,7 @@

Deck Remote

diff --git a/lib/live_deck_web/templates/error/404_page.html.eex b/lib/live_deck_web/templates/error/404_page.html.eex index 81f379b..403652c 100644 --- a/lib/live_deck_web/templates/error/404_page.html.eex +++ b/lib/live_deck_web/templates/error/404_page.html.eex @@ -24,7 +24,7 @@

Doh!

- error-monster + error-monster

Whoops, that page is gone!

Let's head back to where you came from.

diff --git a/lib/live_deck_web/templates/error/500_page.html.eex b/lib/live_deck_web/templates/error/500_page.html.eex index ed9d287..b33f37d 100644 --- a/lib/live_deck_web/templates/error/500_page.html.eex +++ b/lib/live_deck_web/templates/error/500_page.html.eex @@ -24,7 +24,7 @@

Doh!

- error-monster + error-monster

Whoops, something went wrong!

Let's head back to where you came from.

diff --git a/lib/live_deck_web/templates/slide/template_2_col.html.eex b/lib/live_deck_web/templates/slide/template_2_col.html.eex index 0eb7581..f3e0578 100644 --- a/lib/live_deck_web/templates/slide/template_2_col.html.eex +++ b/lib/live_deck_web/templates/slide/template_2_col.html.eex @@ -4,6 +4,6 @@

Set your presentation theme, the order of your slides, and configure slide titles, backgrounds, and notes in the presentation config file.

- team gaslight + team gaslight
diff --git a/lib/live_deck_web/templates/slide/template_full_image.html.eex b/lib/live_deck_web/templates/slide/template_full_image.html.eex index c483942..bc429d6 100644 --- a/lib/live_deck_web/templates/slide/template_full_image.html.eex +++ b/lib/live_deck_web/templates/slide/template_full_image.html.eex @@ -1,5 +1,5 @@
- sneaky-ryan + sneaky-ryan

Originally Created by #teamgaslight

diff --git a/lib/live_deck_web/templates/slide/template_left_aside.html.eex b/lib/live_deck_web/templates/slide/template_left_aside.html.eex index a723fe5..3aeb7f4 100644 --- a/lib/live_deck_web/templates/slide/template_left_aside.html.eex +++ b/lib/live_deck_web/templates/slide/template_left_aside.html.eex @@ -2,7 +2,7 @@ diff --git a/lib/live_deck_web/templates/slide/template_quote.html.eex b/lib/live_deck_web/templates/slide/template_quote.html.eex index 8125482..8d3fcc0 100644 --- a/lib/live_deck_web/templates/slide/template_quote.html.eex +++ b/lib/live_deck_web/templates/slide/template_quote.html.eex @@ -1,6 +1,6 @@
- josie + josie
"Forget Power Point, Keynote, and Google Slides. The world needs a new shiny slide deck tool!" diff --git a/lib/live_deck_web/templates/slide/template_quote_alt.html.eex b/lib/live_deck_web/templates/slide/template_quote_alt.html.eex index 8221651..33240bd 100644 --- a/lib/live_deck_web/templates/slide/template_quote_alt.html.eex +++ b/lib/live_deck_web/templates/slide/template_quote_alt.html.eex @@ -1,7 +1,7 @@
- josie + josie
diff --git a/lib/live_deck_web/templates/slide/template_right_aside.html.eex b/lib/live_deck_web/templates/slide/template_right_aside.html.eex index f555edf..af7ecdc 100644 --- a/lib/live_deck_web/templates/slide/template_right_aside.html.eex +++ b/lib/live_deck_web/templates/slide/template_right_aside.html.eex @@ -5,7 +5,7 @@
- gaslight + gaslight