Skip to content

Commit

Permalink
hmx ☞ astro (#22)
Browse files Browse the repository at this point in the history
This changes all hmx files to astro files and updates all code to not reference hmx any more.
  • Loading branch information
matthewp committed Mar 24, 2021
1 parent 5c1cd5b commit 3c24faa
Show file tree
Hide file tree
Showing 86 changed files with 129 additions and 127 deletions.
2 changes: 1 addition & 1 deletion examples/snowpack/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

export default {
projectRoot: '.',
hmxRoot: './astro',
astroRoot: './astro',
dist: './_site',
extensions: {
'.jsx': 'preact'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Banner from '../components/Banner.hmx';
import Nav from '../components/Nav.hmx';
import Banner from '../components/Banner.astro';
import Nav from '../components/Nav.astro';
export function setup({ context }) {
return {
context: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Menu from '../components/Menu.hmx';
import Subnav from '../components/Subnav.hmx';
import Menu from '../components/Menu.astro';
import Subnav from '../components/Subnav.astro';
export const layout = 'layouts/base.hmx';
export const layout = 'layouts/base.astro';
export function setup({ context }) {
return {};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Subnav from '../components/Subnav.hmx';
import Menu from '../components/Menu.hmx';
import Subnav from '../components/Subnav.astro';
import Menu from '../components/Menu.astro';
export const layout = 'layouts/base.hmx';
export const layout = 'layouts/base.astro';
export function setup({ context }) {
return {
context: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import Menu from '../components/Menu.hmx';
export const layout = 'layouts/base.hmx';
import Menu from '../components/Menu.astro';
export const layout = 'layouts/base.astro';
export function setup({ context }) {
return {};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
import { format as formatDate, parseISO } from 'date-fns';
export const layout = 'layouts/base.hmx';
export const layout = 'layouts/base.astro';
export function setup({ context }) {
return {};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
export const layout = 'layouts/main.hmx';
export const layout = 'layouts/main.astro';
export function setup({ context }) {
return {
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/concepts/build-pipeline.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: The Build Pipeline
description: Snowpack Build creates a production-ready website with or without a bundler
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/concepts/dev-server.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: The Dev Server
description: Snowpack's dev server is fast because it only rebuilds the files you change. Powered by ESM (ES modules).
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: HMR + Fast Refresh
description: Snowpack's ESM-powered unbundled development means near-instant single file builds that only take 10-25ms to load and update in the browser.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: How Snowpack Works
description: Snowpack serves your application unbundled during development. Each file is built only once and is cached until it changes.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import Card from '../components/Card.jsx';
export const layout = 'layouts/main.hmx';
export const layout = 'layouts/main.astro';
// mocked for now, to be added later
// 1. import {paginate} from 'magicthing';
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/babel.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'Babel'
tags: communityGuide
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/connecting-tools.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: The Snowpack Guide to connecting your favorite tools
description: 'How do you use your favorite tools in Snowpack? This Guide will help you get started'
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/hmr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Hot Module Replacement (HMR)
description: Enable Snowpack's Hot Module Replacement (HMR) on your development server.
published: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: SSL Certificates
description: How to use HTTPs during development and generate SSL certifcates for your Snowpack build.
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/jest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'Jest'
tags: communityGuide
img: '/img/logos/jest.svg'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Optimize & Bundle for Production
published: true
description: How to optimize your Snowpack build for production, with or without a bundler.
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/plugins.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Creating Your Own Plugin
description: Learn the basics of our Plugin API through working examples.
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/postcss.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'PostCSS'
tags: communityGuide
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/preact.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Preact
tags: communityGuide
img: '/img/logos/preact.svg'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: React + babel-plugin-import-global
published: false
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: React + Loadable Components
published: false
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/routing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Routing
published: true
description: This guide will walk you through some common routing scenarios and how to configure the routes option to support them in development.
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/sass.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'Sass'
tags: communityGuide
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/server-side-render.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Server-Side Rendering (SSR)
description: This guide will walk you through three different options for setting up Snowpack with your own custom server.
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/streaming-imports.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Streaming Imports
published: true
stream: Fetch your npm dependencies on-demand from a remote ESM CDN.
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/tailwind-css.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'Tailwind CSS'
tags: communityGuide
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/testing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Testing
published: true
description: How to choose and use a JavaScript test runner for your Snowpack site.
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/upgrade-guide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Snowpack Upgrade Guide
published: true
description: How to upgrade to Snowpack v3 from older versions of Snowpack.
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/vue.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Vue
tags: communityGuide
img: '/img/logos/vue.png'
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/wasm.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'WASM'
tags: communityGuide
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/web-test-runner.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: '@web/test-runner'
tags: communityGuide
img: '/img/logos/modern-web.svg'
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/web-worker.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'Web Workers'
tags: communityGuide
published: true
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/guides/workbox.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Workbox
tags: communityGuide
description: The Workbox CLI integrates well with Snowpack.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import Menu from '../components/Menu.hmx';
import Hero from '../components/Hero.hmx';
import Menu from '../components/Menu.astro';
import Hero from '../components/Hero.astro';
export const layout = 'layouts/base.hmx';
export const layout = 'layouts/base.astro';
export function setup({ context }) {
return {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import NewsAssets from '../components/NewsAssets.svelte';
import NewsTitle from '../components/NewsTitle.vue';
export const layout = 'layouts/main.hmx';
export const layout = 'layouts/main.astro';
import news from '../data/news.json';
import users from '../data/users.json';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import users from '../data/users.json';
import PluginSearchPage from '../components/PluginSearchPage.jsx';
export const layout = 'layouts/main.hmx';
export const layout = 'layouts/main.astro';
export function setup({ context }) {
return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/post.hmx
layout: layouts/post.astro
bannerVideo: '/img/extra-space-4.mp4'
permalink: '/posts/2020-05-26-snowpack-2-0-release/'
title: Snowpack v2.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/post.hmx
layout: layouts/post.astro
title: Snowpack 2.7
description: 'A new plugin API plus smaller, faster production builds.'
tagline: v2.7.0 release post
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/post.hmx
layout: layouts/post.astro
title: 'Snowpack v3.0 Release Candidate'
tagline: New features to change the way you build for the web.
description: 'New features to change the way you build for the web. Snowpack v3.0 will release on January 6th, 2021 (the one-year anniversary of its original launch post). This is our biggest release yet with some serious new features, including a new way to load npm packages on-demand that lets you skip the `npm install` step entirely.'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/post.hmx
layout: layouts/post.astro
title: 'Snowpack v3.0'
description: Snowpack v3.0 is here! Our biggest release yet with some serious new features, including pre-bundled streaming imports, built-in bundling & optimizations, new JavaScript APIs, and more.'
date: 2021-01-13
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
import Subnav from '../components/Subnav.hmx';
import { content as Menu } from '../components/Menu.hmx';
import Subnav from '../components/Subnav.astro';
import { content as Menu } from '../components/Menu.astro';
// import contentful from 'skypack:contentful';
export default async function ({ params }) {
const entry = await contentful.getEntry(params.slug);
return { title: entry.fields.title, description: entry.fields.description, layout: 'layouts/base.hmx', props: { entry } };
return { title: entry.fields.title, description: entry.fields.description, layout: 'layouts/base.astro', props: { entry } };
}
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Command Line API
description: The Snowpack Command Line tool's API, commands, and flags.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Common Error Details
description: How to troubleshoot common issues and error messagesm, plus our resources for getting help.
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/reference/configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: snowpack.config.js
description: The Snowpack configuration API reference.
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Environment Variables
description: Using environment variables with Snowpack
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Hot Module Replacement (HMR) API
description: Snowpack implements HMR via the esm-hmr spec, an attempted standard for ESM-based Hot Module Replacement (HMR).
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: JavaScript API
description: Snowpack's JavaScript API is for anyone who wants to integrate with some custom build pipeline or server-side rendering engine.
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/reference/plugins.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Plugin API
description: The Snowpack Plugin API and how to use it.
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/reference/supported-files.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: Supported Files
description: Snowpack ships with built-in support for many file types including json, js, ts, jsx, css, css modules, and images.
---
Expand Down
2 changes: 1 addition & 1 deletion examples/snowpack/astro/pages/tutorials/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: layouts/content.hmx
layout: layouts/content.astro
title: 'Starting a New Project'
description: This guide shows you how to set up Snowpack from scratch in a Node.js project. Along the way learn key concepts of Snowpack and unbundled development.
---
Expand Down
Loading

0 comments on commit 3c24faa

Please sign in to comment.