Commit Graph

351 Commits

Author SHA1 Message Date
Dillon Kearns
f481a6bf77
Merge pull request #90 from Y0hy0h/terser
Replace Google Closure minifier with Terser
2020-05-11 16:09:34 -07:00
Dillon Kearns
9a8698d70b Add some more terser options. 2020-05-11 16:03:55 -07:00
Dillon Kearns
8f7bbc80b4 Restore elm optimizations for terser. 2020-05-11 15:22:28 -07:00
Dillon Kearns
29719cc428 Merge branch 'master' into pr/90 2020-05-11 12:05:38 -07:00
Dillon Kearns
3a61933d81 Merge branch 'master' into phantom-builder 2020-05-11 10:40:58 -07:00
Dillon Kearns
df5b36d7fb Render loading indicator off to the side of the elm debugger panel. 2020-05-09 20:33:32 -07:00
Dillon Kearns
87d810790f Move more of loading indicator style into Elm. 2020-05-08 07:13:16 -07:00
Dillon Kearns
e62d61fbab Generate manifest config for initial run. 2020-05-06 19:00:11 -07:00
Dillon Kearns
414f7ab1f8 Rename parameter. 2020-05-05 07:21:04 -07:00
Dillon Kearns
8a35d49d1c Remove unused arguments. 2020-05-05 07:19:16 -07:00
Dillon Kearns
d79fc80233 Remove unused arguments. 2020-05-05 07:14:24 -07:00
Dillon Kearns
ed2d671586 Change hook based on dev/prod mode. 2020-05-05 06:58:58 -07:00
Dillon Kearns
2e8e9754d1 Remove unused code. 2020-05-04 20:46:14 -07:00
Dillon Kearns
d676064acf Remove some unused code. 2020-05-04 14:00:53 -07:00
Dillon Kearns
03315da320 Change error message string. 2020-05-04 14:00:33 -07:00
Dillon Kearns
a210fcfd35 Remove unused require. 2020-05-03 20:15:52 -07:00
Dillon Kearns
73c4a2dec2 Make sure gen directory exists. 2020-05-03 17:38:34 -07:00
Dillon Kearns
8171f205fe Get build process working with new webpack setup. 2020-05-03 17:31:19 -07:00
Dillon Kearns
4c43d02f32 Remove unused code. 2020-05-03 15:57:24 -07:00
Dillon Kearns
09402d13c2 Remove unused code. 2020-05-03 15:48:02 -07:00
Dillon Kearns
0d7620935f Add a hack to make sure metadata changes come through in HMR. 2020-05-03 11:46:11 -07:00
Dillon Kearns
d2968fff89 Show error overlay for metadata parsing errors. 2020-05-03 07:10:27 -07:00
Dillon Kearns
cb0f4cbed4 Generate Pages.elm module from a Webpack plugin so it hooks into the lifecycle more smoothly. 2020-05-02 17:22:53 -07:00
Dillon Kearns
701e27953e Get dev server running when there is an error on initial run. 2020-04-22 18:15:37 -07:00
Dillon Kearns
003f35be3a Pull up require statement. 2020-04-22 18:03:37 -07:00
Dillon Kearns
171eefbb05 Remove unused argument. 2020-04-22 18:00:46 -07:00
Dillon Kearns
e31f6d3977 Update ANSI color scheme. 2020-04-20 17:33:08 -07:00
Dillon Kearns
20339f7256 Display build errors in overlay. 2020-04-20 17:12:16 -07:00
Dillon Kearns
4aae309665 Add wiring for setting up HMR plugin with custom styling. 2020-04-20 15:12:20 -07:00
Dillon Kearns
b2e66174e9 Reorder constant declaration. 2020-04-20 15:06:58 -07:00
Dillon Kearns
53b8b014fe Don't exit dev server process on CLI phase error, just print error for now. Eventually want to display the error like a compiler error in the browser window Webpack banner. 2020-04-19 20:03:00 -07:00
Dillon Kearns
ccc13a4ad1 Remove unneeded .emu exclusion. Fixes #78. 2020-04-19 19:52:13 -07:00
Dillon Kearns
4e8a82bd35 Change formatting. 2020-04-19 18:32:44 -07:00
Dillon Kearns
299d73d807 Remove coupling to elm-markup library. 2020-04-19 18:32:39 -07:00
Dillon Kearns
d31a59c7c5 Add missing symbols. 2020-04-19 18:31:29 -07:00
Dillon Kearns
3c690106f4 Wire in static http cache to prevent making extra requests. 2020-04-19 08:17:51 -07:00
Dillon Kearns
33272b6c54 Use a promise to subscribe to static http data as it is updated. 2020-04-18 11:08:35 -07:00
Dillon Kearns
27ef7c2491 Got hot content reloading working with a different hook. 2020-04-14 21:58:16 -07:00
Dillon Kearns
b614a4cd26 Run prettier. 2020-04-13 15:12:16 -07:00
Dillon Kearns
fb9d3e5ed6 Add context dependency to content folder. 2020-04-13 15:03:37 -07:00
Dillon Kearns
1882465938 Hook into after compile instead of emit. 2020-04-13 15:03:22 -07:00
Dillon Kearns
5aa9fa8c26 Merge branch 'master' into content-hot-reloading 2020-04-12 15:18:55 -07:00
Dillon Kearns
a6dcde5dde Merge branch 'master' into phantom-builder 2020-04-07 16:59:02 -07:00
Dillon Kearns
d61d4a38aa Merge branch 'master' into pr/73 2020-03-28 15:03:25 -07:00
Dillon Kearns
9328cf2636 Change formatting to include trailing slash for empty cleaned route. 2020-03-28 14:20:08 -07:00
Dillon Kearns
6649ce7c06 Prevent base href from being set to unknown. 2020-03-28 13:56:05 -07:00
Steven Vandevelde
cafb9846a5 Replace String.chop in generator 2020-03-28 16:28:22 +01:00
Y0hy0h
59e061aa75 Disable Elm-specific optimizations
For the time being, we cannot guarantee that the file to be compressed is generated by Elm. Therefore we cannot apply its special optimizations.
2020-03-23 13:27:55 +01:00
Y0hy0h
0ddb724370 Run terser in parallel 2020-03-23 13:26:38 +01:00
Y0hy0h
60e62c1ec5 Replace Google Closure minifier with terser minifier 2020-03-20 23:05:43 +01:00
Dillon Kearns
b8dcc41835
Merge pull request #84 from vViktorPL/file-content-escaping
Fix content file body string escaping for `"""` case
2020-03-18 08:19:07 -07:00
Wiktor Toporek
d4773d2f35 Fix content file body string escaping for """ case 2020-03-15 23:51:17 +01:00
Wiktor Toporek
dad2fa563d Refactor Win platform path fix to verbose code with comment according to CR comment. 2020-03-15 22:55:53 +01:00
Wiktor Toporek
451ed1ea40 Fix invalid generator output on Win platform due to path separator. 2020-03-15 01:59:54 +01:00
Steven Vandevelde
6cd14f53ef Fix prerendering 2020-03-11 16:55:17 +01:00
Dillon Kearns
279e2c60ce Replace some instances of the old Builder module. 2020-03-10 22:28:22 -07:00
Steven Vandevelde
8f44ddfb05 Fix statichttp and url-change issues 2020-03-10 16:31:28 +01:00
Steven Vandevelde
1a5175d0a0 Make urls relative using the base element 2020-03-10 16:31:28 +01:00
Dillon Kearns
1261b83d96 Store build timestamp in a variable in JS so that the same time is used for the generated CLI and UI modules. 2020-03-05 14:16:42 -08:00
Dillon Kearns
aa42e35376 Reload content cache on hot reload updates. 2020-02-27 17:51:55 -08:00
Dillon Kearns
dd964fe2df Remove offline-ready caching service worker code for now.
Context: this was creating some issues for at least one user where workbox was serving up stale data from the precache. The precache for main.js and index.html were overshadowing the rule for offline navigation fallback routing. So stale data was being served up. This may have been because of a cloudflare CDN patch.
2020-02-25 11:44:41 -08:00
Dillon Kearns
170269003e Colorize elm compiler errors when running initial elm-pages.
This change forks the node-elm-compiler using a suggested fix from https://github.com/rtfeldman/node-elm-compiler/issues/91#issuecomment-583363707
2020-02-08 08:59:33 -08:00
Dillon Kearns
fdaaf02d88 Set network fallback as the NavigationRoute. 2020-02-03 19:04:13 -08:00
Dillon Kearns
64ecc8dc86 Use a catch handler instead of a fetch handler to let other workbox routing take effect. 2020-02-03 18:17:20 -08:00
Dillon Kearns
43cdad50af Only serve up fallback html page if network request fails, not if it 404s. 2020-02-03 17:52:10 -08:00
Dillon Kearns
e7dfab4cb2 Update service worker script to only serve up HTML of root route as an offline fallback. 2020-02-03 12:12:40 -08:00
Steven Vandevelde
b5cf00b52b Properly setup the renderAfterDocumentEvent option 2020-01-30 18:30:45 +01:00
Dillon Kearns
5a1e06c729 Keep dev server running for non-fatal errors. 2020-01-27 15:05:40 -08:00
Dillon Kearns
6195c5a35f Remove some console.log statements. 2020-01-25 20:34:52 -08:00
Dillon Kearns
cae334486a Merge branch 'master' into generate-files 2020-01-23 20:03:18 -08:00
Dillon Kearns
3a4881d002 Change relative path reference for content.json preload tag. 2020-01-20 08:03:59 -08:00
Dillon Kearns
fe6e046610 Add script defer tag. 2020-01-20 07:59:29 -08:00
Dillon Kearns
d9deee076b
Merge pull request #41 from lukewestby/patch-1
Escape frontmatter content in raw records so it handles newlines
2020-01-12 18:53:47 -08:00
Dillon Kearns
2e8fbee58b Merge branch 'master' into generate-files 2020-01-08 15:07:30 -08:00
Dillon Kearns
79e68efba8 Restore --port functionality in dev mode. 2020-01-08 09:55:31 -08:00
Luke Westby
5785d45f66
escape frontmatter content so it handles newlines 2020-01-07 09:33:40 -08:00
Dillon Kearns
a0a99dab52 Ignore files with extensions for service worker shell fallback. 2020-01-06 09:50:51 -08:00
Dillon Kearns
4c4d26e320 Merge branch 'master' into generate-files 2020-01-05 20:59:43 -08:00
Dillon Kearns
dc29eb4ed6 Fix builtAt time format (was divided by 1000 incorrectly). 2020-01-05 20:59:27 -08:00
Dillon Kearns
815dec7d98 Add hardcoded file generation in prep for programmatic file generation from elm. 2020-01-05 13:54:55 -08:00
Dillon Kearns
c846c9ff25 Remove HMR config from production webpack configuration. 2020-01-04 19:09:25 -08:00
Dillon Kearns
48d19ddc72 Setup hot module reloading for dev server. 2020-01-04 18:53:08 -08:00
Dillon Kearns
dd785ea4af Merge branch 'master' into pr/23 2020-01-03 18:22:14 -08:00
Dillon Kearns
cce522862d Change buildTime to builtAt. 2020-01-03 16:18:37 -08:00
Dillon Kearns
70a1e75635 Remove reference to unused internal module in generated file. 2020-01-03 16:00:31 -08:00
Dillon Kearns
1e34faac47 Delete old generated files to prevent compilation errors. 2020-01-03 14:48:42 -08:00
Dillon Kearns
4b75992ab7 Update dependency. 2019-12-11 10:33:26 -08:00
Dillon Kearns
a55440f44e Update to Elm 0.19.1. 2019-12-11 05:54:00 -08:00
Dillon Kearns
b435eb1560 Merge branch 'master' into static-http 2019-12-10 17:26:17 -08:00
Dillon Kearns
d016beb50b Normalize path names so lookups succeed. 2019-12-10 09:51:43 -08:00
Dillon Kearns
1b2d08bc54 Use ilias's latest json library, update docs site, use 19.1 for docs site. 2019-12-09 20:18:48 -08:00
Dillon Kearns
b0213189ca Generate buildTime constant in Pages.elm. 2019-12-09 13:03:53 -08:00
Daniel Marin
362e5ffef5
Delay copying of elm files to /gen folder until cli app is done
Before this change webpack started compiling before the cli version
if the app was compiled in doCliStuff.

Not sure how but this was causing webpack to send the cli version
of the app to the browser when main.js was requested. This caused
the app to not render anything (because it was a worker app) and
not show any errors.

The change just waits until the cli finished compiling to only
then move the .elm files to the /gen folder, triggering webpack
to recompile using the correct (ui version) of the app.
2019-11-14 19:21:56 +00:00
Dillon Kearns
976b8d8e0e Fix regression with .emu frontmatter parsing. 2019-11-14 06:53:08 -08:00
Dillon Kearns
f8766e0472 Only reduce JSON responses in prod build, not dev mode (so that JSON decoders can be safely re-run). 2019-11-12 20:14:34 -08:00
Dillon Kearns
f5ef176306 Generate files for extensions besides md and emu. Fixes #16. 2019-11-04 10:18:49 -08:00
Dillon Kearns
86d14fb8e5 Only check flags for port, not env variables. 2019-11-03 20:18:49 -08:00
Dillon Kearns
f3fbc9ff72 Update docs to use the new StaticHttp module. 2019-11-02 16:32:12 -07:00
Dillon Kearns
8941ae1e84 Print out error string from CLI without extra noise. 2019-10-28 13:16:22 -07:00
Dillon Kearns
5754bfb186 Pass through environment to CLI app for secrets. 2019-10-24 08:58:44 -07:00