From 3db595937719b89956c594e4a76ee68ae8de098a Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 25 Mar 2021 14:06:08 -0400 Subject: [PATCH] First pass at the build (#27) This updates `astro build` to do a production build. It works! No optimizations yet. --- examples/snowpack/.gitignore | 1 + examples/snowpack/astro/components/Nav.astro | 4 +- .../astro/components/NewsAssets.svelte | 4 +- .../astro/components/PluginSearchPage.jsx | 2 +- .../{[slug].astro => [slug].astro.ignore} | 0 examples/snowpack/snowpack.config.js | 2 +- src/@types/compiler.ts | 2 +- src/build.ts | 83 +++++++++++++++++++ src/cli.ts | 8 +- src/compiler/codegen.ts | 80 +++++++++++------- src/compiler/index.ts | 4 +- src/compiler/optimize/index.ts | 8 +- src/dev.ts | 2 +- src/frontend/render/preact.ts | 9 +- src/generate.ts | 61 -------------- src/parser/parse/read/expression.ts | 2 - src/runtime.ts | 29 +++++-- 17 files changed, 186 insertions(+), 115 deletions(-) rename examples/snowpack/astro/pages/proof-of-concept-dynamic/{[slug].astro => [slug].astro.ignore} (100%) create mode 100644 src/build.ts delete mode 100644 src/generate.ts diff --git a/examples/snowpack/.gitignore b/examples/snowpack/.gitignore index f03556e8d..888e5be06 100644 --- a/examples/snowpack/.gitignore +++ b/examples/snowpack/.gitignore @@ -1,3 +1,4 @@ .DS_Store build node_modules +_site \ No newline at end of file diff --git a/examples/snowpack/astro/components/Nav.astro b/examples/snowpack/astro/components/Nav.astro index 8ca95cb2a..31ef33e3d 100644 --- a/examples/snowpack/astro/components/Nav.astro +++ b/examples/snowpack/astro/components/Nav.astro @@ -245,8 +245,8 @@ export let version: string = '3.1.2'; Snowpack