website

Website

A lightweight website built with native web technologies and Svelte.

Code of Design — Website

Contents

What this is

A lightweight website built with native web technologies and Svelte.

The most important concepts are:

  • Impact before form
  • Functionality before flair
  • Language-dynamic rather than English-first

This website should avoid piling on unnecessary dependencies and eventual excessive fileweight. It should remain native as much as possible in order to stay as future-proof as possible.

Contributing

Working locally

Install the dependencies...

cd svelte-app
npm install

...then start Rollup:

npm run dev

Navigate to localhost:5555. You should see the app running. Edit a component file in src, save it, and reload the page to see your changes.

By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv commands in package.json to include the option --host 0.0.0.0.

Building and running in production mode

To create an optimised version of the app:

npm run build

You can run the built app with npm run start. This uses sirv, which is included in the package.json's dependencies so that the app will work when it's deployed to static site hosting platforms (like e.g. Netlify, which Code of Design uses).

Deployments

Deployments to codeofdesign.org and codeof.design happen automatically, triggered by two events:

  1. When commits are pushed to the main branch of this repo.
  2. When codeofdesign/code is updated (and a new version is released). This repo will then automatically upgrade its version of the package to the latest published version within the current major version.

Top categories

Loading Svelte Themes